Skip to content

Commit

Permalink
feat: add skill tags
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessacor committed Jun 8, 2024
1 parent b1e321e commit a378377
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
15 changes: 13 additions & 2 deletions src/components/jobItem.astro → src/components/JobItem.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
import type { CollectionEntry } from "astro:content";
import Markdown from "./MarkdownComponent.astro";
import TagList from "./TagList.astro";
import JobTag from "./JobTag.astro";
interface Props {
job: CollectionEntry<"work">;
}
const { job } = Astro.props;
const tags = job.data.skills;
const { Content } = await job.render();
---

Expand All @@ -17,6 +20,9 @@ const { Content } = await job.render();
>
</h3>
<p class="dates">{job.data.dates}</p>
<ul>
{tags && tags.map((tag) => <JobTag tag={tag} />)}
</ul>
</header>

<Markdown>
Expand All @@ -25,7 +31,6 @@ const { Content } = await job.render();
</article>

<style scoped>

.job {
margin-bottom: var(--space-extra-large);
}
Expand All @@ -34,12 +39,18 @@ const { Content } = await job.render();
}
.title {
font-weight: bolder;
font-style: italic;
margin-bottom: var(--space-xxs);
}
.dates {
line-height: 1em;
font-size: var(--font-size-4);
font-weight: bolder;
color: var(--secondary-color);
margin-bottom: var(--space-small);
}
ul {
display: flex;
flex-wrap: wrap;
gap: var(--space-medium);
}
</style>
16 changes: 16 additions & 0 deletions src/components/JobTag.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import { getRandomColor } from "../helpers/colorGenerator";
const { tag } = Astro.props;
---

<li class="tag">
<span style={{ color: `${getRandomColor()}` }}> # </span>
<span class="text"> {tag} </span>
</li>

<style scoped>
.tag span {
font-style: italic;
font-size: var(--font-size-4);
}
</style>
8 changes: 4 additions & 4 deletions src/pages/work.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import { getCollection } from "astro:content";
import PageLayout from "../layouts/PageLayout.astro";
import JobItem from "../components/jobItem.astro";
import JobItem from "../components/JobItem.astro";
const jobs = await getCollection("work");
---
Expand Down Expand Up @@ -45,7 +45,8 @@ const jobs = await getCollection("work");
</PageLayout>
<style>
.content {
padding-top: var(--space-extra-large);
padding-top: var(--space-extra-large); <footer></footer>

margin-bottom: var(--space-xxl);
}
@media (min-width: 950px) {
Expand All @@ -58,7 +59,7 @@ const jobs = await getCollection("work");
}

section h2 {
margin-bottom: var(--space-large);
margin-bottom: var(--space-extra-large);
}

.values h2 {
Expand All @@ -70,5 +71,4 @@ const jobs = await getCollection("work");
flex-wrap: wrap;
gap: var(--space-medium);
}

</style>

0 comments on commit a378377

Please sign in to comment.