Skip to content

Commit eb674c5

Browse files
committed
epic new breadcrumb
1 parent e6e1673 commit eb674c5

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed

frontend/src/components/About/AboutHomepage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Link from "next/link";
21
import Image from "next/image";
2+
33
export default function AboutHomePage() {
44
return (
55
<section className="py-8 xl:px-24 sm:px-10 px-5" id="about">

frontend/src/components/About/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const About = () => {
5858
<div className="p-5 border border-[#595F6D] flex-1 rounded-lg mr-5 w-full sm:mb-0 mb-5">
5959
<div className="flex text-[#3A76F8]">
6060
<Image src="/assets/book_icon.svg" alt="Book" width={20} height={20} className="mr-2" />
61-
<Link href="/about/execs-directors-subcommittees">
61+
<Link href="/about/execs-directors-subcoms">
6262
<span className="font-semibold hover:underline">execs-directors-subcoms</span>
6363
</Link>
6464
</div>

frontend/src/components/Navbar.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { useEffect, useState } from 'react';
44
import Hamburger from './Hamburger';
55

66
const Navbar = () => {
7-
const [path, setPath] = useState<string>('');
7+
const [path, setPath] = useState<string[]>([]);
88
useEffect(() => {
9-
const item: string | undefined = window.location.href.split('/').pop();
10-
if (item == '' || item == undefined) setPath('HOME');
11-
else setPath(item.toUpperCase());
9+
const pathSegments: string[] | undefined = window.location.pathname.split('/').filter(segment => segment);
10+
if (pathSegments === undefined) setPath([]);
11+
else setPath(pathSegments.map(segment => segment.toUpperCase()));
1212
}, []);
1313

1414
return (
@@ -21,7 +21,13 @@ const Navbar = () => {
2121
height={200}
2222
draggable={false}
2323
/>
24-
<p className="mt-3 text-xs">C:\INTERNAL STRUCTURE\{path}</p>
24+
<p className="font-mono mt-3 text-s font-bold">
25+
<span className="text-green-500">csesoc@unsw</span>
26+
<span>:</span>
27+
<span className="text-blue-500">~{path.map(segment => '/' + segment.toLowerCase())}</span>
28+
<span>$ </span>
29+
<span id="cursor" className="text-gray-400 inline-block animate-blink">_</span>
30+
</p>
2531
</Link>
2632
<div>
2733
<div className="md:flex xl:gap-18 lg:gap-10 md:gap-5 text-right font-bold hidden">
@@ -44,7 +50,7 @@ const Navbar = () => {
4450
<div className="md:hidden xl:hidden lg:hidden text-right font-bold block">
4551
<Hamburger />
4652
</div>
47-
</div>
53+
</div>
4854
</nav>
4955
);
5056
};

frontend/src/pages/about/execs-directors-subcommittees.tsx renamed to frontend/src/pages/about/execs-directors-subcoms.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const ExecsDirectorsSubcommittees = () => {
55
return (
66
<section className="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden">
77
<Navbar />
8-
<section className="py-8 xl:px-24 sm:px-10 px-5" id="execs-directors-subcommitees">
8+
<section className="py-8 xl:px-24 sm:px-10 px-5" id="execs-directors-subcommittees">
99
<div className="text-center my-10">
10-
<h1 className="font-bold text-6xl">EXECS, DIRECTORS & SUBCOMMITEES</h1>
10+
<h1 className="font-bold text-6xl">EXECS, DIRECTORS & SUBCOMMITTEES</h1>
1111
</div>
1212

1313
{/* CSESOC TEAM */}

frontend/src/styles/globals.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ body {
1111
background: #000031;
1212
font-family: 'Raleway', sans-serif;
1313
}
14+
15+
@keyframes blink {
16+
50% {
17+
opacity: 0;
18+
}
19+
}
20+
21+
.animate-blink {
22+
animation: blink 1s step-end infinite;
23+
}

0 commit comments

Comments
 (0)