Basic styling

This commit is contained in:
2024-05-10 11:35:43 +03:00
parent 7fede754ea
commit 14ce3c0662
10 changed files with 205 additions and 17 deletions
+11 -1
View File
@@ -1 +1,11 @@
<slot />
<style>
.content {
margin: 16px;
width: calc(100% - 16px);
height: 100%;
}
</style>
<div class="content">
<slot />
</div>
-2
View File
@@ -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
+28 -11
View File
@@ -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>
+27
View File
@@ -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>