eny.space Landingpage

feat(app): update layout to use new font styles and improve body class structure

Changed files
+39 -21
app
+19 -14
app/components/ui/button.tsx
··· 1 - import * as React from "react" 2 - import { cva, type VariantProps } from "class-variance-authority" 3 - import { Slot } from "radix-ui" 1 + import * as React from "react"; 2 + import { cva, type VariantProps } from "class-variance-authority"; 3 + import { Slot } from "radix-ui"; 4 4 5 - import { cn } from "@/lib/utils" 5 + import { cn } from "@/lib/utils"; 6 6 7 7 const buttonVariants = cva( 8 8 "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-none border border-transparent bg-clip-padding text-xs font-medium focus-visible:ring-1 aria-invalid:ring-1 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none", ··· 10 10 variants: { 11 11 variant: { 12 12 default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80", 13 - outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground", 14 - secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground", 15 - ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground", 16 - destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30", 13 + outline: 14 + "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground", 15 + secondary: 16 + "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground", 17 + ghost: 18 + "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground", 19 + destructive: 20 + "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30", 17 21 link: "text-primary underline-offset-4 hover:underline", 18 22 }, 19 23 size: { 20 - default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", 24 + default: 25 + "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", 21 26 xs: "h-6 gap-1 rounded-none px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3", 22 27 sm: "h-7 gap-1 rounded-none px-2.5 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5", 23 28 lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3", ··· 32 37 size: "default", 33 38 }, 34 39 } 35 - ) 40 + ); 36 41 37 42 function Button({ 38 43 className, ··· 42 47 ...props 43 48 }: React.ComponentProps<"button"> & 44 49 VariantProps<typeof buttonVariants> & { 45 - asChild?: boolean 50 + asChild?: boolean; 46 51 }) { 47 - const Comp = asChild ? Slot.Root : "button" 52 + const Comp = asChild ? Slot.Root : "button"; 48 53 49 54 return ( 50 55 <Comp ··· 54 59 className={cn(buttonVariants({ variant, size, className }))} 55 60 {...props} 56 61 /> 57 - ) 62 + ); 58 63 } 59 64 60 - export { Button, buttonVariants } 65 + export { Button, buttonVariants };
-1
app/globals.css
··· 129 129 overflow-y: scroll; 130 130 } 131 131 } 132 -
+20 -6
app/layout.tsx
··· 1 1 import type { Metadata } from "next"; 2 2 import { SpeedInsights } from "@vercel/speed-insights/next"; 3 3 import { Analytics } from "@vercel/analytics/next"; 4 - import { Space_Grotesk } from "next/font/google"; 4 + import { Geist, Geist_Mono, JetBrains_Mono } from "next/font/google"; 5 5 6 6 import "./globals.css"; 7 7 8 - const fontSans = Space_Grotesk({ 8 + const jetbrainsMono = JetBrains_Mono({ 9 + subsets: ["latin"], 10 + variable: "--font-sans", 11 + }); 12 + 13 + const geistSans = Geist({ 14 + variable: "--font-geist-sans", 9 15 subsets: ["latin"], 10 - weight: ["400", "500", "600", "700"], 16 + }); 17 + 18 + const geistMono = Geist_Mono({ 19 + variable: "--font-geist-mono", 20 + subsets: ["latin"], 11 21 }); 12 22 13 23 interface LayoutProps { ··· 27 37 28 38 export default function RootLayout({ children }: LayoutProps) { 29 39 return ( 30 - <html lang="en" className="dark"> 31 - <body className={fontSans.className}> 40 + <html lang="en" className={`dark ${jetbrainsMono.variable}`}> 41 + <body 42 + className={`${geistSans.variable} ${geistMono.variable} antialiased`} 43 + > 32 44 <div className="max-w-[1280px] px-6 py-11 flex flex-row"> 33 45 <header className="relative flex-[0_0_250px] pr-12"> 34 46 <div className="sticky top-11"> 35 - <h1 className="font-semibold text-foreground my-1.5 text-[27px] leading-8">eny.space</h1> 47 + <h1 className="font-semibold text-foreground my-1.5 text-[27px] leading-8"> 48 + eny.space 49 + </h1> 36 50 </div> 37 51 </header> 38 52 {children}