Basic styling
This commit is contained in:
parent
7fede754ea
commit
14ce3c0662
@ -3,6 +3,11 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Taviraj:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="/css/font.scss">
|
||||||
|
<link rel="stylesheet" href="/css/base.scss">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import ssh2 from 'ssh2';
|
|||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export const sql = postgres(
|
export const sql = postgres(
|
||||||
// 'postgres://doki8902:ChangeItN8w@pgsql3.mif:5432/studentu',
|
|
||||||
{
|
{
|
||||||
host: env.PG_HOST,
|
host: env.PG_HOST,
|
||||||
port: parseInt(env.PG_PORT),
|
port: parseInt(env.PG_PORT),
|
||||||
|
|||||||
@ -1 +1,11 @@
|
|||||||
|
<style>
|
||||||
|
.content {
|
||||||
|
margin: 16px;
|
||||||
|
width: calc(100% - 16px);
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
<slot />
|
<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);
|
const comments = await getCommentsForPost(locals.sql, post_id);
|
||||||
|
|
||||||
console.log(comments);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
post: post,
|
post: post,
|
||||||
comments: comments
|
comments: comments
|
||||||
|
|||||||
@ -21,15 +21,32 @@
|
|||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1>{post.name}</h1>
|
<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}
|
{#if post.author}
|
||||||
<a href="/users/{getNamedId(post.author.id, post.author.name)}">{post.author.name}</a>
|
<a href="/users/{getNamedId(post.author.id, post.author.name)}">{post.author.name}</a>
|
||||||
{:else}
|
{:else}
|
||||||
<p>Deleted</p>
|
<p>Deleted</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<p>{post.content}</p>
|
<p>{post.content}</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{#each commentTree as reply}
|
{#each commentTree as reply}
|
||||||
<Comment commentNode={reply}></Comment>
|
<Comment commentNode={reply}></Comment>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|||||||
27
src/routes/+page.svelte
Normal file
27
src/routes/+page.svelte
Normal 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>
|
||||||
14
static/css/base.scss
Normal file
14
static/css/base.scss
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
:root {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #111;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
120
static/css/font.scss
Normal file
120
static/css/font.scss
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
.taviraj-thin {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 100;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-extralight {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 200;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-light {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-regular {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-medium {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-semibold {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-bold {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-extrabold {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 800;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-black {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 900;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-thin-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 100;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-extralight-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 200;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-light-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-regular-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-medium-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-semibold-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-bold-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-extrabold-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 800;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taviraj-black-italic {
|
||||||
|
font-family: "Taviraj", serif;
|
||||||
|
font-weight: 900;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
// <uniquifier>: Use a unique and descriptive class name
|
||||||
|
// <weight>: Use a value from 200 to 1000
|
||||||
|
|
||||||
|
.nunito-sans-300 {
|
||||||
|
font-family: "Nunito Sans", sans-serif;
|
||||||
|
font-optical-sizing: auto;
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
font-variation-settings:
|
||||||
|
"wdth" 100,
|
||||||
|
"YTLC" 500;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user