docu version 1.8.5

This commit is contained in:
Wildan Nursahidan
2025-05-17 19:35:31 +07:00
parent 82c3a03d3a
commit a3fcae0112
23 changed files with 866 additions and 6395 deletions

View File

@@ -7,7 +7,7 @@ export function Footer() {
const { footer } = docuConfig;
const { meta } = docuConfig;
return (
<footer className="w-full py-4 border-t lg:py-8 bg-background">
<footer className="w-full py-4 px-2 border-t lg:py-8 bg-background">
<div className="container flex flex-wrap items-center justify-between text-sm">
<div className="items-start justify-center hidden gap-4 lg:flex-col lg:flex lg:w-3/5">
<h3 className="text-lg font-bold font-code">{meta.title}</h3>
@@ -16,12 +16,9 @@ export function Footer() {
<FooterButtons />
</div>
</div>
<div className="flex flex-col items-start justify-center w-full gap-4 mt-4 xl:items-end lg:w-2/5">
<div className="flex flex-col items-center justify-center w-full gap-4 mt-4 lg:items-end lg:w-2/5">
<p className="text-center text-muted-foreground">
Copyright © {new Date().getFullYear()} {footer.copyright} - Made with{" "}
<Link href="https://www.docubook.pro" target="_blank" rel="noopener noreferrer" className="underline underline-offset-2">
DocuBook
</Link>
Copyright © {new Date().getFullYear()} {footer.copyright} - <MadeWith />
</p>
<div className="hidden lg:flex">
<ModeToggle />
@@ -33,12 +30,20 @@ export function Footer() {
}
export function FooterButtons() {
const { footer } = docuConfig;
const footer = docuConfig?.footer;
// Jangan render apapun jika tidak ada data sosial
if (!footer?.social || !Array.isArray(footer.social) || footer.social.length === 0) {
return null;
}
return (
<>
{footer.social?.map((item) => {
const IconComponent = (LucideIcons[item.iconName as keyof typeof LucideIcons] ?? LucideIcons["Globe"]) as unknown as React.FC<{ className?: string }>;
{footer.social.map((item) => {
const IconComponent =
(LucideIcons[item.iconName as keyof typeof LucideIcons] ??
LucideIcons["Globe"]) as React.FC<{ className?: string }>;
return (
<Link
key={item.name}
@@ -54,3 +59,15 @@ export function FooterButtons() {
</>
);
}
export function MadeWith() {
return (
<>
<span className="text-muted-foreground">Made with </span>
<span className="text-primary">
<Link href="https://www.docubook.pro" target="_blank" rel="noopener noreferrer" className="underline underline-offset-2 text-muted-foreground">
DocuBook
</Link></span>
</>
);
}