Basic styling
This commit is contained in:
@@ -1 +1,11 @@
|
||||
<slot />
|
||||
<style>
|
||||
.content {
|
||||
margin: 16px;
|
||||
width: calc(100% - 16px);
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<h1>Welcome to Echo</h1>
|
||||
<p>Currently suppored link: <a href="/posts">/posts</a></p>
|
||||
@@ -15,8 +15,6 @@ export async function load({ params, locals }) {
|
||||
|
||||
const comments = await getCommentsForPost(locals.sql, post_id);
|
||||
|
||||
console.log(comments);
|
||||
|
||||
return {
|
||||
post: post,
|
||||
comments: comments
|
||||
|
||||
@@ -21,15 +21,32 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<h1>{post.name}</h1>
|
||||
{#if post.author}
|
||||
<a href="/users/{getNamedId(post.author.id, post.author.name)}">{post.author.name}</a>
|
||||
{:else}
|
||||
<p>Deleted</p>
|
||||
{/if}
|
||||
<p>{post.content}</p>
|
||||
<div>
|
||||
{#each commentTree as reply}
|
||||
<Comment commentNode={reply}></Comment>
|
||||
{/each}
|
||||
<style>
|
||||
.post {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="post">
|
||||
<h1 class="taviraj-light">{post.name}</h1>
|
||||
|
||||
{#if post.author}
|
||||
<a href="/users/{getNamedId(post.author.id, post.author.name)}">{post.author.name}</a>
|
||||
{:else}
|
||||
<p>Deleted</p>
|
||||
{/if}
|
||||
|
||||
<p>{post.content}</p>
|
||||
|
||||
<div>
|
||||
{#each commentTree as reply}
|
||||
<Comment commentNode={reply}></Comment>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
.center {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
--accent-1: rgb(131, 4, 53);
|
||||
--accent-2: rgb(0, 18, 36);
|
||||
background: radial-gradient(circle at top, var(--accent-1), transparent),
|
||||
radial-gradient(circle at bottom, var(--accent-2), transparent),
|
||||
#111;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="center">
|
||||
<h1 class="taviraj-light">Welcome to Echo</h1>
|
||||
<p>Currently suppored link: <a href="/posts">/posts</a></p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user