From 8e4163e3f08e29f38fe87c59d8cfb91e0fa98063 Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 29 Aug 2022 19:01:20 +0300 Subject: everything works --- src/pages/board/[board].astro | 22 ++++++++++------------ src/pages/board/[board]/[tid].astro | 28 ++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 20 deletions(-) (limited to 'src/pages/board') diff --git a/src/pages/board/[board].astro b/src/pages/board/[board].astro index a529d3c..eaea03e 100644 --- a/src/pages/board/[board].astro +++ b/src/pages/board/[board].astro @@ -1,8 +1,9 @@ --- -import Default from '../../layouts/Default.astro'; -import Thread from '../../components/Thread.svelte' import '../../styles/thread.css' -import '../../styles/blackbox.css?' +import '../../styles/blackbox.css' + +import ThreadLayout from '../../layouts/ThreadLayout.astro'; +import Thread from '../../components/Thread.astro' import type Thread from '../../models/Thread'; import { api } from '../../lib/api.ts'; @@ -18,8 +19,11 @@ for(let thread of threads) await processThreadIn(board, thread); --- - -

{board}

+ +

+ {board} +

+
@@ -27,10 +31,4 @@ for(let thread of threads) {threads.map((thread) => ( ))} -
- - + diff --git a/src/pages/board/[board]/[tid].astro b/src/pages/board/[board]/[tid].astro index 4aa34ef..e9b345a 100644 --- a/src/pages/board/[board]/[tid].astro +++ b/src/pages/board/[board]/[tid].astro @@ -1,14 +1,16 @@ --- -import Default from '../../../layouts/Default.astro'; -import Thread from '../../../components/Thread.svelte' -import '../../../styles/thread.css' -import type Thread from '../../../models/Thread'; +import '../../../styles/thread.css'; +import '../../../styles/blackbox.css'; + +import ThreadLayout from '../../../layouts/ThreadLayout.astro'; +import Thread from '../../../components/Thread.astro' +import type Thread from '../../../models/Thread';; import { api } from '../../../lib/api'; import { processThreadIn } from '../../../lib/thread'; -const { board } = Astro.params; -const data = await api('get', `thread/${board}/${Astro.params.tid}`); +const { board, tid } = Astro.params; +const data = await api('get', `thread/${board}/${tid}`); if(data.status === 404) return Astro.redirect('/404'); @@ -16,6 +18,16 @@ const thread: Thread = await data.json(); await processThreadIn(board, thread, true); --- - + +

+ {board} +

+ +
+ +
+ -
\ No newline at end of file + \ No newline at end of file -- cgit v1.2.3