@@ -7,11 +7,8 @@ import {
77} from "@/components/ui/card" ;
88import { Badge } from "@/components/ui/badge" ;
99import Link from "next/link" ;
10- import { ModeToggle } from "@/components/toggle-theme" ;
11- import Logo from "@/components/logo" ;
1210import { getBranches } from "@/lib/api/branch" ;
13- import { Tooltip , TooltipContent , TooltipProvider , TooltipTrigger } from "@/components/ui/tooltip" ;
14- import TelegramIcon from "@/components/telegram" ;
11+ import { HomeHeader } from "@/components/home-header" ;
1512
1613
1714export const revalidate = 86400 ; // 24h ISR
@@ -36,32 +33,7 @@ export default async function Home() {
3633
3734
3835 { /* Fixed Logo in Top-Left Corner */ }
39- < div className = "absolute top-4 px-4 flex flex-row justify-between w-full z-10" >
40- < Link href = "/" className = "flex items-center gap-2 font-semibold" >
41- < Logo />
42- < span > Learnverse</ span >
43- </ Link >
44-
45- < div className = "flex items-center gap-2" >
46- < TooltipProvider >
47- < Tooltip delayDuration = { 0 } >
48- < TooltipTrigger asChild >
49- < Link
50- href = "https://t.me/+oxCuF0R1UIwwYTY1"
51- target = "_blank"
52- rel = "noopener noreferrer"
53- className = "flex h-9 w-9 items-center justify-center"
54- >
55- < TelegramIcon className = "h-5 w-5" />
56- < span className = "sr-only" > Join Telegram channel</ span >
57- </ Link >
58- </ TooltipTrigger >
59- < TooltipContent > Join Telegram channel</ TooltipContent >
60- </ Tooltip >
61- </ TooltipProvider >
62- < ModeToggle />
63- </ div >
64- </ div >
36+ < HomeHeader />
6537
6638 < div className = "container max-w-4xl text-center" >
6739 < h1 className = "text-4xl font-bold tracking-tight text-foreground sm:text-5xl md:text-6xl" >
@@ -78,19 +50,19 @@ export default async function Home() {
7850
7951
8052 { /* Clickable Year Cards */ }
81- < div className = "mt-12 grid grid-cols-1 gap-4 sm:grid-cols-3" >
53+ < div className = "mt-8 grid grid-cols-1 gap-3 sm:mt-12 sm: grid-cols-3 sm:gap-4 " >
8254 { branches . map ( ( branch , index ) => (
83- < Link href = { `/academics` } key = { branch . _id } >
84- < Card className = "group h-full transform transition-transform duration-200 hover:-translate-y-1 hover:border-primary/60" >
85- < CardHeader >
55+ < Link href = { `/academics` } key = { branch . _id } className = "w-full" >
56+ < Card className = "group h-full transform transition-transform duration-200 hover:-translate-y-1 hover:border-primary/60 p-2 sm:p-0 " >
57+ < CardHeader className = "p-4 sm:p-6" >
8658 < div className = "flex items-center justify-between" >
87- < div className = "flex items-center gap-3" >
88- < GraduationCap className = "h-5 w-5 text-muted-foreground group-hover:text-primary" />
89- < CardTitle className = "text-lg" > { branch . code } </ CardTitle >
59+ < div className = "flex items-center gap-2 sm:gap- 3" >
60+ < GraduationCap className = "h-4 w-4 sm:h-5 sm: w-5 text-muted-foreground group-hover:text-primary" />
61+ < CardTitle className = "text-base sm:text- lg" > { branch . code } </ CardTitle >
9062 </ div >
91- < ArrowRight className = "h-5 w-5 text-muted-foreground opacity-0 transition-opacity duration-300 group-hover:opacity-100" />
63+ < ArrowRight className = "h-4 w-4 sm:h-5 sm: w-5 text-muted-foreground opacity-0 transition-opacity duration-300 group-hover:opacity-100" />
9264 </ div >
93- < CardDescription className = "pt-2 text-left" >
65+ < CardDescription className = "pt-1 sm:pt- 2 text-left text-xs sm:text-sm " >
9466 { branch . name . toLowerCase ( ) + " - " + descriptions [ index ] }
9567 </ CardDescription >
9668 </ CardHeader >
@@ -103,17 +75,18 @@ export default async function Home() {
10375
10476
10577 { /* Subtle Footer with Core Offerings */ }
106- < div className = "mt-8 flex justify-center gap-x-4" >
107- < Badge variant = "secondary" >
108- < BadgeCheckIcon />
78+ { /*hide this for mobile screens */ }
79+ < div className = "mt-8 flex flex-row items-center justify-center gap-2 sm:flex-row sm:gap-x-4 hidden md:block" >
80+ < Badge variant = "secondary" className = "px-3 py-1 text-xs font-medium sm:text-sm" >
81+ < BadgeCheckIcon className = "mr-1 h-3 w-3 sm:h-4 sm:w-4" />
10982 Comprehensive Notes
11083 </ Badge >
111- < Badge variant = "secondary" >
112- < BadgeCheckIcon />
84+ < Badge variant = "secondary" className = "px-3 py-1 text-xs font-medium sm:text-sm" >
85+ < BadgeCheckIcon className = "mr-1 h-3 w-3 sm:h-4 sm:w-4" />
11386 Past Exam Papers
11487 </ Badge >
115- < Badge variant = "secondary" >
116- < BadgeCheckIcon />
88+ < Badge variant = "secondary" className = "px-3 py-1 text-xs font-medium sm:text-sm" >
89+ < BadgeCheckIcon className = "mr-1 h-3 w-3 sm:h-4 sm:w-4" />
11790 Reference Books
11891 </ Badge >
11992 </ div >
0 commit comments