aboutsummaryrefslogtreecommitdiff
path: root/src/pages/boards.astro
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-08-26 23:54:17 +0300
committerkartofen <mladenovnasko0@gmail.com>2022-08-26 23:54:17 +0300
commit8f5278eb443864910dd9c2131c992d71e3af2d20 (patch)
treed56d805fa010e4b10af7dec0ed359f218e859667 /src/pages/boards.astro
Big bang
Diffstat (limited to 'src/pages/boards.astro')
-rw-r--r--src/pages/boards.astro32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/pages/boards.astro b/src/pages/boards.astro
new file mode 100644
index 0000000..ab3158f
--- /dev/null
+++ b/src/pages/boards.astro
@@ -0,0 +1,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>