mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
543 B
39 lines
543 B
6 years ago
|
<script>
|
||
6 years ago
|
import Comment from "./Comment.svelte";
|
||
6 years ago
|
|
||
|
export let item;
|
||
6 years ago
|
export let returnTo;
|
||
6 years ago
|
</script>
|
||
|
|
||
|
<style>
|
||
|
article {
|
||
|
margin: 0 0 1em 0;
|
||
|
}
|
||
|
|
||
|
a {
|
||
|
display: block;
|
||
|
margin: 0 0 1em 0;
|
||
|
}
|
||
|
|
||
|
h1 {
|
||
|
font-size: 1.4em;
|
||
|
margin: 0;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
6 years ago
|
<a href={returnTo}>« back</a>
|
||
6 years ago
|
|
||
|
<article>
|
||
|
<a href="{item.url}">
|
||
|
<h1>{item.title}</h1>
|
||
|
<small>{item.domain}</small>
|
||
|
</a>
|
||
|
|
||
|
<p class="meta">submitted by {item.user} {item.time_ago}
|
||
|
</article>
|
||
|
|
||
|
<div class="comments">
|
||
|
{#each item.comments as comment}
|
||
|
<Comment {comment}/>
|
||
|
{/each}
|
||
|
</div>
|