Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions app/(public)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,30 @@ import AIDemo from "@/features/landing/ai-demo";
import Universities from "@/features/landing/universities";
import Testimonials from "@/features/landing/testimonials";
import FAQ from "@/features/landing/faq";
import { Suspense } from "react";

export default function HomePage() {
return (
<>
<Hero />
<Stats />
<Features />
<AIDemo />
<Universities />
<Testimonials />
<FAQ />
<Suspense fallback={<div className="h-40" />}>
<Stats />
</Suspense>
<Suspense fallback={<div className="h-96" />}>
<Features />
</Suspense>
<Suspense fallback={<div className="h-96" />}>
<AIDemo />
</Suspense>
<Suspense fallback={<div className="h-96" />}>
<Universities />
</Suspense>
<Suspense fallback={<div className="h-96" />}>
<Testimonials />
</Suspense>
<Suspense fallback={<div className="h-96" />}>
<FAQ />
</Suspense>
</>
);
}
34 changes: 34 additions & 0 deletions app/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"use client";

import { useEffect } from "react";
import { AlertCircle } from "lucide-react";

export default function ErrorPage({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
useEffect(() => {
console.error(error);
}, [error]);

return (
<div className="flex min-h-[70vh] flex-col items-center justify-center p-6 text-center">
<div className="mb-6 rounded-full bg-red-500/10 p-4">
<AlertCircle className="h-10 w-10 text-red-500" />
</div>
<h2 className="text-2xl font-bold">Something went wrong!</h2>
<p className="mt-2 max-w-md text-muted-foreground">
We&apos;ve encountered an unexpected error. Please try again.
</p>
<button
onClick={() => reset()}
className="mt-6 rounded-xl bg-blue-600 px-6 py-3 font-semibold text-white transition hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500/20"
>
Try Again
</button>
</div>
);
}
22 changes: 22 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,26 @@
background-color: hsl(var(--background));
color: hsl(var(--foreground));
}

/* Global Focus Visible */
*:focus-visible {
outline: 2px solid hsl(var(--ring));
outline-offset: 2px;
}
}

/* Custom Scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: hsl(var(--background));
}
::-webkit-scrollbar-thumb {
background: hsl(var(--border));
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: hsl(var(--muted-foreground));
}
12 changes: 10 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,23 @@ export default function RootLayout({
}) {
return (
<html lang="en" suppressHydrationWarning>
<body>
<body className="flex min-h-[100dvh] flex-col overflow-x-hidden">
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<a
href="#main-content"
className="sr-only focus:not-sr-only focus:absolute focus:z-[100] focus:top-4 focus:left-4 focus:rounded-md focus:bg-blue-600 focus:px-4 focus:py-2 focus:text-white focus:font-semibold"
>
Skip to content
</a>
<Navbar />
{children}
<main id="main-content" className="flex-1" tabIndex={-1}>
{children}
</main>
<Footer />
</ThemeProvider>
</body>
Expand Down
3 changes: 1 addition & 2 deletions app/rgpv/[branch]/[semester]/[subject]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Link from "next/link";
import { ArrowRight, BookOpen, FileText } from "lucide-react";

import { getSyllabus } from "@/lib/content/syllabus";
import { getPYQs } from "@/lib/content/pyqs";
import { getSyllabus, getPYQs } from "@/lib/content";

interface SubjectPageProps {
params: Promise<{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { notFound } from "next/navigation";
import { FileText, Calendar, Clock } from "lucide-react";
import { getPYQs } from "@/lib/content/pyqs";
import { getPYQs } from "@/lib/content";
import GenerateAnswerButton from "@/components/ai/generate-answer-button";

interface PaperPageProps {
Expand Down
3 changes: 1 addition & 2 deletions app/rgpv/[branch]/[semester]/[subject]/syllabus/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { BookOpen } from "lucide-react";

import { getSyllabus } from "@/lib/content/syllabus";
import { getPYQs } from "@/lib/content/pyqs";
import { getSyllabus, getPYQs } from "@/lib/content";
import { getQuestionsForModule } from "@/lib/content/question-mapper";
import ModuleCard from "@/components/syllabus/module-card";

Expand Down
7 changes: 7 additions & 0 deletions app/rgpv/[branch]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import SemesterOverview from "@/components/university/semester-overview";
import { branches } from "@/lib/data/branches";

export function generateStaticParams() {
return branches.map((branch) => ({
branch: branch.id,
}));
}

interface BranchPageProps {
params: Promise<{
Expand Down
Loading