From 93c6c852af68f4afa18ec88fe6788189257bd2f5 Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Sat, 28 Sep 2024 15:33:31 +0200 Subject: [PATCH] Updated git url. Added various icons. Started adding hardwarePage content Signed-off-by: Martin Berg Alstad --- .env | 2 +- package.json | 6 ------ src/components/HardwarePage.svelte | 16 ++++++++++++++-- src/components/ProjectPage.astro | 2 +- src/components/Select.svelte | 8 +++++--- src/content/config.ts | 15 +++++++++++++-- src/content/hardware/desktop.yaml | 4 ++++ src/content/hardware/homeServer.yaml | 2 ++ src/content/hardware/raspberryPi.yaml | 4 ++++ src/icons/ExternalLink.astro | 19 ++++++++++++++----- src/icons/GitHub.astro | 19 ++++++++++++++----- src/icons/Gitea.astro | 19 ++++++++++++++----- src/icons/Hamburger.astro | 19 ++++++++++++++----- src/icons/LinkedIn.astro | 19 ++++++++++++++----- src/icons/Mastodon.astro | 17 +++++++++++++---- src/styles/global.css | 12 ++++++------ 16 files changed, 133 insertions(+), 50 deletions(-) create mode 100644 src/content/hardware/desktop.yaml create mode 100644 src/content/hardware/homeServer.yaml create mode 100644 src/content/hardware/raspberryPi.yaml diff --git a/.env b/.env index 7ffd705..fc48fe7 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -GIT_URL="https://example.com" \ No newline at end of file +GIT_URL="https://git.martials.no" \ No newline at end of file diff --git a/package.json b/package.json index 550bc5f..79ba8bc 100644 --- a/package.json +++ b/package.json @@ -45,12 +45,6 @@ "options": { "parser": "astro" } - }, - { - "files": "*.svelte", - "options": { - "parser": "svelte" - } } ] } diff --git a/src/components/HardwarePage.svelte b/src/components/HardwarePage.svelte index f778305..61a19f8 100644 --- a/src/components/HardwarePage.svelte +++ b/src/components/HardwarePage.svelte @@ -1,11 +1,23 @@ - - + diff --git a/src/components/ProjectPage.astro b/src/components/ProjectPage.astro index 1d31e96..4285aa1 100644 --- a/src/components/ProjectPage.astro +++ b/src/components/ProjectPage.astro @@ -26,7 +26,7 @@ const { heroImageAlt, source, createdAt, - updatedAt + updatedAt, } = entry!.data --- diff --git a/src/components/Select.svelte b/src/components/Select.svelte index a615bf2..3e5a89b 100644 --- a/src/components/Select.svelte +++ b/src/components/Select.svelte @@ -5,9 +5,11 @@ const dispatch = createEventDispatcher<{ change: string }>() - dispatch("change", value.currentTarget.value)} +> {#each options as option} {/each} - \ No newline at end of file + diff --git a/src/content/config.ts b/src/content/config.ts index 2d3c305..7a88edc 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -1,4 +1,5 @@ import { defineCollection, z } from "astro:content" + const projectCollection = defineCollection({ type: "content", schema: ({ image }) => @@ -10,9 +11,19 @@ const projectCollection = defineCollection({ tags: z.array(z.string()), source: z.string(), createdAt: z.string(), - updatedAt: z.string(), - }), + updatedAt: z.string() + }) }) + +const hardwareCollection = defineCollection({ + type: "data", + schema: z.object({ + accessories: z.optional(z.array(z.string())), + hardware: z.array(z.string()) + }) +}) + export const collections = { projects: projectCollection, + hardware: hardwareCollection } diff --git a/src/content/hardware/desktop.yaml b/src/content/hardware/desktop.yaml new file mode 100644 index 0000000..2fc13b1 --- /dev/null +++ b/src/content/hardware/desktop.yaml @@ -0,0 +1,4 @@ +accessories: + - a # Screens, keyboards, mice, etc. +hardware: + - b # Graphics cards, CPUs, etc. \ No newline at end of file diff --git a/src/content/hardware/homeServer.yaml b/src/content/hardware/homeServer.yaml new file mode 100644 index 0000000..d327196 --- /dev/null +++ b/src/content/hardware/homeServer.yaml @@ -0,0 +1,2 @@ +hardware: + - b # Graphics cards, CPUs, etc. \ No newline at end of file diff --git a/src/content/hardware/raspberryPi.yaml b/src/content/hardware/raspberryPi.yaml new file mode 100644 index 0000000..2fc13b1 --- /dev/null +++ b/src/content/hardware/raspberryPi.yaml @@ -0,0 +1,4 @@ +accessories: + - a # Screens, keyboards, mice, etc. +hardware: + - b # Graphics cards, CPUs, etc. \ No newline at end of file diff --git a/src/icons/ExternalLink.astro b/src/icons/ExternalLink.astro index d9a7491..762459f 100644 --- a/src/icons/ExternalLink.astro +++ b/src/icons/ExternalLink.astro @@ -2,8 +2,17 @@ // By GitLab SVGs const props = Astro.props --- - - - \ No newline at end of file + + + + diff --git a/src/icons/GitHub.astro b/src/icons/GitHub.astro index a96a110..3116cb0 100644 --- a/src/icons/GitHub.astro +++ b/src/icons/GitHub.astro @@ -2,8 +2,17 @@ // By GitLab SVGs const props = Astro.props --- - - - \ No newline at end of file + + + + diff --git a/src/icons/Gitea.astro b/src/icons/Gitea.astro index 675df31..dd274df 100644 --- a/src/icons/Gitea.astro +++ b/src/icons/Gitea.astro @@ -2,8 +2,17 @@ // By GitLab SVGs const props = Astro.props --- - - - \ No newline at end of file + + + + diff --git a/src/icons/Hamburger.astro b/src/icons/Hamburger.astro index 06a8d85..76c1c44 100644 --- a/src/icons/Hamburger.astro +++ b/src/icons/Hamburger.astro @@ -2,8 +2,17 @@ // By GitLab SVGs const props = Astro.props --- - - - \ No newline at end of file + + + + diff --git a/src/icons/LinkedIn.astro b/src/icons/LinkedIn.astro index 03d8cdd..f530ffb 100644 --- a/src/icons/LinkedIn.astro +++ b/src/icons/LinkedIn.astro @@ -2,8 +2,17 @@ // By GitLab SVGs const props = Astro.props --- - - - \ No newline at end of file + + + + diff --git a/src/icons/Mastodon.astro b/src/icons/Mastodon.astro index b0b1ffa..45728cd 100644 --- a/src/icons/Mastodon.astro +++ b/src/icons/Mastodon.astro @@ -2,7 +2,16 @@ // By GitLab SVGs const props = Astro.props --- - - - \ No newline at end of file + + + + diff --git a/src/styles/global.css b/src/styles/global.css index ec5f1b3..1f1ad45 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -3,13 +3,13 @@ @tailwind utilities; @layer utilities { - .debug { - @apply border border-red-500; - } + .debug { + @apply border border-red-500; + } } @layer base { - h1 { - @apply text-4xl font-bold mb-2; - } + h1 { + @apply text-4xl font-bold mb-2; + } }