Skip to content

Commit

Permalink
feat(website): add report to its own page, make room for landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
vst committed Mar 30, 2024
1 parent 03d2f53 commit 109d778
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 19 deletions.
11 changes: 10 additions & 1 deletion website/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Header from '@/components/header';
import type { Metadata } from 'next';
import { JetBrains_Mono } from 'next/font/google';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import './globals.css';
import { Providers } from './providers';

Expand All @@ -18,7 +21,13 @@ export default function RootLayout({
return (
<html lang="en">
<body className={`bg-gray-50 ${font.className}`}>
<Providers>{children}</Providers>
<Providers>
<main className="flex min-h-screen flex-col items-center justify-start">
<Header />
<div className="flex w-full flex-grow">{children}</div>
<ToastContainer autoClose={2000} />
</main>
</Providers>
</body>
</html>
);
Expand Down
27 changes: 13 additions & 14 deletions website/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import { AppMain } from '@/components/app';
import Header from '@/components/header';
import { ToastContainer } from 'react-toastify';
import Link from 'next/link';

import 'react-toastify/dist/ReactToastify.css';

export default function Home() {
export default function Page() {
return (
<main className="flex min-h-screen flex-col items-center justify-start">
<Header />

<div className="flex w-full flex-grow">
<AppMain />
<div className="flex w-full flex-col items-center justify-center">
<div>
<p>Landing page is coming soon...</p>
<p>
Check{' '}
<Link href="/report" className="font-bold text-blue-500">
report
</Link>{' '}
page.
</p>
</div>

<ToastContainer autoClose={2000} />
</main>
</div>
);
}
5 changes: 5 additions & 0 deletions website/src/app/report/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { AppMain } from '@/components/app';

export default function Page() {
return <AppMain />;
}
33 changes: 29 additions & 4 deletions website/src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use client';

import { Link } from '@nextui-org/link';
import {
Navbar,
NavbarBrand,
Expand All @@ -10,6 +9,7 @@ import {
NavbarMenuItem,
NavbarMenuToggle,
} from '@nextui-org/navbar';
import Link from 'next/link';
import { useState } from 'react';

export default function Header() {
Expand All @@ -27,22 +27,47 @@ export default function Header() {
<p className="font-mono text-2xl font-bold tracking-widest text-inherit">lhp</p>
</NavbarBrand>

<NavbarContent className="hidden gap-4 text-sm sm:flex" justify="center">
<NavbarContent className="hidden md:flex" justify="center">
<NavbarItem>Lazy Hacker&apos;s Linux Host Patrol</NavbarItem>
</NavbarContent>

<NavbarContent justify="end">
<NavbarItem className="hidden lg:flex">
<NavbarItem className="hidden sm:flex">
<Link href="/" className="w-full">
Home
</Link>
</NavbarItem>

<NavbarItem className="hidden sm:flex">
<Link href="/report" className="w-full">
Report
</Link>
</NavbarItem>

<NavbarItem className="hidden sm:flex">
<Link href="https://github.com/vst/lhp" className="w-full">
GitHub
</Link>
</NavbarItem>

<NavbarMenuToggle aria-label={isMenuOpen ? 'Close menu' : 'Open menu'} className="sm:hidden" />
</NavbarContent>

<NavbarMenu>
<NavbarMenuItem>
<Link href="https://github.com/vst/lhp" className="w-full" size="lg">
<Link href="/" className="w-full">
Home
</Link>
</NavbarMenuItem>

<NavbarMenuItem>
<Link href="/report" className="w-full">
Report
</Link>
</NavbarMenuItem>

<NavbarMenuItem>
<Link href="https://github.com/vst/lhp" className="w-full">
GitHub
</Link>
</NavbarMenuItem>
Expand Down

0 comments on commit 109d778

Please sign in to comment.