Changes
This commit is contained in:
@@ -5,6 +5,7 @@ import { useCart } from '@/contexts/CartContext';
|
||||
import { useBranding } from '@/hooks/useBranding';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet';
|
||||
import { Footer } from '@/components/Footer';
|
||||
import { cn } from '@/lib/utils';
|
||||
import {
|
||||
LayoutDashboard,
|
||||
@@ -101,7 +102,7 @@ export function AppLayout({ children }: AppLayoutProps) {
|
||||
if (!user) {
|
||||
// Public layout for non-authenticated pages
|
||||
return (
|
||||
<div className="min-h-screen bg-background">
|
||||
<div className="min-h-screen bg-background flex flex-col">
|
||||
<header className="border-b-2 border-border bg-background sticky top-0 z-50">
|
||||
<div className="container mx-auto px-4 py-4 flex items-center justify-between">
|
||||
<Link to="/" className="text-2xl font-bold flex items-center gap-2">
|
||||
@@ -113,7 +114,7 @@ export function AppLayout({ children }: AppLayoutProps) {
|
||||
</Link>
|
||||
<nav className="flex items-center gap-4">
|
||||
<Link to="/products" className="hover:underline font-medium">Produk</Link>
|
||||
<Link to="/events" className="hover:underline font-medium">Kalender</Link>
|
||||
<Link to="/calendar" className="hover:underline font-medium">Kalender</Link>
|
||||
<Link to="/auth">
|
||||
<Button variant="outline" size="sm" className="border-2">
|
||||
<User className="w-4 h-4 mr-2" />
|
||||
@@ -133,7 +134,8 @@ export function AppLayout({ children }: AppLayoutProps) {
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main>{children}</main>
|
||||
<main className="flex-1">{children}</main>
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
67
src/components/Footer.tsx
Normal file
67
src/components/Footer.tsx
Normal file
@@ -0,0 +1,67 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useBranding } from '@/hooks/useBranding';
|
||||
|
||||
export function Footer() {
|
||||
const branding = useBranding();
|
||||
const brandName = branding.brand_name || 'LearnHub';
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
return (
|
||||
<footer className="border-t-2 border-border bg-muted/50 mt-auto">
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||
{/* Brand */}
|
||||
<div className="md:col-span-2">
|
||||
<h3 className="font-bold text-lg mb-2">{brandName}</h3>
|
||||
<p className="text-sm text-muted-foreground max-w-md">
|
||||
{branding.brand_tagline || 'Platform pembelajaran online untuk mengembangkan skill dan karir Anda.'}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Quick Links */}
|
||||
<div>
|
||||
<h4 className="font-semibold mb-3">Tautan</h4>
|
||||
<ul className="space-y-2 text-sm">
|
||||
<li>
|
||||
<Link to="/products" className="text-muted-foreground hover:text-foreground transition-colors">
|
||||
Produk
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to="/calendar" className="text-muted-foreground hover:text-foreground transition-colors">
|
||||
Kalender Event
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to="/consulting" className="text-muted-foreground hover:text-foreground transition-colors">
|
||||
Konsultasi
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{/* Legal */}
|
||||
<div>
|
||||
<h4 className="font-semibold mb-3">Legal</h4>
|
||||
<ul className="space-y-2 text-sm">
|
||||
<li>
|
||||
<Link to="/privacy" className="text-muted-foreground hover:text-foreground transition-colors">
|
||||
Kebijakan Privasi
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link to="/terms" className="text-muted-foreground hover:text-foreground transition-colors">
|
||||
Syarat & Ketentuan
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="border-t border-border mt-8 pt-6 text-center text-sm text-muted-foreground">
|
||||
© {currentYear} {brandName}. All rights reserved.
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user