Add: Welcome message

This commit is contained in:
Donatas Kirda 2024-05-17 08:27:18 +03:00
parent 2a9c2c598f
commit e62ee40950
Signed by: bloodwiing
GPG Key ID: 63020D8D3F4A164F
3 changed files with 55 additions and 2 deletions

34
src/comp/card.svelte Normal file
View File

@ -0,0 +1,34 @@
<script>
import Glowfx from "./fx/glowfx.svelte";
/**
* @type {boolean | null}
*/
export let horizontal = null;
/**
* @type {string}
*/
export let background = 'var(--gray-dim)';
</script>
<style lang="scss">
.card {
display: flex;
flex-flow: column nowrap;
gap: 8px;
padding: 16px;
border-radius: 16px;
background: var(--card-bg);
&[data-horizontal] {
flex-direction: row;
}
}
</style>
<Glowfx borderRadius={16}>
<div class="card" data-horizontal={horizontal} {...$$restProps} style="--card-bg: {background}; {$$props.style}">
<slot />
</div>
</Glowfx>

View File

@ -1,4 +1,5 @@
<script> <script>
import Card from "$comp/card.svelte";
import Postlist from "$comp/page/posts/postlist.svelte"; import Postlist from "$comp/page/posts/postlist.svelte";
/** /**
@ -10,5 +11,23 @@
export let data; export let data;
</script> </script>
<h1>Posts</h1> <style>
<Postlist posts={data.posts} glancePost={data.glancePost}></Postlist> .icon {
height: 24px;
}
.content {
display: flex;
flex-flow: column nowrap;
gap: 16px;
}
</style>
<h1 class="typeTitle">Posts</h1>
<main class="content">
<Card background="#ffcc0020" style="align-items: center; gap: 16px;" horizontal>
<img class="icon" src="waving-hand-sign.png" alt="wave">
<span>Welcome to ECHO</span>
</Card>
<Postlist posts={data.posts} glancePost={data.glancePost}></Postlist>
</main>

BIN
static/waving-hand-sign.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB