edit komponen leftbar & footer

This commit is contained in:
Wildan Nursahidan
2025-05-26 18:41:47 +07:00
parent bd400695ff
commit 97308b33c2
2 changed files with 12 additions and 33 deletions

View File

@@ -15,46 +15,28 @@ interface FooterConfig {
social?: SocialItem[]; social?: SocialItem[];
} }
interface MetaConfig {
title: string;
description: string;
baseURL: string;
favicon: string;
}
interface DocuConfig {
footer: FooterConfig;
meta: MetaConfig;
navbar: any;
repository: any;
routes: any[];
}
// Type assertion for docu.json // Type assertion for docu.json
const docuConfig = docuData as DocuConfig; const docuConfig = docuData as {
footer: FooterConfig;
};
export function Footer() { export function Footer() {
const { footer } = docuConfig; const { footer } = docuConfig;
const { meta } = docuConfig;
return ( return (
<footer className="w-full py-4 px-2 border-t lg:py-8 bg-background"> <footer className="w-full py-8 px-2 border-t bg-background">
<div className="container flex flex-wrap items-center justify-between text-sm"> <div className="container flex flex-col lg:flex-row items-center justify-between text-sm">
<div className="items-start justify-center hidden gap-4 lg:flex-col lg:flex lg:w-3/5"> <div className="flex flex-col items-center lg:items-start justify-start gap-4 w-full lg:w-3/5 text-center lg:text-left">
<h3 className="text-lg font-bold font-code">{meta.title}</h3> <p className="text-muted-foreground">
<span className="w-3/4 text-base text-wrap text-muted-foreground">{meta.description}</span> Copyright © {new Date().getFullYear()} {footer.copyright} - <MadeWith />
<div className="flex items-center gap-6 mt-2"> </p>
<div className="flex items-center justify-center lg:justify-start gap-6 mt-2 w-full">
<FooterButtons /> <FooterButtons />
</div> </div>
</div> </div>
<div className="flex flex-col items-center justify-center w-full gap-4 mt-4 lg:items-end lg:w-2/5"> <div className="hidden lg:flex items-center justify-end lg:w-2/5">
<p className="text-center text-muted-foreground">
Copyright © {new Date().getFullYear()} {footer.copyright} - <MadeWith />
</p>
<div className="hidden lg:flex">
<ModeToggle /> <ModeToggle />
</div> </div>
</div> </div>
</div>
</footer> </footer>
); );
} }

View File

@@ -85,9 +85,6 @@ export function SheetLeftbar() {
<div className="mx-2 px-5"> <div className="mx-2 px-5">
<DocsMenu isSheet /> <DocsMenu isSheet />
</div> </div>
<div className="px-6 py-2 flex justify-start items-center gap-6">
<FooterButtons />
</div>
<div className="flex w-2/4 px-5"> <div className="flex w-2/4 px-5">
<ModeToggle /> <ModeToggle />
</div> </div>