aboutsummaryrefslogtreecommitdiff
path: root/src/components/Post.astro
blob: 1aa7a0d323e962c17c66c501efcd092d76541dc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
import { formatTime } from '../lib/util';

export interface Props {
  id: string;
  date: number;
  box: string;
  board: string
}

const { id, date, 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> <br>
  </span> <hr>
  <slot />
</div>