Skip to content
This repository was archived by the owner on May 4, 2025. It is now read-only.

Commit e7f8575

Browse files
committed
Added Foss branding
1 parent 7ff47d9 commit e7f8575

File tree

8 files changed

+248
-32
lines changed

8 files changed

+248
-32
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="preconnect" href="https://fonts.googleapis.com" />
88
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
99
<link
10-
href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&display=swap"
10+
href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
1111
rel="stylesheet"
1212
/>
1313
<title>Breakpoint;</title>

public/foss-icon-black.svg

Lines changed: 6 additions & 0 deletions
Loading

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import Footer from "./components/footer";
2+
import Header from "./components/header";
23
import Intro from "./components/intro";
34
import ProjectsPage from "./components/projectsPage";
45

56
const ProjectShowcase = () => {
67
return (
78
<div className="relative">
89
<Intro />
10+
<Header />
911
<ProjectsPage />
1012
<Footer />
1113
</div>

src/components/header.tsx

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
import React, { useState, useEffect } from "react";
2+
import { Link, useLocation } from "react-router-dom";
3+
4+
const Header: React.FC = () => {
5+
const [isMobile, setIsMobile] = useState<boolean>(false);
6+
const [sidebarOpen, setSidebarOpen] = useState<boolean>(false);
7+
const [sidebarClosing, setSidebarClosing] = useState<boolean>(false);
8+
const location = useLocation();
9+
10+
const linkToMainWebsite =
11+
"https://foss-cell-gecpkd.github.io/FOSS_GECPKD_Website/";
12+
13+
useEffect(() => {
14+
const checkIfMobile = (): void => {
15+
setIsMobile(window.innerWidth < 768);
16+
};
17+
18+
// Initial check
19+
checkIfMobile();
20+
21+
// Add event listener for window resize
22+
window.addEventListener("resize", checkIfMobile);
23+
24+
// Clean up
25+
return () => {
26+
window.removeEventListener("resize", checkIfMobile);
27+
};
28+
}, []);
29+
30+
// Handle sidebar toggling with animation
31+
const toggleSidebar = (): void => {
32+
if (sidebarOpen) {
33+
setSidebarClosing(true);
34+
35+
setTimeout(() => {
36+
setSidebarOpen(false);
37+
setSidebarClosing(false);
38+
}, 300); // This should match your animation duration
39+
} else {
40+
setSidebarOpen(true);
41+
}
42+
};
43+
return (
44+
<>
45+
{/* Mobile Header */}
46+
{isMobile && (
47+
<div className="flex justify-between items-center p-2.5">
48+
<div
49+
className="flex items-center ml-2.5"
50+
onClick={() => window.open(linkToMainWebsite, "_blank")}
51+
>
52+
<img
53+
src="/Breakpoint/foss-icon-black.svg"
54+
alt="FOSS Club Logo"
55+
className="h-10 mr-2.5"
56+
/>
57+
<div className="flex flex-col justify-center">
58+
<h1 className="m-0 text-base font-bold">FOSS Club</h1>
59+
<p className="m-0 text-xs opacity-80">GEC, Palakkad</p>
60+
</div>
61+
</div>
62+
<button
63+
onClick={toggleSidebar}
64+
className="border-none bg-transparent cursor-pointer mt-2.5"
65+
style={{ WebkitTapHighlightColor: "transparent" }}
66+
>
67+
<svg
68+
xmlns="http://www.w3.org/2000/svg"
69+
width="28"
70+
height="21"
71+
viewBox="0 0 28 21"
72+
fill="none"
73+
>
74+
<path
75+
d="M0.263184 2.23792H27.3803M0.263184 10.4699H27.3803M0.263184 18.2177H27.3803"
76+
stroke="#787878"
77+
strokeWidth="3.87388"
78+
/>
79+
</svg>
80+
</button>
81+
</div>
82+
)}
83+
84+
{/* Desktop Header */}
85+
{!isMobile && (
86+
<nav
87+
className="flex justify-between items-center px-16 pt-16 w-full max-w-full mx-auto relative z-10"
88+
onClick={() => window.open(linkToMainWebsite, "_blank")}
89+
>
90+
<div className="flex items-center">
91+
<img
92+
src="/Breakpoint/foss-icon-black.svg"
93+
alt="FOSS Club Logo"
94+
className="w-12 h-12 mr-2.5"
95+
/>
96+
<div>
97+
<h1 className="m-0 text-lg font-bold">FOSS Club</h1>
98+
<p className="m-0 text-sm opacity-80">GEC, Palakkad</p>
99+
</div>
100+
</div>
101+
<div className="flex gap-8 font-['Poppins']">
102+
<a
103+
href={linkToMainWebsite}
104+
className="text-black no-underline text-base opacity-80 transition-all hover:opacity-100 hover:text-[#0c81f6] font-['Poppins']"
105+
>
106+
Home
107+
</a>
108+
<Link
109+
to="/"
110+
className={`text-black no-underline text-base opacity-80 transition-all hover:opacity-100 hover:text-[#0c81f6] font-['Poppins'] ${
111+
location.pathname === "/"
112+
? ' opacity-100 relative after:content-[""] after:absolute after:bottom-[-5px] after:left-0 after:w-full after:rounded-3xl after:h-[3px] after:bg-[#0c81f6]'
113+
: ""
114+
}`}
115+
>
116+
Breakpoint
117+
</Link>
118+
{/* Commented out links */}
119+
{/*
120+
<Link to="/about" className={`nav-link ${location.pathname === '/about' ? 'active' : ''}`}>About</Link>
121+
<Link to="/team" className={`nav-link ${location.pathname === '/team' ? 'active' : ''}`}>Team</Link>
122+
<Link to="/gallery" className={`nav-link ${location.pathname === '/gallery' ? 'active' : ''}`}>Gallery</Link>
123+
*/}
124+
</div>
125+
</nav>
126+
)}
127+
128+
{/* Mobile Sidebar */}
129+
{sidebarOpen && (
130+
<div
131+
className={`fixed top-0 right-0 w-64 h-full bg-opacity-60 bg-white backdrop-blur-md flex flex-col p-5 z-50 ${
132+
sidebarClosing ? "animate-slideOutRight" : "animate-slideInRight"
133+
}`}
134+
style={{
135+
borderLeft: "1px solid rgba(255, 255, 255, 0.1)",
136+
boxShadow: "-5px 0 15px rgba(0, 0, 0, 0.1)",
137+
WebkitBackdropFilter: "blur(10px)",
138+
}}
139+
>
140+
<button
141+
onClick={toggleSidebar}
142+
className="bg-transparent border-0 text-black text-xl cursor-pointer self-end mb-5 opacity-80 transition-opacity hover:opacity-100"
143+
style={{ WebkitTapHighlightColor: "transparent" }}
144+
>
145+
146+
</button>
147+
<a
148+
href={linkToMainWebsite}
149+
className="py-3 px-4 text-black no-underline block text-lg mb-1 rounded-lg transition-all hover:bg-[rgba(12,129,246,0.8)] hover:text-black hover:translate-x-[-5px]"
150+
>
151+
Home
152+
</a>
153+
<Link
154+
to="/"
155+
className="py-3 px-4 text-black no-underline block text-lg mb-1 rounded-lg transition-all hover:bg-[rgba(12,129,246,0.8)] hover:text-black hover:translate-x-[-5px]"
156+
onClick={toggleSidebar}
157+
>
158+
Breakpoint
159+
</Link>
160+
{/* Commented out links */}
161+
{/*
162+
<Link to="/about" className="nav-link" onClick={toggleSidebar}>About</Link>
163+
<Link to="/team" className="nav-link" onClick={toggleSidebar}>Team</Link>
164+
<Link to="/gallery" className="nav-link" onClick={toggleSidebar}>Gallery</Link>
165+
*/}
166+
</div>
167+
)}
168+
</>
169+
);
170+
};
171+
172+
export default Header;

src/components/projectCard.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ interface ProjectCardProps {
2020

2121
const ProjectCard: React.FC<ProjectCardProps> = ({ project }) => {
2222
return (
23-
<a
24-
href={project.projectLink}
25-
className="bg-white border border-black rounded-md overflow-hidden hover:rotate-3 transition-transform"
23+
<div
24+
onClick={() => window.open(project.projectLink, "_blank")}
25+
className="bg-white border border-black rounded-md overflow-hidden hover:rotate-3 transition-transform cursor-pointer"
2626
>
2727
<img
2828
src={project.image}
@@ -42,7 +42,9 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ project }) => {
4242
)}
4343
</span>
4444
<p className="text-sm text-gray-600 mb-2">by {project.studentName}</p>
45-
<p className="line-clamp-3 text-gray-700 mb-4 max-h-24 overflow-hidden overflow-ellipsis">{project.description}</p>
45+
<p className="line-clamp-3 text-gray-700 mb-4 max-h-24 overflow-hidden overflow-ellipsis">
46+
{project.description}
47+
</p>
4648

4749
<div className="flex flex-wrap gap-2 mb-4">
4850
{project.tags.map((tag) => (
@@ -78,7 +80,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ project }) => {
7880
</a>
7981
</div>
8082
</div>
81-
</a>
83+
</div>
8284
);
8385
};
8486

src/components/projectsPage.tsx

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import { useState } from "react";
2-
import { Search, AlertCircle, Filter, HelpCircle, Blocks } from "lucide-react";
2+
import {
3+
Search,
4+
AlertCircle,
5+
Filter,
6+
HelpCircle,
7+
Blocks,
8+
RefreshCw,
9+
} from "lucide-react";
310
import { motion } from "framer-motion";
411
import ProjectCard, { Project } from "../components/projectCard";
512
import { useGitHubStars } from "../hooks/useGithubStars";
@@ -53,28 +60,6 @@ const ProjectsPage = () => {
5360
>
5461
<div className="max-w-7xl mx-auto">
5562
<div>
56-
<div className="grid justify-center md:flex md:justify-between text-center mb-4">
57-
<h1 className="text-4xl font-bold text-gray-900 mb-2 md:mb-0">
58-
Breakpoint;
59-
</h1>
60-
<div className="flex gap-2">
61-
<a
62-
className="flex justify-self-center border gap-1 h-fit w-fit p-2 bg-white rounded-md text-black"
63-
href="/Breakpoint/#/benefits"
64-
>
65-
<HelpCircle />
66-
Why Breakpoint
67-
</a>
68-
<a
69-
className="flex justify-self-center h-fit w-fit p-2 gap-2 bg-black rounded-md text-white"
70-
href="https://opnform.com/forms/my-form-k1tkuv"
71-
>
72-
<Blocks />
73-
Add My Project
74-
</a>
75-
</div>
76-
</div>
77-
7863
<div className="flex flex-col md:flex-row md:flex-wrap md:justify-center md:gap-4 mb-4">
7964
<div className="relative flex-grow mb-2 md:mb-0">
8065
<Search
@@ -134,10 +119,32 @@ const ProjectsPage = () => {
134119
className="border rounded-lg px-3 py-2 bg-white hover:bg-gray-100 flex-grow md:flex-grow-0"
135120
title="Refresh GitHub stars (clears cache)"
136121
>
137-
Refresh Stars
122+
<span className="flex items-center gap-1">
123+
<RefreshCw size={16} />
124+
Refresh Stars
125+
</span>
138126
</button>
139127
</div>
140128
</div>
129+
<div className="grid justify-center md:flex md:justify-between text-center mb-4">
130+
<div></div>
131+
<div className="flex gap-2">
132+
<a
133+
className="flex justify-self-center border gap-1 h-fit w-fit p-2 bg-white rounded-md text-black"
134+
href="/Breakpoint/#/benefits"
135+
>
136+
<HelpCircle />
137+
Why Breakpoint
138+
</a>
139+
<a
140+
className="flex justify-self-center h-fit w-fit p-2 gap-2 bg-black rounded-md text-white"
141+
href="https://opnform.com/forms/my-form-k1tkuv"
142+
>
143+
<Blocks />
144+
Add My Project
145+
</a>
146+
</div>
147+
</div>
141148

142149
{/* Rate limit warning */}
143150
{rateLimit && rateLimit.remaining < 10 && (

src/index.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@import "tailwindcss";
22

33
body {
4-
font-family: "Bricolage Grotesque", serif;
5-
background-image: url("assets/grid.svg");
4+
font-family: "Bricolage Grotesque", "Poppins", serif;
5+
background-image: url("assets/grid.svg");
66
background-size: 150px 150px;
77
background-repeat: repeat;
88
}

tailwind.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// tailwind.config.js
2+
/** @type {import('tailwindcss').Config} */
3+
module.exports = {
4+
content: [
5+
"./src/**/*.{js,jsx,ts,tsx}",
6+
// Add any other locations where you use Tailwind classes
7+
],
8+
theme: {
9+
extend: {
10+
keyframes: {
11+
slideInRight: {
12+
'0%': { transform: 'translateX(100%)' },
13+
'100%': { transform: 'translateX(0)' },
14+
},
15+
slideOutRight: {
16+
'0%': { transform: 'translateX(0)' },
17+
'100%': { transform: 'translateX(100%)' },
18+
}
19+
},
20+
animation: {
21+
slideInRight: 'slideInRight 0.3s forwards',
22+
slideOutRight: 'slideOutRight 0.3s forwards',
23+
}
24+
}
25+
},
26+
plugins: [],
27+
}

0 commit comments

Comments
 (0)