Skip to content

Commit

Permalink
theme and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lawandothman committed May 25, 2024
1 parent 72942d1 commit 71fbd29
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 140 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"clsx": "^2.1.1",
"lucide-react": "^0.379.0",
"next": "15.0.0-rc.0",
"next-themes": "^0.3.0",
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
"tailwind-merge": "^2.3.0",
Expand Down
3 changes: 0 additions & 3 deletions public/file-text.svg

This file was deleted.

10 changes: 0 additions & 10 deletions public/globe.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

10 changes: 0 additions & 10 deletions public/vercel.svg

This file was deleted.

3 changes: 0 additions & 3 deletions public/window.svg

This file was deleted.

Binary file removed src/app/favicon.ico
Binary file not shown.
Binary file removed src/app/fonts/GeistMonoVF.woff
Binary file not shown.
Binary file removed src/app/fonts/GeistVF.woff
Binary file not shown.
58 changes: 43 additions & 15 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
import type { Metadata } from 'next'
import localFont from 'next/font/local'
import './globals.css'

const geistSans = localFont({
src: './fonts/GeistVF.woff',
variable: '--font-geist-sans',
})
const geistMono = localFont({
src: './fonts/GeistMonoVF.woff',
variable: '--font-geist-mono',
})
import { Navbar } from '@/components/nav'
import { ThemeProvider } from 'next-themes'

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
metadataBase: new URL('https://lwnd.me/'),
title: {
default: 'Lawand Othman',
template: '%s | Lawand Othman',
},
description: 'Full stack developer, hacker and creator',
openGraph: {
title: 'Lawand Othman',
description: 'Full stack developer, hacker and creator',
url: 'https://lwnd.me/',
siteName: 'Lawand Othman',
locale: 'en_GB',
type: 'website',
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
'max-image-preview': 'large',
'max-snippet': -1,
},
},
twitter: {
title: 'Lawand Othman',
card: 'summary_large_image',
},
}

export default function RootLayout({
Expand All @@ -22,9 +40,19 @@ export default function RootLayout({
children: React.ReactNode
}>) {
return (
<html lang='en'>
<body className={`${geistSans.variable} ${geistMono.variable}`}>
{children}
<html lang='en' suppressHydrationWarning>
<body className='antialiased max-w-2xl mb-40 flex flex-col md:flex-row mx-4 mt-8 lg:mx-auto'>
<ThemeProvider
attribute='class'
defaultTheme='system'
disableTransitionOnChange
enableSystem
>
<main className='flex-auto min-w-0 mt-6 flex flex-col px-2 md:px-0'>
<Navbar />
{children}
</main>
</ThemeProvider>
</body>
</html>
)
Expand Down
99 changes: 1 addition & 98 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,100 +1,3 @@
import Image from 'next/image'

export default function Home() {
return (
<div className='font-sans grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20'>
<main className='flex flex-col gap-8 row-start-2 items-center sm:items-start'>
<Image
className='dark:invert'
src='/next.svg'
alt='Next.js logo'
width={180}
height={38}
priority
/>
<ol className='font-mono list-inside list-decimal text-sm text-center sm:text-left'>
<li className='mb-2'>
Get started by editing{' '}
<code className='bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold'>
src/app/page.tsx
</code>
</li>
<li>Save and see your changes instantly.</li>
</ol>

<div className='flex gap-4 items-center flex-col sm:flex-row'>
<a
className='rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5'
href='https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
rel='noopener noreferrer'
>
<Image
className='dark:invert'
src='/vercel.svg'
alt='Vercel logomark'
width={20}
height={20}
/>
Deploy now
</a>
<a
className='rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44'
href='https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
rel='noopener noreferrer'
>
Read our docs
</a>
</div>
</main>
<footer className='row-start-3 flex gap-6 flex-wrap items-center justify-center'>
<a
className='flex items-center gap-2 hover:underline hover:underline-offset-4'
href='https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
rel='noopener noreferrer'
>
<Image
aria-hidden
src='/file-text.svg'
alt='File icon'
width={16}
height={16}
/>
Learn
</a>
<a
className='flex items-center gap-2 hover:underline hover:underline-offset-4'
href='https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
rel='noopener noreferrer'
>
<Image
aria-hidden
src='/window.svg'
alt='Window icon'
width={16}
height={16}
/>
Examples
</a>
<a
className='flex items-center gap-2 hover:underline hover:underline-offset-4'
href='https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app'
target='_blank'
rel='noopener noreferrer'
>
<Image
aria-hidden
src='/globe.svg'
alt='Globe icon'
width={16}
height={16}
/>
Go to nextjs.org →
</a>
</footer>
</div>
)
return <>Hello world!</>
}
43 changes: 43 additions & 0 deletions src/components/nav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import Link from 'next/link'

const navItems = {
'/': {
name: 'Home',
},
'/projects': {
name: 'Projects',
},
'/stack': {
name: 'Stack',
},
'/contact': {
name: 'Contact',
},
}

export function Navbar() {
return (
<aside className='-ml-[8px] mb-16 tracking-tight'>
<div className='lg:sticky lg:top-20'>
<nav
className='flex flex-row items-start relative px-0 pb-0 fade md:overflow-auto scroll-pr-6 md:relative'
id='nav'
>
<div className='flex flex-row space-x-0 pr-10'>
{Object.entries(navItems).map(([path, { name }]) => {
return (
<Link
key={path}
href={path}
className='transition-all hover:text-neutral-800 dark:hover:text-neutral-200 flex align-middle relative py-1 px-2'
>
{name}
</Link>
)
})}
</div>
</nav>
</div>
</aside>
)
}

0 comments on commit 71fbd29

Please sign in to comment.