add footer
This commit is contained in:
@@ -5,6 +5,7 @@ import { usePathname } from 'next/navigation';
|
||||
import { ThemeProvider } from '@/components/theme-provider';
|
||||
import { Toaster } from '@/components/ui/toaster';
|
||||
import Navbar from '@/components/ui/Navbar';
|
||||
import Footer from '@/components/ui/footer';
|
||||
|
||||
interface ClientLayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -41,8 +42,9 @@ export default function ClientLayout({ children }: ClientLayoutProps) {
|
||||
}
|
||||
};
|
||||
|
||||
// Don't show navbar on the root page (login page)
|
||||
// Don't show navbar and footer on the root page (login page)
|
||||
const showNavbar = pathname !== '/' && !isLoading;
|
||||
const showFooter = pathname !== '/' && !isLoading;
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
@@ -51,11 +53,12 @@ export default function ClientLayout({ children }: ClientLayoutProps) {
|
||||
enableSystem={false}
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<div className="min-h-screen">
|
||||
<div className="min-h-screen flex flex-col">
|
||||
{showNavbar && <Navbar />}
|
||||
<main className="flex-1">
|
||||
{children}
|
||||
</main>
|
||||
{showFooter && <Footer />}
|
||||
</div>
|
||||
<Toaster />
|
||||
</ThemeProvider>
|
||||
|
||||
22
components/ui/footer.tsx
Normal file
22
components/ui/footer.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { Heart } from "lucide-react";
|
||||
|
||||
export default function Footer() {
|
||||
return (
|
||||
<footer className="border-t bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<div className="container mx-auto px-4 py-6">
|
||||
<div className="flex flex-col items-center justify-center gap-2 text-center">
|
||||
<p className="text-sm text-muted-foreground flex items-center gap-2">
|
||||
Crafted with
|
||||
<Heart className="h-4 w-4 text-red-500 fill-red-500 animate-pulse" />
|
||||
and passion by
|
||||
<span className="font-semibold text-foreground">Randa Firman Putra</span>
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
© {new Date().getFullYear()} Portal Data Informatika UNTAN. All rights reserved.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user