aboutsummaryrefslogtreecommitdiff
path: root/src/pages/boards.astro
blob: ab3158f1cda3ac59b3c03cf4b80e8930dfb2e692 (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
26
27
28
29
30
31
32
---
import Default from '../layouts/Default.astro';
import { api } from '../lib/api.ts';

const data = await api('get', 'boards');
const boards: string[] = await data.json();
---

<Default>
  <div class="blackbox">
    <h3>Boards</h3>

    <ul>
      {boards.map((board) => (
      <li><a href=`/board/${board}`>{board}</a></li>
      ))}
    </ul>
  </div>
</Default>

<style>
  .blackbox {
    width: 300px;
    height: 210px;
    border: 10px solid black;
    padding: 10px;
    padding-top: 0px;
    margin: 10px;
    margin-left: 0px;
    background-color: white;
  }
</style>