From 6b989720326189e8d15ef89a8e3e2116f9254b66 Mon Sep 17 00:00:00 2001 From: Thrywyn Date: Wed, 4 Oct 2023 02:01:27 +0200 Subject: [PATCH] fix route, add codeblock component --- src/lib/components/CodeTags.svelte | 15 +++++++++++++++ src/lib/components/ProjectCard.svelte | 3 ++- src/lib/components/ProjectHeader.svelte | 3 ++- src/routes/+layout.svelte | 9 +++------ src/routes/projects/+page.js | 19 +++++++++++++++++++ src/routes/projects/+page.svelte | 9 ++++++++- 6 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 src/lib/components/CodeTags.svelte create mode 100644 src/routes/projects/+page.js diff --git a/src/lib/components/CodeTags.svelte b/src/lib/components/CodeTags.svelte new file mode 100644 index 0000000..2bace6b --- /dev/null +++ b/src/lib/components/CodeTags.svelte @@ -0,0 +1,15 @@ + + + {finalString} diff --git a/src/lib/components/ProjectCard.svelte b/src/lib/components/ProjectCard.svelte index 56ccf97..3d4f9d6 100644 --- a/src/lib/components/ProjectCard.svelte +++ b/src/lib/components/ProjectCard.svelte @@ -7,6 +7,7 @@ import imageUrlBuilder from '@sanity/image-url'; import type { Image, Project } from '$lib/types/sanity'; + import CodeTags from './CodeTags.svelte'; // Get a pre-configured url-builder from your sanity client const builder = imageUrlBuilder(client); @@ -35,7 +36,7 @@

{project.title}

- {project.tags} +

diff --git a/src/lib/components/ProjectHeader.svelte b/src/lib/components/ProjectHeader.svelte index e115a28..c924506 100644 --- a/src/lib/components/ProjectHeader.svelte +++ b/src/lib/components/ProjectHeader.svelte @@ -1,5 +1,6 @@ @@ -7,7 +8,7 @@

{project.title}

-
{project.tags}
+
{#if project.githubLink}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 5c8a75e..9fd1bc6 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,5 +1,4 @@

Projects

- +