Added public layout group

This commit is contained in:
2025-06-25 19:56:34 +02:00
parent d9de3f4b6e
commit 7e86d53c81
4 changed files with 56 additions and 11 deletions

View File

@@ -0,0 +1,36 @@
import Link from "next/link"
import { ReactNode } from "react"
export default function PublicLayout({
children
}: {
children: ReactNode
}) {
return (
<>
<nav className="bg-white shadow-sm border-b">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center h-16">
<div className="flex-shrink-0">
<Link href="/">
<h1 className="text-xl font-bold text-gray-900 hover:text-gray-700 transition-colors cursor-pointer">
Linker
</h1>
</Link>
</div>
<div>
<button className="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm font-medium transition-colors">
Sign In
</button>
</div>
</div>
</div>
</nav>
<main>
{children}
</main>
</>
)
}

14
src/app/(public)/page.tsx Normal file
View File

@@ -0,0 +1,14 @@
export default function HomePage() {
return (
<div className="min-h-screen flex items-center justify-center bg-background">
<div className="text-center space-y-4">
<h1 className="text-4xl font-bold text-foreground">
Linker
</h1>
<p className="text-lg text-muted-foreground max-w-md">
Transform long URLs into short, shareable links. Perfect for social media, emails, and anywhere you need clean, manageable links.
</p>
</div>
</div>
)
}

View File

@@ -1,18 +1,16 @@
import type { Metadata } from "next"
import { ReactNode } from "react" import { ReactNode } from "react"
import "./globals.css" import "./globals.css"
export const metadata: Metadata = {
title: "Linker",
description: "A simple link shortener"
}
export default function RootLayout({ export default function RootLayout({
children children
}: Readonly<{ children: ReactNode }>) { }: {
children: ReactNode
}) {
return ( return (
<html lang="en" suppressHydrationWarning> <html lang="en" suppressHydrationWarning>
<body className="antialiased">{children}</body> <body className="antialiased">
{children}
</body>
</html> </html>
) )
} }

View File

@@ -1,3 +0,0 @@
export default function HomePage() {
return "Hello, World!"
}