File tree Expand file tree Collapse file tree 5 files changed +18
-52
lines changed
Expand file tree Collapse file tree 5 files changed +18
-52
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { Button } from "./ui/button";
33import { ExternalLink } from "lucide-react" ;
44import { Github as GithubIcon } from "./icons/Github" ;
55import { ZoteroFeed } from "@/app/components/ZoteroFeed" ;
6- import { ExternalFrame } from "./ExternalFrame" ;
76
87export function Hero ( ) {
98 const categories : { title : string ; desc : string ; href : string } [ ] = [
@@ -28,11 +27,19 @@ export function Hero() {
2827 < section className = "relative" >
2928 < div className = "container mx-auto px-6 pt-12 pb-0 text-center" >
3029 < div className = "relative mx-auto max-w-5xl mt-12" >
31- < img
32- src = "/mascot.svg"
33- alt = "Mascot"
34- className = "mx-auto h-[25vh] w-auto object-contain"
35- />
30+ < picture >
31+ < source srcSet = "/mascot.webp" type = "image/webp" />
32+ < source srcSet = "/mascot.png" type = "image/png" />
33+ < img
34+ src = "/mascot.webp"
35+ alt = "Mascot"
36+ className = "mx-auto h-[25vh] w-auto object-contain"
37+ loading = "eager"
38+ fetchPriority = "high"
39+ width = "420"
40+ height = "400"
41+ />
42+ </ picture >
3643 < h1 className = "pointer-events-none select-none text-4xl md:text-6xl font-semibold leading-tight bg-gradient-primary bg-clip-text text-transparent" >
3744 内卷地狱
3845 </ h1 >
@@ -68,7 +75,7 @@ export function Hero() {
6875 < li key = { c . title } className = "h-full" >
6976 < Link
7077 href = { c . href }
71- className = "flex border border-border p-5 hover:bg-accent transition-colors h-full flex flex -col"
78+ className = "flex border border-border p-5 hover:bg-accent transition-colors h-full flex-col"
7279 >
7380 < div className = "text-lg font-semibold" > { c . title } </ div >
7481 < p className = "mt-1 text-sm text-muted-foreground flex-1" >
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ export default function RootLayout({
2828} > ) {
2929 return (
3030 < html lang = "en" suppressHydrationWarning >
31+ < head >
32+ < link rel = "preload" href = "/mascot.webp" as = "image" type = "image/webp" />
33+ < link rel = "preload" href = "/mascot.png" as = "image" type = "image/png" />
34+ </ head >
3135 < body
3236 suppressHydrationWarning
3337 className = { `${ geistSans . variable } ${ geistMono . variable } antialiased` }
You can’t perform that action at this time.
0 commit comments