diff options
Diffstat (limited to 'src/pages/board')
-rw-r--r-- | src/pages/board/[board].astro | 22 | ||||
-rw-r--r-- | src/pages/board/[board]/[tid].astro | 28 |
2 files changed, 30 insertions, 20 deletions
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); --- -<Default> - <h1><a href="/boards"> {board} </a></h1> +<ThreadLayout> + <h1 style="text-align:center"> + <a href=`/boards`>{board}</a> + </h1> + <div class="blackbox"> <button style="left: 50%; position: relative; transform: translate(-50%, 0);" onclick=`window.location='/create/${board}'`>Create Thread</button> </div> @@ -27,10 +31,4 @@ for(let thread of threads) {threads.map((thread) => ( <Thread thread={thread} board={board} /> ))} -</Default> - -<style is:inline> - :root { - --wdt: 600px; - } -</style> +</ThreadLayout> 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); --- -<Default> +<ThreadLayout> + <h1 style="text-align:center"> + <a href=`/board/${board}`>{board}</a> + </h1> + + <div class="blackbox"> + <button style="left: 50%; position: relative; transform: translate(-50%, 0);" onclick=`window.open('/create/${board}/${tid}','popUpWindow','height=500,width=600')`> + Create Comment + </button> + </div> + <Thread thread={thread} board={board} comments=true /> -</Default>
\ No newline at end of file +</ThreadLayout>
\ No newline at end of file |