-
Notifications
You must be signed in to change notification settings - Fork 0
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
add experience section #23
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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,12 @@ | ||
import { default as MuiTimeline } from "@mui/lab/Timeline"; | ||
|
||
type Props = { | ||
children: React.ReactNode; | ||
} | ||
export default function Timeline({children}: Props) { | ||
return ( | ||
<MuiTimeline position="alternate"> | ||
{children} | ||
</MuiTimeline> | ||
); | ||
} |
This file contains 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,29 @@ | ||
import { default as MuiTimelineItem } from "@mui/lab/TimelineItem"; | ||
import TimelineSeparator from "@mui/lab/TimelineSeparator"; | ||
import TimelineConnector from "@mui/lab/TimelineConnector"; | ||
import TimelineContent from "@mui/lab/TimelineContent"; | ||
import TimelineOppositeContent from "@mui/lab/TimelineOppositeContent"; | ||
import TimelineDot from "@mui/lab/TimelineDot"; | ||
import { TimelineItem as TimelineItemType } from "@type/timeline"; | ||
import { Typography } from "@mui/material"; | ||
|
||
type Props = { | ||
item: TimelineItemType; | ||
} | ||
export default function TimelineItem({item}: Props) { | ||
return ( | ||
<MuiTimelineItem> | ||
<TimelineOppositeContent color="text.secondary"> | ||
<Typography>{item.from} — {item.to}</Typography> | ||
</TimelineOppositeContent> | ||
<TimelineSeparator> | ||
<TimelineDot color="primary" /> | ||
<TimelineConnector color="primary" /> | ||
</TimelineSeparator> | ||
<TimelineContent> | ||
<Typography variant="h6" component="span">{item.company}</Typography> | ||
<Typography>{item.type}</Typography> | ||
</TimelineContent> | ||
</MuiTimelineItem> | ||
); | ||
} |
This file contains 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
This file contains 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,50 @@ | ||
import { Typography } from "@mui/material"; | ||
import { SectionTitle } from "../components/common/Text"; | ||
import { useTranslation } from "react-i18next"; | ||
import Section from "../components/common/Section"; | ||
import { Sections } from "../type/page"; | ||
import WorkIcon from "@mui/icons-material/Work"; | ||
import { default as TimelineC } from "../components/experience/Timeline"; | ||
import TimelineItem from "../components/experience/TimelineItem"; | ||
import { TimelineItem as TimelineItemType } from "@type/timeline"; | ||
|
||
export default function Experience() { | ||
const {t} = useTranslation("sections"); | ||
|
||
const timelineItems: TimelineItemType[] = [ | ||
{ | ||
from: "2020", | ||
to: t(`${Sections.Experience}.dates.today`), | ||
type: t(`${Sections.Experience}.types.apprenticeship`), | ||
company: "Technische Fachschule Bern", | ||
}, | ||
{ | ||
from: "2019", | ||
to: "2020", | ||
type: t(`${Sections.Experience}.types.gymnasium`), | ||
company: "Gymnasium Oberaargau", | ||
}, | ||
{ | ||
from: "2017", | ||
to: "2019", | ||
type: t(`${Sections.Experience}.types.school`), | ||
company: "Oberstufenzentrum Wiedlisbach", | ||
}, | ||
]; | ||
|
||
return ( | ||
<Section name={Sections.Experience}> | ||
<SectionTitle> | ||
<WorkIcon fontSize="inherit" /> {t(`${Sections.Experience}.title`)} | ||
</SectionTitle> | ||
<Typography> | ||
{t(`${Sections.Experience}.description`)} | ||
</Typography> | ||
<TimelineC> | ||
{timelineItems.map((item, i) => ( | ||
<TimelineItem key={i} item={item} /> | ||
))} | ||
</TimelineC> | ||
</Section> | ||
); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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 @@ | ||
export class TimelineItem { | ||
constructor( | ||
public readonly from: string, | ||
public readonly to: string, | ||
public readonly type: string, | ||
public readonly company: string, | ||
) {} | ||
} |
This file contains 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
Oops, something went wrong.
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.
suggestion (llm): Defining
TimelineItem
as a class is a good approach for type safety and encapsulation. However, if this class does not utilize lifecycle methods or state, converting it to an interface or type might be more efficient and align better with the functional programming style often used in React projects.