Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create about page #51

Merged
merged 14 commits into from
Feb 16, 2025
Binary file added public/images/cykotech.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/routes/About/Hero.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export default function Hero() {
return (
<div className="grid min-h-[10vh] place-items-center bg-background">
<h3 className="text-3xl text-primary">About Us</h3>
<p className="text-primary">
Little snippet about the server & community.
</p>
</div>
);
}
22 changes: 22 additions & 0 deletions src/routes/About/Staff.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import StaffCard from "./StaffCard.tsx";
import staff from "./staff-info.json";

export interface Staff {
name: string;
preferredLanguage: string;
bio: string;
yearsExp: number;
}

export default function Staff() {
return (
<div className="bg-primary pb-12 pt-6">
<h3 className="mb-12 text-center text-3xl text-secondary">Staff</h3>
<div className="mx-36 grid grid-cols-2 gap-x-48 gap-y-16">
{staff.map((member: Staff, index) => (
<StaffCard staff={member} key={index} />
))}
</div>
</div>
);
}
26 changes: 26 additions & 0 deletions src/routes/About/StaffCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Staff } from "./Staff";

interface Props {
staff: Staff;
}

export default function StaffCard({ staff }: Props) {
return (
<div className="outer mx-auto max-h-60 rounded-2xl border border-solid border-transparent p-2.5">
<div className="inner flex flex-col rounded-lg px-4 py-6 text-secondary">
<div className="flex items-center">
<img
className="mr-3 size-20 rounded-full"
src={`/images/${staff.name.toLowerCase()}.png`}
alt={staff.name}
/>
<div className="flex flex-col">
<h4 className="text-4xl">{staff.name}</h4>
<p>{`${staff.preferredLanguage} - ${staff.yearsExp.toString()} years`}</p>
</div>
</div>
<p className="mt-4">{staff.bio}</p>
</div>
</div>
);
}
8 changes: 6 additions & 2 deletions src/routes/About/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Hero from "./Hero.tsx";
import Staff from "./Staff.tsx";

export default function About() {
return (
<main className="grid min-h-[25vh] place-items-center bg-primary">
<h3 className="text-3xl text-secondary">About Code Cafe</h3>
<main className="min-h-[80vh]">
<Hero />
<Staff />
</main>
);
}
8 changes: 8 additions & 0 deletions src/routes/About/staff-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"name": "Cykotech",
"preferredLanguage": "C#",
"bio": "After spending 10+ years as a culinary professional, I've decided to switch into tech as a Web Developer. I initially started on the Codecademy platform to form my coding foundation. I have since then adopted C# as my primary language.",
"yearsExp": 2
}
]
Loading