Skip to content

Commit

Permalink
Merge pull request #11 from leslieyip02/KAN-12-Create-About-Page
Browse files Browse the repository at this point in the history
KAN-12 Create About Page
  • Loading branch information
Respirayson authored Mar 2, 2024
2 parents bce404c + f09a3ab commit ff2695a
Show file tree
Hide file tree
Showing 49 changed files with 696 additions and 65 deletions.
84 changes: 23 additions & 61 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"@babel/plugin-syntax-import-attributes": "^7.23.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
Expand Down
93 changes: 93 additions & 0 deletions public/about_graphic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/AltheaTan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/ChloeOng.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/DavianKho.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/EmilyTan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/IvanYang.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/JamieHo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/JavianNg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/JoshuaLek.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/KhooPynZhern.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/KongShiTing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/KooJay-Lynn.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/LeeYongNing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/MartinNg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/MervynSeah.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/NatashaKoh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/NatashaSanghar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/NathanLoo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/NgLeXuan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/OpheliaTeo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/Raeeda.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/RaysonYeap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/ReinaTng.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/SeanKevinDias.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/TeoHongRui.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/members/TimothySoon.jpg
Binary file added public/members/TohYiHui.jpg
Binary file added public/members/TriciaAng.jpg
Binary file added public/members/VivienHe.jpg
Binary file added public/members/WangYuQing.jpg
Binary file added public/members/WanjariKimaya.jpg
3 changes: 3 additions & 0 deletions public/mission_icon.svg
3 changes: 3 additions & 0 deletions public/vision_icon.svg
22 changes: 20 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Routes, Route } from 'react-router-dom';
import { Home, Privacy } from './pages';
import { useEffect } from 'react';
import { useLocation, Routes, Route } from 'react-router-dom';
import { About, Home, Privacy } from './pages';
import NavigationBar from './layout/NavigationBar';
import Footer from './layout/Footer';
import './App.css';
Expand All @@ -10,16 +11,33 @@ function App() {
<NavigationBar />

{/* Main content */}
<ScrollToTop />
<main className='w-full min-h-[100vh]'>
<Routes>
<Route path='/' element={<Home />} />
<Route path='/privacy' element={<Privacy />} />
</Routes>
<Routes>
<Route path='/about' element={<About />} />
</Routes>
</main>

<Footer />
</>
);
}

// this is needed so that the page automaticall scrolls to the top
// when the route changes
function ScrollToTop() {
const { pathname } = useLocation();

useEffect(() => {
window.scrollTo(0, 0);
}, [pathname]);

return null;
}


export default App;
1 change: 1 addition & 0 deletions src/layout/NavigationBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
md:px-20
py-4
bg-white
z-50
;
}
35 changes: 35 additions & 0 deletions src/layout/WindowCard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.window {
@apply
rounded-2xl
border-outline
border-2
overflow-hidden
drop-shadow-window
;
}

.action-bar {
@apply
flex
flex-row
p-2
bg-[#f2f2f2]
border-outline
border-b-2
;
}

.action-button {
@apply
rounded-full
w-4
h-4
mx-1
;
}

.window-content {
@apply
bg-white
;
}
27 changes: 27 additions & 0 deletions src/layout/WindowCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import './WindowCard.css';

interface WindowProps {
content: React.ReactNode;
heightClass?: string;
widthClass?: string;
}

function WindowCard(props: WindowProps) {
return (
<div className={
`window ${props.heightClass || ''} ${props.widthClass || ''}`
}>
<div className='action-bar'>
<div className='action-button bg-[#ff605c]'></div>
<div className='action-button bg-[#ffbd44]'></div>
<div className='action-button bg-[#00ca4e]'></div>
</div>
<div className='window-content'>
<div>{props.content}</div>
</div>
</div>
);
}

export default WindowCard;
40 changes: 40 additions & 0 deletions src/pages/about/RoleCard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.role-card {
@apply
w-48
p-4
flex
flex-col
items-start
gap-1
;
}

.role-card>img {
@apply
rounded-md
w-32
h-32
object-cover
object-top
self-center
;
}

.role-label {
@apply
h-20
m-2
;
}

.role-label>h4 {
@apply
font-bold
;
}

.role-label>p {
@apply
text-sm
;
}
27 changes: 27 additions & 0 deletions src/pages/about/RoleCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import WindowCard from '../../layout/WindowCard';
import './RoleCard.css';

interface RoleCardProps {
name: string;
role: string;
imgSrc: string;
}

function RoleCard(props: RoleCardProps) {
const content = (
<div className='role-card'>
<img src={props.imgSrc}></img>
<div className='role-label'>
<h4>{props.name}</h4>
<p>{props.role}</p>
</div>
</div>
);

return (
<WindowCard content={content}></WindowCard>
);
}

export default RoleCard;
26 changes: 26 additions & 0 deletions src/pages/about/RolesSection.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.wing {
@apply
my-8
;
}

.wing>h1 {
@apply
text-3xl
text-primary
text-center
font-bold
;
}

.member-container {
@apply
p-8
md:px-20
flex
flex-wrap
justify-center
gap-8
md:gap-16
;
}
37 changes: 37 additions & 0 deletions src/pages/about/RolesSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import RoleCard from './RoleCard';
import roles from './roles.json' with {type: 'json'};
import './RolesSection.css';

function RolesSection() {
return (
<>
{
Object.entries(roles).map((value) => {
const [wing, members] = value;
return (
<div className='wing' key={wing}>
<h1>{wing}</h1>
<div className='member-container'>
{
members.map((member) => {
const imgSrc: string =
`members/${member.name.replace(/\s/g, '')}.jpg`;
return <RoleCard
name={member.name}
role={member.role}
imgSrc={imgSrc}
key={member.name}
></RoleCard>;
})
}
</div>
</div>
);
})
}
</>
);
}

export default RolesSection;
Loading

0 comments on commit ff2695a

Please sign in to comment.