diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-08-29 19:01:20 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-29 19:01:20 +0300 |
commit | 8e4163e3f08e29f38fe87c59d8cfb91e0fa98063 (patch) | |
tree | 2b117f4bafa0a4d10252eef95ca868a247a081a1 /src/components/Post.astro | |
parent | 9d952483f250a97cbeab4061fa1c4e68341b330f (diff) |
everything works
Diffstat (limited to 'src/components/Post.astro')
-rw-r--r-- | src/components/Post.astro | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/components/Post.astro b/src/components/Post.astro new file mode 100644 index 0000000..6805846 --- /dev/null +++ b/src/components/Post.astro @@ -0,0 +1,28 @@ +--- +import { creatorColor, formatTime } from '../lib/util'; + +export interface Props { + id: string; + date: number; + creator: string; + box: string; + board: string +} + +const { id, date, creator, box, board = '' } = Astro.props; +--- +<div class={box} id={id}> + <span style="line-height: 2rem;"> + {(board != '') ? ( + <a href=`/board/${board}/${id}` style="font-family: mono">{id}</a> + ) : ( + <span style="font=family: mono">{id}</span> + )} + + at {formatTime(date)} <br> + -> <span style=`${creatorColor(creator)}; font-family: mono`> + {creator} + </span> <br> + </span> <hr> + <slot /> +</div> |