Skip to content

Commit

Permalink
feat: update cv
Browse files Browse the repository at this point in the history
  • Loading branch information
bbtgnn committed Mar 1, 2024
1 parent d8b1059 commit b05e620
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 10 deletions.
10 changes: 10 additions & 0 deletions src/lib/components/Link.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script lang="ts">
import { href as hrefAdapter } from '$modules/utils';
export let href: string;
let className = '';
export { className as class };
</script>

<a class={className} href={hrefAdapter(href)}><slot /></a>
7 changes: 7 additions & 0 deletions src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
import Link from '$lib/components/Link.svelte';
</script>

<div class="bg-stone-200 p-4">
<Link href="/" class="hover:underline">Giovanni Abbatepaolo</Link>
</div>
8 changes: 8 additions & 0 deletions src/routes/(database)/organizations/isia-urbino/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script lang="ts" context="module">
import { db } from '$modules';
export const props = db.create('organizations', {
name: 'ISIA Urbino',
location: 'Urbino, Italia'
});
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script lang="ts" context="module">
import { db } from '$modules';
export const props = db.create('organizations', {
name: 'Liceo Scientifico Sante Simone',
location: 'Conversano, Italia'
});
</script>
7 changes: 6 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<script lang="ts">
import Navbar from '$lib/components/Navbar.svelte';
import '../app.pcss';
</script>

<slot />
<Navbar />

<div class="pt-8">
<slot />
</div>
31 changes: 22 additions & 9 deletions src/routes/cv/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
<script lang="ts">
import CvCard from '$lib/components/CvCard.svelte';
import Collection from '$modules/components/Collection.svelte';
import Document from '$modules/components/Document.svelte';
import Relation from '$modules/components/Relation.svelte';
import { href } from '$modules/utils';
import { formatDate } from 'date-fns/format';
</script>

<a href={href('/')} class="button">Home</a>

<div class="mx-auto max-w-xl space-y-6">
<h1>Curriculum Vitae</h1>

<hr />

<Collection name="work_experiences" sort={['date_start', 'desc']} let:documents>
<!-- -->
<Collection name="education" sort={['date_start', 'desc']} let:documents>
<div class="space-y-4">
<h2>Formazione</h2>

{#each documents as document}
<Relation to={document.institution} let:doc={institution}>
<CvCard
title={document.title}
subtitle={`${institution.name} (${institution.location})`}
date_start={formatDate(document.date_start, 'MM/yyyy')}
current={document.current}
/>
</Relation>
{/each}
</div>
</Collection>

<hr />

<Collection name="work_experiences" sort={['date_start', 'desc']} let:documents>
<div class="space-y-4">
<h2>Esperienze lavorative attuali</h2>

{#each documents as document}
{#if document.current}
<Relation to={document.employer} let:doc>
<Relation to={document.employer} let:doc={employer}>
<CvCard
title={document.roles.join(', ')}
subtitle={doc.name}
subtitle={`${employer.name} (${employer.location})`}
date_start={formatDate(document.date_start, 'MM/yyyy')}
current={document.current}
/>
Expand All @@ -44,7 +57,7 @@
<Relation to={document.employer} let:doc={employer}>
<CvCard
title={document.roles.join(', ')}
subtitle={employer.name}
subtitle={`${employer.name} (${employer.location})`}
date_start={formatDate(document.date_start, 'MM/yyyy')}
date_end={formatDate(document.date_end, 'MM/yyyy')}
/>
Expand Down

0 comments on commit b05e620

Please sign in to comment.