/*********************************************************************************************************************************************************************** * File Name: NavbarLayout.jsx * Type of Program: Layout Route * Description: A Layout router for Landing page. * Module: Public User * Author: lash0000 * Date Created: Oct. 10, 2025 *********************************************************************************************************************************************************************** * Change History: * DATE AUTHOR LOG NUMBER DESCRIPTION * Oct. 10, 2025 lash0000 001 Initial creation - STAR Phase 1 Project ***********************************************************************************************************************************************************************/ import { Fragment, useEffect, useRef } from 'react'; import { useTheme } from '@/contexts/ThemeContext'; import { NavLink, Link } from 'react-router-dom'; import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from "@/components/ui/drawer" import { Button } from '@/components/ui/button'; import { Toaster } from "@/components/ui/sonner" import { RippleButton } from '@/components/custom/ripple-button'; import { Moon, Sun, Equal, Home, NotepadText, CircleUser, CroissantIcon, DoorOpen } from 'lucide-react'; import Footer from '../pages/LandingFooter'; function LandingLayout({ children }) { const { theme, toggleTheme } = useTheme(); const drawerCloseRef = useRef(null); useEffect(() => { const handleResize = () => { const isLargeScreen = window.matchMedia('(min-width: 1024px)').matches; if (isLargeScreen && drawerCloseRef.current) { drawerCloseRef.current.click(); } }; handleResize(); window.addEventListener('resize', handleResize); return () => window.removeEventListener('resize', handleResize); }, []); const scrollToId = (id) => { const el = document.getElementById(id) if (!el) return const offset = 150 const top = el.getBoundingClientRect().top + window.scrollY - offset window.scrollTo({ top, behavior: 'smooth' }) } return (
{children}
{/* add footer */}