diff --git a/package.json b/package.json index bdf6869..8efed08 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "dependencies": { "axios": "^0.20.0", "compression": "^1.7.1", + "dayjs": "^1.8.36", "polka": "next", "sirv": "^1.0.0" }, diff --git a/src/components/ImageFrame.svelte b/src/components/ImageFrame.svelte new file mode 100644 index 0000000..e23a165 --- /dev/null +++ b/src/components/ImageFrame.svelte @@ -0,0 +1,23 @@ + + + + + diff --git a/src/components/Nav.svelte b/src/components/Nav.svelte index 16c6b38..78d71a5 100644 --- a/src/components/Nav.svelte +++ b/src/components/Nav.svelte @@ -5,7 +5,7 @@ { name: 'About', href: '/about' }, { name: 'Works', href: '/works' }, { name: 'Projects', href: '/projects' }, - { name: 'Blog', href: 'https://blog.nicco.io' }, + { name: 'Blog', href: '/blog' }, { name: 'Contact', href: '/contact' }, ] diff --git a/src/components/PageTitle.svelte b/src/components/PageTitle.svelte index ee1459e..5be6c01 100644 --- a/src/components/PageTitle.svelte +++ b/src/components/PageTitle.svelte @@ -2,6 +2,7 @@ import SpacedLetters from './SpacedLetters.svelte' export let title = '' + export let readable = false + +
+
+ {created} + {#if full && created !== modified}
Last update:{modified}{/if} +
+
~ {readingTimeInMinutes(post.content)} min
+
diff --git a/src/components/PostPreview.svelte b/src/components/PostPreview.svelte new file mode 100644 index 0000000..e241d71 --- /dev/null +++ b/src/components/PostPreview.svelte @@ -0,0 +1,46 @@ + + + + + + {#if post.featured} + + {/if} + +

+ {@html post.title} +

+
diff --git a/src/components/SimplePage.svelte b/src/components/SimplePage.svelte index 5e9b251..1b8a1c5 100644 --- a/src/components/SimplePage.svelte +++ b/src/components/SimplePage.svelte @@ -2,16 +2,23 @@ import PageTitle from './PageTitle.svelte' export let title = '' + export let expanded = true + export let readable = false - + -
+
diff --git a/src/components/SpacedLetters.svelte b/src/components/SpacedLetters.svelte index 36f5873..c2c2282 100644 --- a/src/components/SpacedLetters.svelte +++ b/src/components/SpacedLetters.svelte @@ -1,6 +1,7 @@ -
+
{#if even} - {#each letters as letter} - {letter} - {/each} + {#each letters as letter}{letter}{/each} {:else}{letters}{/if}
diff --git a/src/components/WPAdapter.svelte b/src/components/WPAdapter.svelte new file mode 100644 index 0000000..18ae57c --- /dev/null +++ b/src/components/WPAdapter.svelte @@ -0,0 +1,59 @@ + + + + +
+ {@html content} +
diff --git a/src/components/Work.svelte b/src/components/Work.svelte index 71d88a4..c9bafb9 100644 --- a/src/components/Work.svelte +++ b/src/components/Work.svelte @@ -1,12 +1,10 @@