Skip to content
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>
);
}
15 changes: 15 additions & 0 deletions src/routes/About/Staff.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import StaffCard from "./StaffCard.tsx";
import staff from "./staff-info.json";

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>
);
}
24 changes: 24 additions & 0 deletions src/routes/About/StaffCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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
}
]
6 changes: 6 additions & 0 deletions src/types.d.ts
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This should probably just go in the StaffCard component file.
.d.ts files are typically reserved for type declarations from libraries and you almost never need to create them yourself, as most libraries have types on the DefinitelyTyped repo.
You'd only create your own if DefinitelyTyped doesn't have the types you need for a library you're using.
See Typescript handbook here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So in this instance, would you like to leave the .d.ts file? I'll migrate the Staff type to the StaffCard component either way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No, let's get rid of the .d.ts file, we shouldn't need one for this project.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface Staff {
name: string;
preferredLanguage: string;
bio: string;
yearsExp: number;
}