Add SubHomePage component and minor styling updates

Introduced the SubHomePage component to enhance modularity of the home page. Adjusted styling to include margins and a dark mode class for the body element.
This commit is contained in:
Mathis H (Avnyr) 2024-10-17 12:04:28 +02:00
parent 4d6962afb5
commit 92bb6bf367
Signed by: Mathis
GPG Key ID: DD9E0666A747D126
3 changed files with 20 additions and 3 deletions

View File

@ -15,7 +15,7 @@ export default function RootLayout({
}) { }) {
return ( return (
<html lang="en"> <html lang="en">
<body className={"h-screen w-screen bg-card flex flex-col justify-between items-center police-ubuntu"}> <body className={"h-screen w-screen bg-card flex flex-col justify-between items-center police-ubuntu dark"}>
<Header/> <Header/>
{children} {children}
<Footer/> <Footer/>

View File

@ -8,6 +8,9 @@ import {
ResizablePanel, ResizablePanel,
ResizablePanelGroup ResizablePanelGroup
} from 'apps/frontend/src/components/ui/resizable'; } from 'apps/frontend/src/components/ui/resizable';
import {
SubHomePage
} from 'apps/frontend/src/components/sub-pages/sub-home-page';
export enum ESubPage { export enum ESubPage {
Home, Home,
@ -32,7 +35,7 @@ export default function HomePage() {
</ResizablePanel> </ResizablePanel>
<ResizableHandle withHandle /> <ResizableHandle withHandle />
<ResizablePanel <ResizablePanel
className={"w-full flex justify-center items-center"}> className={"w-full flex justify-center items-center m-3"}>
<SubPage currentSubPage={currentSubPage}/> <SubPage currentSubPage={currentSubPage}/>
</ResizablePanel> </ResizablePanel>
</ResizablePanelGroup> </ResizablePanelGroup>
@ -73,7 +76,7 @@ export interface ISubPageProps {
function SubPage(props: ISubPageProps) { function SubPage(props: ISubPageProps) {
switch (props.currentSubPage) { switch (props.currentSubPage) {
case ESubPage.Home: case ESubPage.Home:
return (<>Home</>) return (<SubHomePage/>)
case ESubPage.Documentation: case ESubPage.Documentation:
return (<>Doc</>) return (<>Doc</>)
default: default:

View File

@ -0,0 +1,14 @@
import { useState } from 'react';
export interface SubHomePageProps {
}
export function SubHomePage(props: SubHomePageProps) {
const [isLoaded, setIsLoaded] = useState<boolean>(false);
return (<section className={"w-full h-full rounded bg-card"}>
</section>)
}