Redesign homepage with floating top bar and shimmer hero
Turn the top bar into a floating pill, add the shimmer behind the hero, show the server status chip, and rename Support to Donate. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5db51ca156
commit
cd51ea3c1b
2 changed files with 20 additions and 7 deletions
|
|
@ -1,25 +1,38 @@
|
||||||
"use client";
|
"use client";
|
||||||
import localFont from "next/font/local";
|
import localFont from "next/font/local";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useState } from "react";
|
import { useRef, useState } from "react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { TopBar } from "@/components/top-bar";
|
import { TopBar } from "@/components/top-bar";
|
||||||
import { PlayDialog } from "@/components/play-dialog";
|
import { PlayDialog } from "@/components/play-dialog";
|
||||||
|
import { ServerStatusChip } from "@/components/server-status-chip";
|
||||||
|
import { GradientShimmer, type GradientShimmerHandle } from "@/components/gradient-shimmer";
|
||||||
|
|
||||||
const makeSans = localFont({ src: "../../public/font/makesans.ttf" });
|
const makeSans = localFont({ src: "../../public/font/makesans.ttf" });
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const [playOpen, setPlayOpen] = useState(false);
|
const [playOpen, setPlayOpen] = useState(false);
|
||||||
|
const shimmerRef = useRef<GradientShimmerHandle>(null);
|
||||||
return (
|
return (
|
||||||
<main className="min-h-screen bg-background text-foreground flex flex-col font-mona">
|
<main className="min-h-screen bg-background text-foreground flex flex-col font-mona">
|
||||||
<TopBar />
|
<TopBar />
|
||||||
<div className="flex-1 flex items-center justify-center px-6 py-16">
|
<div className="relative flex-1 flex items-center justify-center overflow-hidden px-6 py-16">
|
||||||
<div className="text-center space-y-4 max-w-lg">
|
<GradientShimmer ref={shimmerRef} className="absolute inset-0 [mask-image:radial-gradient(ellipse_at_center,black_20%,transparent_75%)]" />
|
||||||
|
<div className="relative text-center space-y-4 max-w-lg">
|
||||||
|
<div className="flex justify-center">
|
||||||
|
<ServerStatusChip />
|
||||||
|
</div>
|
||||||
<h1 className={`${makeSans.className} text-4xl md:text-5xl font-extrabold lowercase text-primary tracking-tight leading-none`}>FRG Network</h1>
|
<h1 className={`${makeSans.className} text-4xl md:text-5xl font-extrabold lowercase text-primary tracking-tight leading-none`}>FRG Network</h1>
|
||||||
<p className="text-sm leading-relaxed text-muted-foreground max-w-md mx-auto">A small and fun Minecraft server and surrounding community.</p>
|
<p className="text-sm leading-relaxed text-muted-foreground max-w-md mx-auto">A small and fun Minecraft server and surrounding community.</p>
|
||||||
<div className="pt-1 flex justify-center gap-3">
|
<div className="pt-1 flex justify-center gap-3">
|
||||||
<Button size="lg" onClick={() => setPlayOpen(true)}>Play</Button>
|
<Button
|
||||||
<Button size="lg" variant="outline" asChild><Link href="/donate">Support</Link></Button>
|
size="lg"
|
||||||
|
onClick={() => setPlayOpen(true)}
|
||||||
|
onMouseEnter={() => shimmerRef.current?.emphasize()}
|
||||||
|
>
|
||||||
|
Play
|
||||||
|
</Button>
|
||||||
|
<Button size="lg" variant="outline" asChild><Link href="/donate">Donate</Link></Button>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-xs text-muted-foreground/70">Java & Bedrock · frg.network</p>
|
<p className="text-xs text-muted-foreground/70">Java & Bedrock · frg.network</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ const makeSans = localFont({ src: "../../public/font/makesans.ttf" });
|
||||||
|
|
||||||
export function TopBar() {
|
export function TopBar() {
|
||||||
return (
|
return (
|
||||||
<header className="sticky top-0 z-10 w-full backdrop-blur supports-backdrop-filter:bg-background/80 bg-background/80 border-b border-border">
|
<header className="sticky top-0 z-10 w-full px-4 pt-3">
|
||||||
<div className="mx-auto max-w-5xl flex items-center justify-between px-4 py-2.5 text-sm">
|
<div className="mx-auto max-w-5xl flex items-center justify-between rounded-full border border-border bg-background/70 backdrop-blur-md supports-backdrop-filter:bg-background/60 shadow-xl shadow-black/30 pl-5 pr-2 py-2 text-sm">
|
||||||
<Link href="/" className={`${makeSans.className} font-extrabold lowercase text-primary text-base tracking-tight`}>FRG Network</Link>
|
<Link href="/" className={`${makeSans.className} font-extrabold lowercase text-primary text-base tracking-tight`}>FRG Network</Link>
|
||||||
<nav className="flex items-center gap-4">
|
<nav className="flex items-center gap-4">
|
||||||
<Link href="/donate" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">Donate</Link>
|
<Link href="/donate" className="text-sm font-medium text-muted-foreground hover:text-foreground transition-colors">Donate</Link>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue