-
Notifications
You must be signed in to change notification settings - Fork 2
Create about page #51
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a167353
Create global type file
Cykotech 62993fc
Create JSON file for staff info
Cykotech 3c91c09
Create About layout
Cykotech 1584660
Add Cykotech image
Cykotech c12bd5a
Move staff-info.json to About directory
Cykotech d984619
Create Staff section
Cykotech b28185b
Create Hero section
Cykotech 166d382
Create StaffCard component
Cykotech b894fea
Remove duplicate copies of myself
Cykotech 6dd0578
Merge branch 'main' into create-about-page
Cykotech 75a9afc
Manually run Prettier
Cykotech 5fb82f8
Delete types.d.ts
Cykotech b14db6a
Add Staff interface to Staff.tsx
Cykotech aca1430
Import Staff type to StaffCard.tsx
Cykotech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| } | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| interface Staff { | ||
| name: string; | ||
| preferredLanguage: string; | ||
| bio: string; | ||
| yearsExp: number; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.tsfiles 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
There was a problem hiding this comment.
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.tsfile? I'll migrate the Staff type to the StaffCard component either way.There was a problem hiding this comment.
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.tsfile, we shouldn't need one for this project.