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
14 changes: 14 additions & 0 deletions app/rgpv/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Breadcrumbs } from "@/components/breadcrumbs";

export default function RGPVLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<Breadcrumbs />
{children}
</>
);
}
63 changes: 63 additions & 0 deletions components/breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
"use client";

import Link from "next/link";
import { usePathname } from "next/navigation";
import { ChevronRight, Home } from "lucide-react";

export function Breadcrumbs() {
const pathname = usePathname();
const pathNames = pathname.split("/").filter((path) => path);

if (pathNames.length <= 1) {
return null;
}

return (
<div className="mx-auto w-full max-w-7xl px-6 lg:px-8">
<nav aria-label="breadcrumb" className="py-4">
<ol className="flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground">
<li>
<Link
href="/"
className="flex items-center transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded"
aria-label="Home"
>
<Home className="h-4 w-4" />
</Link>
</li>
{pathNames.length > 0 && <ChevronRight className="h-4 w-4" />}
Comment on lines +18 to +28

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep <ol> children limited to <li> elements.

Line 28 inserts the separator directly under the ordered list, which produces invalid list markup and weakens breadcrumb semantics for assistive tech. Wrap that separator in an <li aria-hidden="true"> (or move separators inside adjacent list items) so every direct child of <ol> is an <li>.

Proposed fix
         <ol className="flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground">
           <li>
             <Link
               href="/"
               className="flex items-center transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded"
               aria-label="Home"
             >
               <Home className="h-4 w-4" />
             </Link>
           </li>
-          {pathNames.length > 0 && <ChevronRight className="h-4 w-4" />}
+          {pathNames.length > 0 && (
+            <li aria-hidden="true">
+              <ChevronRight className="h-4 w-4" />
+            </li>
+          )}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<ol className="flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground">
<li>
<Link
href="/"
className="flex items-center transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded"
aria-label="Home"
>
<Home className="h-4 w-4" />
</Link>
</li>
{pathNames.length > 0 && <ChevronRight className="h-4 w-4" />}
<ol className="flex flex-wrap items-center gap-1.5 text-sm text-muted-foreground">
<li>
<Link
href="/"
className="flex items-center transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded"
aria-label="Home"
>
<Home className="h-4 w-4" />
</Link>
</li>
{pathNames.length > 0 && (
<li aria-hidden="true">
<ChevronRight className="h-4 w-4" />
</li>
)}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/breadcrumbs.tsx` around lines 18 - 28, The breadcrumbs markup in
Breadcrumbs is invalid because the ChevronRight separator is rendered directly
as a child of the <ol> instead of inside an <li>. Update the Breadcrumbs
component so every direct child of the ordered list is an <li>, and place the
separator in an <li aria-hidden="true"> or move it into adjacent list items
while preserving the current visual layout.

{pathNames.map((link, index) => {
const href = `/${pathNames.slice(0, index + 1).join("/")}`;
const isLast = index === pathNames.length - 1;
const label = decodeURIComponent(link)
.replace(/-/g, " ")
.replace(/\b\w/g, (char) => char.toUpperCase());

return (
<li key={href} className="flex items-center gap-1.5">
{isLast ? (
<span
className="font-medium text-foreground"
aria-current="page"
>
{label}
</span>
) : (
<>
<Link
href={href}
className="transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 rounded"
>
{label}
</Link>
<ChevronRight className="h-4 w-4" />
</>
)}
</li>
);
})}
</ol>
</nav>
</div>
);
}
14 changes: 7 additions & 7 deletions components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function Footer() {
<ul className="space-y-2.5">
<li>
<Link
href="/subjects"
href="/rgpv"
className="text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
Subjects
Expand All @@ -65,7 +65,7 @@ export default function Footer() {

<li>
<Link
href="/universities"
href="/#Universities"
className="text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
Universities
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function Footer() {
<ul className="space-y-2.5">
<li>
<Link
href="/subjects"
href="/rgpv"
className="flex items-center gap-2 text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
<BookOpen className="h-4 w-4" />
Expand All @@ -111,7 +111,7 @@ export default function Footer() {

<li>
<Link
href="/subjects"
href="/rgpv"
className="flex items-center gap-2 text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
<GraduationCap className="h-4 w-4" />
Expand All @@ -121,7 +121,7 @@ export default function Footer() {

<li>
<Link
href="/subjects"
href="/rgpv"
className="text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
AI Tutor
Expand All @@ -130,7 +130,7 @@ export default function Footer() {

<li>
<Link
href="/subjects"
href="/rgpv"
className="text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
Syllabus
Expand Down Expand Up @@ -177,7 +177,7 @@ export default function Footer() {

<li>
<Link
href="/privacy"
href="/"
className="text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
Privacy
Comment on lines 178 to 183

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Restore the privacy-policy destination.

Line 180 now sends Privacy to /, which breaks the label-to-page contract and makes the privacy notice harder to find. Keep this pointed at the privacy policy route, or rename/remove the item if that page no longer exists.

Suggested fix
               <li>
                 <Link
-                  href="/"
+                  href="/privacy"
                   className="text-sm text-[`#AFC8FF`]/70 transition-colors hover:text-white"
                 >
                   Privacy
                 </Link>
               </li>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<li>
<Link
href="/privacy"
href="/"
className="text-sm text-[#AFC8FF]/70 transition-colors hover:text-white"
>
Privacy
<li>
<Link
href="/privacy"
className="text-sm text-[`#AFC8FF`]/70 transition-colors hover:text-white"
>
Privacy
</Link>
</li>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/footer.tsx` around lines 178 - 183, The Footer privacy link is
currently pointing to the homepage instead of the privacy policy route, breaking
the expected destination for the Privacy item. Update the Link in Footer so the
Privacy label routes to the privacy policy page again, or remove/rename the item
if that page no longer exists; use the Footer component and its Link entry to
locate the change.

Expand Down
1 change: 1 addition & 0 deletions features/landing/universities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default function Universities() {

const filteredUniversities = universities.filter((uni) => {
const query = searchQuery.trim().toLowerCase();
if (!query) return true;
return (
uni.name.toLowerCase().includes(query) ||
uni.fullName.toLowerCase().includes(query) ||
Expand Down
Loading