diff --git a/src/components/organisms/work-timeline-item.astro b/src/components/organisms/work-timeline-item.astro new file mode 100644 index 0000000..6c8cc3c --- /dev/null +++ b/src/components/organisms/work-timeline-item.astro @@ -0,0 +1,52 @@ +--- +import IconButton from '@/atoms/icon-button.astro'; +import Tag from '@/atoms/tag.astro'; +import Timestamp from '@/atoms/timestamp.astro'; +import Typography from '@/atoms/typography.astro'; +import type { Job } from '@/types/experience-section'; +import type { I18n } from '@/types/i18n'; + +export interface Props extends astroHTML.JSX.HTMLAttributes { + job: Job; + i18n: I18n; +} +const { job, i18n, ...props } = Astro.props; +const WorkTimelineItem = 'div'; +--- + + + {job.role} — {job.company} +
a]:my-2']}> + {job.socials?.map(({ icon, url }) => )} +
+ + +
+ { + job.tags.map((t) => ( + + {t.name} + + )) + } +
+
diff --git a/src/pages/playground/work-timeline.astro b/src/pages/playground/work-timeline.astro new file mode 100644 index 0000000..93a25f1 --- /dev/null +++ b/src/pages/playground/work-timeline.astro @@ -0,0 +1,67 @@ +--- +import WorkTimelineItem from '@/organisms/work-timeline-item.astro'; +import type { Job } from '@/types/experience-section'; +import type { I18n } from '@/types/i18n'; + +const job: Job = { + role: 'Senior front-end developer', + company: 'Google', + startDate: new Date('2020-02'), + endDate: null, + description: [ + 'In tristique vulputate augue vel egestas.', + 'Quisque ac imperdiet tortor, at lacinia ex.', + 'Duis vel ex hendrerit, commodo odio sed, aliquam enim.', + 'Ut arcu nulla, tincidunt eget arcu eget, molestie vulputate nisi.', + 'Nunc malesuada leo et est iaculis facilisis.', + 'Fusce eu urna ut magna malesuada fringilla.', + ], + tags: [ + { + icon: 'simple-icons:react', + iconColor: '#61DAFB', + name: 'React.js', + url: 'https://reactjs.org/', + }, + { + icon: 'simple-icons:nextdotjs', + iconColor: '#000000', + name: 'Next.js', + url: 'https://nextjs.org/', + }, + { + icon: 'simple-icons:typescript', + iconColor: '#3178C6', + name: 'TypeScript', + url: 'https://www.typescriptlang.org/', + }, + { + icon: 'simple-icons:nx', + iconColor: '#143055', + name: 'Nx', + url: 'https://nx.dev/', + }, + { + icon: 'simple-icons:firebase', + iconColor: '#FFCA28', + name: 'Firebase', + url: 'https://firebase.google.com/', + }, + ], + socials: [ + { name: 'Facebook', icon: 'fa6-brands:facebook-f', url: '#' }, + { name: 'LinkedIn', icon: 'fa6-brands:linkedin-in', url: '#' }, + ], +}; + +const i18nData: I18n = { + locale: 'en-US', + translations: { + now: 'now', + }, +}; +--- + +
+ +
diff --git a/src/types/experience-section.ts b/src/types/experience-section.ts index 3d5b96a..2ec54c1 100644 --- a/src/types/experience-section.ts +++ b/src/types/experience-section.ts @@ -1,6 +1,6 @@ import type { SectionConfig, Social, Tag } from './common'; -interface Job { +export interface Job { role: string; company: string; startDate: Date;