From 8ff496797a75b03e9bc5886370d0b02d7bf6462e Mon Sep 17 00:00:00 2001 From: Peter Beverloo Date: Fri, 19 Apr 2024 19:17:10 +0100 Subject: [PATCH] Improve appearance of the Knowledge Base pages --- app/schedule/[event]/knowledge/[category]/page.tsx | 11 +++++++++-- app/schedule/[event]/knowledge/page.tsx | 13 +++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/schedule/[event]/knowledge/[category]/page.tsx b/app/schedule/[event]/knowledge/[category]/page.tsx index cc1b5f96..f813feb7 100644 --- a/app/schedule/[event]/knowledge/[category]/page.tsx +++ b/app/schedule/[event]/knowledge/[category]/page.tsx @@ -7,11 +7,13 @@ import Accordion from '@mui/material/Accordion'; import AccordionSummary from '@mui/material/AccordionSummary'; import AccordionDetails from '@mui/material/AccordionDetails'; import Box from '@mui/material/Box'; +import Card from '@mui/material/Card'; +import CardHeader from '@mui/material/CardHeader'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import type { NextPageParams } from '@lib/NextRouterParams'; import { ContentType } from '@lib/database/Types'; -import { Header } from '../../components/Header'; +import { KnowledgeBaseIcon } from '@components/KnowledgeBaseIcon'; import { Markdown } from '@components/Markdown'; import { requireAuthenticationContext } from '@lib/auth/AuthenticationContext'; import db, { tContent, tContentCategories } from '@lib/database'; @@ -54,7 +56,12 @@ export default async function ScheduleKnowledgeCategoryPage( return ( <> -
+ + } + title={category.title} + titleTypographyProps={{ variant: 'subtitle2' }} + subheader={category.description} /> + { category.questions.map(({ id, question, answer }) => diff --git a/app/schedule/[event]/knowledge/page.tsx b/app/schedule/[event]/knowledge/page.tsx index 7c4d4f71..3c9102c3 100644 --- a/app/schedule/[event]/knowledge/page.tsx +++ b/app/schedule/[event]/knowledge/page.tsx @@ -1,8 +1,10 @@ // Copyright 2024 Peter Beverloo & AnimeCon. All rights reserved. // Use of this source code is governed by a MIT license that can be found in the LICENSE file. +import Box from '@mui/material/Box'; +import Card from '@mui/material/Card'; + import type { NextPageParams } from '@lib/NextRouterParams'; -import { Header } from '../components/Header'; import { KnowledgeBaseCategories } from './KnowledgeBaseCategories'; import { requireAuthenticationContext } from '@lib/auth/AuthenticationContext'; @@ -14,7 +16,14 @@ export default async function ScheduleKnowledgePage(props: NextPageParams<'event await requireAuthenticationContext({ check: 'event', event: props.params.event }); return ( <> -
+ + + );