fix: correct cv mobile layout
This commit is contained in:
parent
2a8bffcb8b
commit
3d6da4d63b
6 changed files with 234 additions and 360 deletions
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import { dateRange } from "@lib/utils";
|
||||
import Accordion from "@components/Accordion.astro";
|
||||
|
||||
const collection = (await getCollection("education")).sort(
|
||||
(a, b) =>
|
||||
new Date(b.data.dateStart).valueOf() - new Date(a.data.dateStart).valueOf(),
|
||||
);
|
||||
|
||||
const education = await Promise.all(
|
||||
collection.map(async (item) => {
|
||||
const { Content } = await item.render();
|
||||
return { ...item, Content };
|
||||
}),
|
||||
);
|
||||
---
|
||||
|
||||
<div>
|
||||
{
|
||||
education.map((entry) => (
|
||||
<Accordion
|
||||
institution={`${entry.data.institution} (${dateRange(entry.data.dateStart, entry.data.dateEnd)})`}
|
||||
qualification={entry.data.qualification}
|
||||
grades={entry.data.grades}
|
||||
isOpen={entry.data.isOpen}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import { Icon } from "astro-icon/components";
|
||||
|
||||
const collection = await getCollection("skills");
|
||||
|
||||
const skills = await Promise.all(
|
||||
collection.map(async (item) => {
|
||||
const { Content } = await item.render();
|
||||
return { ...item, Content };
|
||||
}),
|
||||
);
|
||||
---
|
||||
|
||||
<ul class="flex max-w-full list-none flex-wrap gap-4 px-0">
|
||||
{
|
||||
skills.map((entry) => (
|
||||
<li class="group border-tertiary text-tertiary hover:border-accent hover:text-accent flex items-center gap-2 rounded border p-2 transition-colors">
|
||||
<Icon
|
||||
name={entry.data.icon}
|
||||
class="text-tertiary group-hover:text-accent h-5 w-auto transition-colors"
|
||||
/>
|
||||
<p class="m-0 cursor-default">{entry.data.title}</p>
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
|
@ -1,41 +0,0 @@
|
|||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import { dateRange } from "@lib/utils";
|
||||
import Button from "./Button.astro";
|
||||
|
||||
const collection = (await getCollection("work")).sort(
|
||||
(a, b) =>
|
||||
new Date(b.data.dateStart).valueOf() - new Date(a.data.dateStart).valueOf(),
|
||||
);
|
||||
|
||||
const work = await Promise.all(
|
||||
collection.map(async (item) => {
|
||||
const { Content } = await item.render();
|
||||
return { ...item, Content };
|
||||
}),
|
||||
);
|
||||
---
|
||||
|
||||
<ul class="list-none pl-0">
|
||||
{
|
||||
work.map((entry) => (
|
||||
<li class="pb-4 pl-0 last:pb-0">
|
||||
<h3 class="text-secondary mt-4 mb-1 font-semibold text-balance">
|
||||
<span class="text-tertiary">{entry.data.role} at</span>
|
||||
{entry.data.company}
|
||||
</h3>
|
||||
<time class="text-accent block">
|
||||
{dateRange(entry.data.dateStart, entry.data.dateEnd)}
|
||||
</time>
|
||||
<article class="text-secondary prose-a:underline prose-a:decoration-tertiary prose-a:decoration-wavy mt-2">
|
||||
<entry.Content />
|
||||
</article>
|
||||
{entry.data.article ? (
|
||||
<div class="flex justify-center">
|
||||
<Button href={entry.data.article} link="View more" />
|
||||
</div>
|
||||
) : null}
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
Loading…
Add table
Add a link
Reference in a new issue