added splash page

This commit is contained in:
makearmy 2025-09-30 22:38:25 -04:00
parent 41614a96cd
commit 6abe450f1d
2 changed files with 66 additions and 141 deletions

View file

@ -1,129 +1,41 @@
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import Link from "next/link";
// app/page.tsx
import { cookies } from "next/headers";
import { redirect } from "next/navigation";
import SignIn from "@/app/auth/sign-in/sign-in";
import SignUp from "@/app/auth/sign-up/sign-up";
export default async function HomePage() {
// If already signed in, go straight to the app
const ck = await cookies();
const at = ck.get("ma_at")?.value;
if (at) redirect("/portal");
export default function Home() {
return (
<main className="min-h-screen p-8 bg-background text-foreground">
<h1 className="text-3xl font-bold mb-6">Laser Everything Community Database</h1>
<main className="mx-auto max-w-5xl px-4 py-12">
<section className="mb-10 text-center">
<h1 className="text-3xl font-bold tracking-tight">MakeArmy</h1>
<p className="mt-2 text-base text-muted-foreground">
Free to use. Manage laser rigs, settings, and projectsall in one place.
</p>
</section>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">Fiber Laser Settings</h2>
<p className="mb-4 text-sm text-muted-foreground">
Browse and submit settings for fiber laser engraving.
</p>
<Link href="/fiber-settings">
<Button>View Settings</Button>
</Link>
</CardContent>
</Card>
<section className="grid gap-6 md:grid-cols-2">
<div className="rounded-lg border p-6">
<h2 className="mb-3 text-lg font-semibold">Create an account</h2>
{/* Uses your existing sign-up component */}
<SignUp nextPath="/portal" />
</div>
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">CO2 Galvo Settings</h2>
<p className="mb-4 text-sm text-muted-foreground">
Settings for CO2 Galvo laser machines.
</p>
<Link href="/co2-galvo-settings">
<Button>View Settings</Button>
</Link>
</CardContent>
</Card>
<div className="rounded-lg border p-6">
<h2 className="mb-3 text-lg font-semibold">Sign in</h2>
{/* Uses your existing sign-in component */}
<SignIn nextPath="/portal" reauth={false} />
</div>
</section>
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">CO2 Gantry Settings</h2>
<p className="mb-4 text-sm text-muted-foreground">
Settings for CO2 Gantry laser systems.
</p>
<Link href="/co2-gantry-settings">
<Button>View Settings</Button>
</Link>
</CardContent>
</Card>
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">UV Laser Settings</h2>
<p className="mb-4 text-sm text-muted-foreground">
Settings for UV laser engraving and marking.
</p>
<Link href="/uv-settings">
<Button>View Settings</Button>
</Link>
</CardContent>
</Card>
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">Materials and Coatings</h2>
<p className="mb-4 text-sm text-muted-foreground">
Explore materials and surface coatings along with their laser safety classifications.
</p>
<div className="flex flex-col sm:flex-row gap-2">
<Link href="/materials">
<Button className="w-full sm:w-auto">View Materials</Button>
</Link>
<Link href="/materials-coatings">
<Button className="w-full sm:w-auto">View Coatings</Button>
</Link>
</div>
</CardContent>
</Card>
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">Laser Source Database</h2>
<p className="mb-4 text-sm text-muted-foreground">
Technical specs and info on various laser sources.
</p>
<Link href="/lasers">
<Button>View Sources</Button>
</Link>
</CardContent>
</Card>
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">Projects Database</h2>
<p className="mb-4 text-sm text-muted-foreground">
Community-submitted projects and guides.
</p>
<Link href="/projects">
<Button>View Projects</Button>
</Link>
</CardContent>
</Card>
{/* 🔽 NEW FILE DOWNLOAD SECTION 🔽 */}
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">Downloadable Files</h2>
<p className="mb-4 text-sm text-muted-foreground">
Browse and download shared files from the server.
</p>
<Link href="/files">
<Button>View Files</Button>
</Link>
</CardContent>
</Card>
{/* 🔽 NEW BUYING GUIDE CARD 🔽 */}
<Card>
<CardContent className="p-6">
<h2 className="text-xl font-semibold mb-2">Buying Guide</h2>
<p className="mb-4 text-sm text-muted-foreground">
Reviews and recommendations for laser products and accessories.
</p>
<Link href="/buying-guide">
<Button>View Guide</Button>
</Link>
</CardContent>
</Card>
</div>
<section className="mt-8 text-center text-xs text-muted-foreground">
We only use cookies strictly necessary to operate the site (e.g., your sign-in session).
</section>
</main>
);
}