diff --git a/package-lock.json b/package-lock.json index 84a40fe..3dec530 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,8 @@ "version": "0.0.1", "devDependencies": { "@fontsource/fira-mono": "^4.5.10", - "@neoconfetti/svelte": "^1.0.0", "@sveltejs/adapter-auto": "^1.0.0", "@sveltejs/adapter-node": "^1.0.0", - "@sveltejs/adapter-static": "^1.0.0", "@sveltejs/kit": "^1.0.0", "@types/cookie": "^0.5.1", "@typescript-eslint/eslint-plugin": "^5.45.0", @@ -481,12 +479,6 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, - "node_modules/@neoconfetti/svelte": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@neoconfetti/svelte/-/svelte-1.0.0.tgz", - "integrity": "sha512-SmksyaJAdSlMa9cTidVSIqYo1qti+WTsviNDwgjNVm+KQ3DRP2Df9umDIzC4vCcpEYY+chQe0i2IKnLw03AT8Q==", - "dev": true - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -647,15 +639,6 @@ "@sveltejs/kit": "^1.0.0" } }, - "node_modules/@sveltejs/adapter-static": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-1.0.6.tgz", - "integrity": "sha512-gTus2jW6bEQAZoT1MdmPHWZZmcb6dfLWc0r6dFHnbzSDZ68kifqQ1E+dZDOMF7aXeRV91sgnPuAn2MtpinVdlA==", - "dev": true, - "peerDependencies": { - "@sveltejs/kit": "^1.0.0" - } - }, "node_modules/@sveltejs/kit": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.10.0.tgz", diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index eebcf15..a90ab25 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -15,6 +15,9 @@ {/if}

{article.title}

+ {#if article.date} + {new Date(article.date).toLocaleDateString("fr-FR")} + {/if} {#if article.description}

{article.description}

{/if} diff --git a/src/lib/files/CV_Theodor_Vallier.pdf b/src/lib/files/CV_Theodor_Vallier.pdf index da17e78..776de03 100644 Binary files a/src/lib/files/CV_Theodor_Vallier.pdf and b/src/lib/files/CV_Theodor_Vallier.pdf differ diff --git a/src/lib/international.ts b/src/lib/international.ts new file mode 100644 index 0000000..5f12189 --- /dev/null +++ b/src/lib/international.ts @@ -0,0 +1,23 @@ +import type { create_ssr_component } from 'svelte/internal'; + +export type Mdsvex = { + metadata: { + title: string; + description?: string; + date?: string; + tags?: string[]; + image?: string; + }; + default: ReturnType; +}; + +export const items = new Map( + Object.entries( + import.meta.glob('../routes/international/*/*{.md,.svelte,+page.md.index.svelte}') + ).map(([path, load]) => [ + path + .replace(/(\+page\.md|\.svelte|\/index\.md|\/index\.svelte)$/, '') + .replace(/^\.\.\/routes/, ''), + load + ]) +); diff --git a/src/routes/Header.svelte b/src/routes/Header.svelte index 1da0f66..9f9e42e 100644 --- a/src/routes/Header.svelte +++ b/src/routes/Header.svelte @@ -17,17 +17,14 @@
  • Home
  • -
  • - About -
  • Projects
  • SHS
  • -
  • - Contact +
  • + International
  • diff --git a/src/routes/about/+page.svelte b/src/routes/about/+page.svelte deleted file mode 100644 index d1b7fa2..0000000 --- a/src/routes/about/+page.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - About me - - - -
    -

    About me

    -
    diff --git a/src/routes/contact/+page.svelte b/src/routes/contact/+page.svelte deleted file mode 100644 index eabf280..0000000 --- a/src/routes/contact/+page.svelte +++ /dev/null @@ -1 +0,0 @@ -

    Work in progress

    diff --git a/src/routes/international/+page.server.ts b/src/routes/international/+page.server.ts new file mode 100644 index 0000000..c0f74d5 --- /dev/null +++ b/src/routes/international/+page.server.ts @@ -0,0 +1,12 @@ +import { items } from '$lib/international'; +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async () => ({ + data: await Promise.all( + [...items.entries()].map(async ([path, load]) => + load().then(({ metadata }) => ({ path, ...metadata })) + ) + ).then((data) => + data.sort(({ date: a }, { date: z }) => new Date(z ?? 0).getTime() - new Date(a ?? 0).getTime()) + ) +}); diff --git a/src/routes/international/+page.svelte b/src/routes/international/+page.svelte new file mode 100644 index 0000000..737e2f9 --- /dev/null +++ b/src/routes/international/+page.svelte @@ -0,0 +1,34 @@ + + + + International + + + +
    +

    International

    + +

    This is the international page.

    + +
    + +
    + {#each data.data as article} + + {/each} +
    +
    + + diff --git a/src/routes/international/+page.ts b/src/routes/international/+page.ts new file mode 100644 index 0000000..99d47bc --- /dev/null +++ b/src/routes/international/+page.ts @@ -0,0 +1,5 @@ +import type { PageLoad } from './$types'; + +export const load: PageLoad = ({ data }) => ({ + ...data +}); diff --git a/src/routes/international/trips/+page.md b/src/routes/international/trips/+page.md new file mode 100644 index 0000000..b25314c --- /dev/null +++ b/src/routes/international/trips/+page.md @@ -0,0 +1,16 @@ +--- +title: 👨‍💻 Travel Journal +date: 2024-10-24 +description: Travel Journal +tags: + - travel + - journal +--- + +
    + +
    \ No newline at end of file diff --git a/src/routes/projects/can7/+page.md b/src/routes/projects/can7/+page.md index 29d5f52..0e7c1fe 100644 --- a/src/routes/projects/can7/+page.md +++ b/src/routes/projects/can7/+page.md @@ -4,7 +4,10 @@ date: 2022-09-08 description: A dashboard for can7 tags: - web - - php - - laravel -image: /img/net7.png + - js + - sveltekit + - shadcn +image: /img/can7.png --- + +drawing \ No newline at end of file diff --git a/src/routes/projects/net7/+page.md b/src/routes/projects/net7/+page.md index d9ecdae..167fe89 100644 --- a/src/routes/projects/net7/+page.md +++ b/src/routes/projects/net7/+page.md @@ -8,3 +8,5 @@ tags: - tailwind image: /img/net7.png --- + +net7 \ No newline at end of file diff --git a/static/img/can7.png b/static/img/can7.png new file mode 100644 index 0000000..04a1bad Binary files /dev/null and b/static/img/can7.png differ