Add: Welcome message
This commit is contained in:
parent
2a9c2c598f
commit
e62ee40950
34
src/comp/card.svelte
Normal file
34
src/comp/card.svelte
Normal 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>
|
||||||
@ -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
BIN
static/waving-hand-sign.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Loading…
x
Reference in New Issue
Block a user