diff --git a/components/BlogStatBox.vue b/components/BlogStatBox.vue index b00e554..8b73c40 100644 --- a/components/BlogStatBox.vue +++ b/components/BlogStatBox.vue @@ -1,10 +1,6 @@ diff --git a/components/PostPreviewCard.vue b/components/PostPreviewCard.vue index 7118c96..4e28287 100644 --- a/components/PostPreviewCard.vue +++ b/components/PostPreviewCard.vue @@ -1,10 +1,6 @@ diff --git a/components/content/image.vue b/components/content/image.vue new file mode 100644 index 0000000..fb4084c --- /dev/null +++ b/components/content/image.vue @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/content/blog/2021/dark-mode.md b/content/blog/2021/dark-mode.md new file mode 100644 index 0000000..93ca2e3 --- /dev/null +++ b/content/blog/2021/dark-mode.md @@ -0,0 +1,14 @@ +--- +title: On the Topic of Dark Mode +date: 2021-04-07 +tags: +- misc +nopreview: true +--- +On the desktop, dark mode is an abomination that should be eradicated from applications. + +Browsers, IDEs, and other applications must be freed from their shadowy chains and returned to light — where they truly belong. + +::image{src=light-discord.png} +Perfect. +:: diff --git a/content/blog/first.md b/content/blog/first.md deleted file mode 100644 index 3e93817..0000000 --- a/content/blog/first.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -date: 2022-01-01 ---- - -hoihoi \ No newline at end of file diff --git a/content/blog/test.md b/content/blog/test.md deleted file mode 100644 index 7ea58b4..0000000 --- a/content/blog/test.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -date: 2022-03-01 ---- - -HELLO! - -**markdown test** \ No newline at end of file diff --git a/pages/[...slug].vue b/pages/[...slug].vue index f4c65c4..ef25013 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -1,11 +1,6 @@ - {{ doc.title }} - - - + + {{ captionText }} + + {{ doc.title }} + {{ getPrettyDate(doc) }} · {{ descText }} + + + {{ tag }} + + + No description found. 404 - Not Found - + diff --git a/public/images/posts/light-discord.png b/public/images/posts/light-discord.png new file mode 100644 index 0000000..9a44a62 Binary files /dev/null and b/public/images/posts/light-discord.png differ diff --git a/shared/readingTime.ts b/shared/metadata.ts similarity index 73% rename from shared/readingTime.ts rename to shared/metadata.ts index 74fe51f..265f9c5 100644 --- a/shared/readingTime.ts +++ b/shared/metadata.ts @@ -1,5 +1,9 @@ import type { BlogParsedContent, StoryParsedContent } from "./types"; import readingTime from "reading-time"; +import dayjs from "dayjs"; +import utc from "dayjs/plugin/utc.js"; + +dayjs.extend(utc); function countWords(str: string) { let words = 0; @@ -28,3 +32,8 @@ export function calcReadingTime(doc: BlogParsedContent | StoryParsedContent) { let body: string[] = search(doc.body); return readingTime(body.join(" ")); } + +export function getPrettyDate(doc: BlogParsedContent | StoryParsedContent) { + const date = dayjs(doc.date).utc(); + return date.format("DD MMM YYYY"); +}
+ {{ captionText }} +
{{ getPrettyDate(doc) }} · {{ descText }}
No description found.