feat: streamline experience section

- Jobs can now be added by changing jobs.json
This commit is contained in:
2025-12-31 18:40:41 -05:00
parent 5c1d7f4b67
commit 41b92fe886
6 changed files with 52 additions and 35 deletions

View File

@@ -1,34 +0,0 @@
import { For } from "solid-js";
import JobCard from "./JobCard";
import { createSignal } from "solid-js";
const Experience = () => {
const [jobs, _] = createSignal([
{
title: "Software Developer Engineer Intern",
company: "Amazon Canada",
location: "Toronto, Ontario, Canada",
range: "May 2025 - August 2025",
url: "https://flex.amazon.ca/",
},
{
title: "Software Engineer Intern",
company: "Cisco Canada",
location: "Remote",
range: "January 2023 - May 2023",
url: "https://developer.cisco.com/docs/modeling-labs/cat-9000v/",
},
]);
return (
<section class="mt-16 px-4">
<h2 class="text-xl text-nord-1 font-bold mb-6">Experience</h2>
<div class="!flex !flex-col !gap-0.5v ml-2h">
<For each={jobs()}>{(job) => <JobCard job={job} />}</For>
</div>
</section>
);
};
export default Experience;

View File

@@ -0,0 +1,17 @@
import { For } from "solid-js";
import JobCard from "./JobCard";
import { jobs } from "~/data/jobs";
const Experience = () => {
return (
<section class="mt-16 px-4">
<h2 class="text-xl text-nord-1 font-bold mb-6">Experience</h2>
<div class="!flex !flex-col !gap-0.5v ml-2h">
<For each={jobs}>{(job) => <JobCard job={job} />}</For>
</div>
</section>
);
};
export default Experience;

View File

@@ -1,4 +1,10 @@
const JobCard = (props) => { import type { Job } from "~/types";
interface JobCardProps {
job: Job;
}
const JobCard = (props: JobCardProps) => {
return ( return (
<div class="p-4"> <div class="p-4">
<h3 class="font-bold text-xl"> <h3 class="font-bold text-xl">

16
src/data/jobs.json Normal file
View File

@@ -0,0 +1,16 @@
[
{
"title": "Software Developer Engineer Intern",
"company": "Amazon Canada",
"location": "Toronto, Ontario, Canada",
"range": "May 2025 - August 2025",
"url": "https://flex.amazon.ca/"
},
{
"title": "Software Engineer Intern",
"company": "Cisco Canada",
"location": "Remote",
"range": "January 2023 - May 2023",
"url": "https://developer.cisco.com/docs/modeling-labs/cat-9000v/"
}
]

4
src/data/jobs.ts Normal file
View File

@@ -0,0 +1,4 @@
import Jobs from "./jobs.json";
import type { Job } from "~/types";
export const jobs: Job[] = Jobs;

View File

@@ -8,6 +8,14 @@ export type Post = {
description: string; description: string;
}; };
export type Job = {
title: string;
company: string;
location: string;
range: string;
url: string;
};
export type Tag = { export type Tag = {
// id/name of tag // id/name of tag
id: string; id: string;