You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.9 KiB

  1. import ApplicationLogo from '@/Components/ApplicationLogo';
  2. import NavLink from '@/Components/NavLink';
  3. import Footer from '@/Components/Footer';
  4. import { Link, usePage } from '@inertiajs/react';
  5. import { PropsWithChildren } from 'react';
  6. export default function Guest({ children }: PropsWithChildren) {
  7. const { url } = usePage();
  8. return (
  9. <div>
  10. <header className="navbar px-4 bg-primary-background border-b-2 border-secondary-main">
  11. <div id="ProjectTitle" className="navbar-start">
  12. <Link href="/">
  13. <ApplicationLogo />
  14. </Link>
  15. </div>
  16. <nav className="navbar-end">
  17. <ul className="menu menu-horizontal px-1">
  18. <li><NavLink href="/" active={url === '/'}>
  19. Home
  20. </NavLink></li>
  21. <li><NavLink href="/about" active={url === '/about'}>
  22. About
  23. </NavLink></li>
  24. <li><NavLink href="/help" active={url === '/help'}>
  25. Tutorials
  26. </NavLink></li>
  27. <li><NavLink href={route('login')}
  28. active={url === '/login'}
  29. >
  30. Log in
  31. </NavLink></li>
  32. <li><NavLink href={route('register')}
  33. active={url === '/register'}
  34. >
  35. Register
  36. </NavLink></li>
  37. </ul>
  38. </nav>
  39. </header>
  40. <main>
  41. {children}
  42. </main>
  43. <footer>
  44. <Footer />
  45. </footer>
  46. </div>
  47. );
  48. }