diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..3172514 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "svelte.svelte-vscode", + "editorconfig.editorconfig", + "dbaeumer.vscode-eslint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f89ed5f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} diff --git a/package-lock.json b/package-lock.json index 2ff1662..3263aaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/kit": "^2.0.0", "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@tailwindcss/typography": "^0.5.13", "@theatre/core": "^0.7.1", "@theatre/studio": "^0.7.1", "@threlte/theatre": "^2.1.7", @@ -28,6 +29,7 @@ "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", "autoprefixer": "^10.4.19", + "daisyui": "^4.11.1", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.35.1", @@ -1811,6 +1813,34 @@ "vite": "^5.0.0" } }, + "node_modules/@tailwindcss/typography": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.13.tgz", + "integrity": "sha512-ADGcJ8dX21dVVHIwTRgzrcunY6YY9uSlAHHGVKvkA+vLc5qLwEszvKts40lx7z0qc4clpjclwLeK5rVCV2P/uw==", + "dev": true, + "dependencies": { + "lodash.castarray": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.merge": "^4.6.2", + "postcss-selector-parser": "6.0.10" + }, + "peerDependencies": { + "tailwindcss": ">=3.0.0 || insiders" + } + }, + "node_modules/@tailwindcss/typography/node_modules/postcss-selector-parser": { + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz", + "integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@theatre/core": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/@theatre/core/-/core-0.7.1.tgz", @@ -2966,6 +2996,16 @@ "node": ">= 8" } }, + "node_modules/css-selector-tokenizer": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.8.0.tgz", + "integrity": "sha512-Jd6Ig3/pe62/qe5SBPTN8h8LeUg/pT4lLgtavPf7updwwHpvFzxvOQBHYj2LZDMjUnBzgvIUSjRcf6oT5HzHFg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -3019,6 +3059,34 @@ "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.6.5.tgz", "integrity": "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==" }, + "node_modules/culori": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/culori/-/culori-3.3.0.tgz", + "integrity": "sha512-pHJg+jbuFsCjz9iclQBqyL3B2HLCBF71BwVNujUYEvCeQMvV97R59MNK3R2+jgJ3a1fcZgI9B3vYgz8lzr/BFQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/daisyui": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/daisyui/-/daisyui-4.11.1.tgz", + "integrity": "sha512-obT9CUbQdW6eoHwSeT5VwaRrWlwrM4OT5qlfdJ0oQlSIEYhwnEl2+L2fwu5PioLbitwuMdYC2X8I1cyy8Pf6LQ==", + "dev": true, + "dependencies": { + "css-selector-tokenizer": "^0.8", + "culori": "^3", + "picocolors": "^1", + "postcss-js": "^4" + }, + "engines": { + "node": ">=16.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/daisyui" + } + }, "node_modules/data-view-buffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", @@ -3846,6 +3914,12 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -4970,6 +5044,18 @@ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", "dev": true }, + "node_modules/lodash.castarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz", + "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", diff --git a/package.json b/package.json index 6ec7214..52e6846 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/kit": "^2.0.0", "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@tailwindcss/typography": "^0.5.13", "@theatre/core": "^0.7.1", "@theatre/studio": "^0.7.1", "@threlte/theatre": "^2.1.7", @@ -25,6 +26,7 @@ "@typescript-eslint/eslint-plugin": "^7.0.0", "@typescript-eslint/parser": "^7.0.0", "autoprefixer": "^10.4.19", + "daisyui": "^4.11.1", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.35.1", diff --git a/src/app.html b/src/app.html index 77a5ff5..ebd68cc 100644 --- a/src/app.html +++ b/src/app.html @@ -6,7 +6,7 @@ %sveltekit.head% - +
%sveltekit.body%
diff --git a/src/lib/utils/PoetryLayout.svelte b/src/lib/utils/PoetryLayout.svelte new file mode 100644 index 0000000..25db87a --- /dev/null +++ b/src/lib/utils/PoetryLayout.svelte @@ -0,0 +1,19 @@ + + + + +
+ +
diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index cce0c02..230d9cc 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -41,7 +41,7 @@ export const fetchMarkdownPosts = async ( section: SectionKey, limit: number, offset: number -): Promise => { +): Promise<{posts: Post[], total: number}> => { let posts: Record Promise>; switch (section) { case 'poetry': @@ -74,7 +74,9 @@ export const fetchMarkdownPosts = async ( }) ); - const paginatedPosts = allPosts.slice(offset, offset + limit); + const sortedPosts = allPosts.sort((a, b) => new Date(a.meta.date).getTime() - new Date(b.meta.date).getTime() ); - return paginatedPosts; + const paginatedPosts = sortedPosts.slice(offset, offset + limit); + + return {posts: paginatedPosts, total: allPosts.length}; }; diff --git a/src/lib/utils/poetry/h1.svelte b/src/lib/utils/poetry/h1.svelte new file mode 100644 index 0000000..bcf355d --- /dev/null +++ b/src/lib/utils/poetry/h1.svelte @@ -0,0 +1,3 @@ +

+ +

diff --git a/src/lib/utils/poetry/p.svelte b/src/lib/utils/poetry/p.svelte new file mode 100644 index 0000000..427fc65 --- /dev/null +++ b/src/lib/utils/poetry/p.svelte @@ -0,0 +1,3 @@ +

+ +

diff --git a/src/posts/poetry/autumn-synesthesia.md b/src/posts/poetry/autumn-synesthesia.md index 9eddd2a..e615e41 100644 --- a/src/posts/poetry/autumn-synesthesia.md +++ b/src/posts/poetry/autumn-synesthesia.md @@ -7,29 +7,29 @@ tags: title: Autumn Synesthesia --- -The trees branch out their reds and yellows. -Their last battle cry before the frost. -The further north, the more pronounced -As they recall the life they lost. -Shouting in color upon deaf ears, +The trees branch out their reds and yellows. +Their last battle cry before the frost. +The further north, the more pronounced +As they recall the life they lost. +Shouting in color upon deaf ears, Such beauty produced at a deadly cost. -The reds rage on -With blistering hate. -"Is there no escape +The reds rage on +With blistering hate. +"Is there no escape From our inevitable fate?" -The orange reminisce -On the seasons before. -"Winter is knocking, +The orange reminisce +On the seasons before. +"Winter is knocking, But Spring is next door." -The yellows enjoy -The weather while it lasts. -"Best to live in the present +The yellows enjoy +The weather while it lasts. +"Best to live in the present Than the future or past." -The browns mutter softly -The last lesson to learn. -"From dust I arose, -So to dust I return." \ No newline at end of file +The browns mutter softly +The last lesson to learn. +"From dust I arose, +So to dust I return." diff --git a/src/posts/poetry/breakfast-blue-pt.-2.md b/src/posts/poetry/breakfast-blue-pt.-2.md index 2c1dce9..7d5839a 100644 --- a/src/posts/poetry/breakfast-blue-pt.-2.md +++ b/src/posts/poetry/breakfast-blue-pt.-2.md @@ -10,22 +10,22 @@ tags: title: Breakfast Blue Pt. 2 --- -Oh, my good friend, I didn't mean to leave. -It wasn't your fault, so no longer grieve! -If I could, I would run back to your side. +Oh, my good friend, I didn't mean to leave. +It wasn't your fault, so no longer grieve! +If I could, I would run back to your side. But, alas, a lack of legs slows my stride. -It's been over a year since I've last seen -Your serious face and Chartwell's cuisine. -Often I think this is for the better +It's been over a year since I've last seen +Your serious face and Chartwell's cuisine. +Often I think this is for the better \'Til I shed tears as I read your letter. -Fake tears, that is, for I also lack eyes. -In fact, let me unveil my disguise: -I'm an object lacking animation, +Fake tears, that is, for I also lack eyes. +In fact, let me unveil my disguise: +I'm an object lacking animation, Given life through personification. -What words can I say to help you move on -And accept the fact that I am now gone? -Know that I too will miss your sweet lovin' -For I'll always be your chocolate muffin. \ No newline at end of file +What words can I say to help you move on +And accept the fact that I am now gone? +Know that I too will miss your sweet lovin' +For I'll always be your chocolate muffin. diff --git a/src/posts/poetry/breakfast-blues.md b/src/posts/poetry/breakfast-blues.md index 240a9db..e7a9c39 100644 --- a/src/posts/poetry/breakfast-blues.md +++ b/src/posts/poetry/breakfast-blues.md @@ -1,29 +1,29 @@ --- categories: -- Poetry + - Poetry date: 2013-01-10 00:00:00 +0000 tags: -- Humor -- Muffins + - Humor + - Muffins title: Breakfast Blues - --- -Lost my reason to wake in the morning -Ever since you left me without warning. -We've always seemed to have gotten along + +Lost my reason to wake in the morning +Ever since you left me without warning. +We've always seemed to have gotten along Now I'm wondering if I did you wrong. -Lost my reason to give you thanks and praise. -Each day that passes passes in a daze. -The life I live is a life of decay. +Lost my reason to give you thanks and praise. +Each day that passes passes in a daze. +The life I live is a life of decay. My happiness happens to never stay. -I would have treated you so much better, -Or perhaps branded a scarlet letter -Across my chest and openly confess +I would have treated you so much better, +Or perhaps branded a scarlet letter +Across my chest and openly confess That I'm impressed by a snack I love best. -Oh chocolate muffin, why'd you have to leave? -I've learned not to wear my heart on my sleeve. -Instead my love will always be suppressed -As I keep it locked in a chocolate chest. \ No newline at end of file +Oh chocolate muffin, why'd you have to leave? +I've learned not to wear my heart on my sleeve. +Instead my love will always be suppressed +As I keep it locked in a chocolate chest. diff --git a/src/posts/poetry/djinn.md b/src/posts/poetry/djinn.md index d2405fa..b5b2819 100644 --- a/src/posts/poetry/djinn.md +++ b/src/posts/poetry/djinn.md @@ -6,6 +6,7 @@ tags: - Christian title: Djinn year: 2019 +layout: poetry --- "Jesus dropped by." diff --git a/src/posts/poetry/i-ve-seen.md b/src/posts/poetry/i-ve-seen.md index 0aa82b0..cb9b002 100644 --- a/src/posts/poetry/i-ve-seen.md +++ b/src/posts/poetry/i-ve-seen.md @@ -1,14 +1,14 @@ --- categories: -- Poetry + - Poetry date: 2018-04-28 12:00:00 +0000 tags: -- Wisdom -- Lessons + - Wisdom + - Lessons title: I've Seen year: 2018 - --- + I've seen tears fall From the face of a giant, A hint of desperation diff --git a/src/posts/poetry/infrared-homing.md b/src/posts/poetry/infrared-homing.md index 56de22b..c0d80ab 100644 --- a/src/posts/poetry/infrared-homing.md +++ b/src/posts/poetry/infrared-homing.md @@ -1,12 +1,12 @@ --- categories: -- Poetry + - Poetry date: 2019-02-02 12:00:00 +0000 tags: -- Love -- Lovers -- Relationships -- Introspective + - Love + - Lovers + - Relationships + - Introspective title: Infrared Homing --- @@ -40,4 +40,3 @@ A candle Can't replace it, But any fire Is better than none. - diff --git a/src/posts/poetry/judge-judy.md b/src/posts/poetry/judge-judy.md index 6088d31..1a4df6b 100644 --- a/src/posts/poetry/judge-judy.md +++ b/src/posts/poetry/judge-judy.md @@ -1,12 +1,11 @@ --- categories: -- Poetry + - Poetry date: 2020-10-01 20:00:00 +0000 tags: -- Neuroscience -- Wisdom + - Neuroscience + - Wisdom title: Judge Judy - --- With each passing moment, @@ -28,4 +27,3 @@ The neurons are dismissed Then return to jury duty For another microcosm case In their show of Judge Judy. - diff --git a/src/posts/poetry/kings-pin.md b/src/posts/poetry/kings-pin.md index 54be007..a206191 100644 --- a/src/posts/poetry/kings-pin.md +++ b/src/posts/poetry/kings-pin.md @@ -1,10 +1,10 @@ --- categories: -- Poetry + - Poetry date: 2018-06-25 20:00:00 +0000 tags: -- Chess -- Lessons + - Chess + - Lessons title: King's Pin year: 2018 --- @@ -24,4 +24,3 @@ Synonymous to beginner. A satisfying poach Awarded to the winner. - diff --git a/src/posts/poetry/klepto-couches.md b/src/posts/poetry/klepto-couches.md index 2b54766..293c6a9 100644 --- a/src/posts/poetry/klepto-couches.md +++ b/src/posts/poetry/klepto-couches.md @@ -1,36 +1,36 @@ --- categories: -- Poetry + - Poetry date: 2014-10-27 00:00:00 +0000 tags: -- Humor + - Humor title: Klepto Couches - --- -My home houses countless couches. -Klepto-couches with pickpocket pouches -That swiftly swipe your cellular phone + +My home houses countless couches. +Klepto-couches with pickpocket pouches +That swiftly swipe your cellular phone Between the cushions of their comfy unknown. -Then your change jingles and jangles -Until they're untangled -From your Wrangler jeans pocket +Then your change jingles and jangles +Until they're untangled +From your Wrangler jeans pocket As you wonder where your socks went. -But your socks and shoes -Were swept under your feet +But your socks and shoes +Were swept under your feet Right under your nose. -So discreet are these deceitful seats -As they watch you search +So discreet are these deceitful seats +As they watch you search For the keys they stole. -At last your quest -Leads you straight to the crook. -"I should have guessed +At last your quest +Leads you straight to the crook. +"I should have guessed The klepto-couches had took!" -But still your lesson -Has yet to be learned. -These klepto-couches -Deserve to be burned. \ No newline at end of file +But still your lesson +Has yet to be learned. +These klepto-couches +Deserve to be burned. diff --git a/src/posts/poetry/leafblower.md b/src/posts/poetry/leafblower.md index 1ee7a6f..90238a6 100644 --- a/src/posts/poetry/leafblower.md +++ b/src/posts/poetry/leafblower.md @@ -1,33 +1,33 @@ --- categories: -- Poetry + - Poetry date: 2012-02-25 00:00:00 +0000 tags: -- Grounds -- Covenant + - Grounds + - Covenant title: Leafblower - --- -You're the girl sitting on the park bench. -I'm the guy with a leaf blower. -I've gotta do my job, + +You're the girl sitting on the park bench. +I'm the guy with a leaf blower. +I've gotta do my job, So would you kindly please move over? -I'm walking right towards you, -So don't say you didn't notice me. -I'd like to get off work soon, +I'm walking right towards you, +So don't say you didn't notice me. +I'd like to get off work soon, So I'll give you until the count of three. -One -Two +One +Two ... -Alright, so you've called my bluff. -I'm not really going to do anything. -I just wanted to look real tough, +Alright, so you've called my bluff. +I'm not really going to do anything. +I just wanted to look real tough, But this little bee ain't got no sting. -I'll just tell my boss that I missed a spot, -And I'll explain my sad situation. -Then we'll both laugh at the thought -Of me writing poetry about my frustration. \ No newline at end of file +I'll just tell my boss that I missed a spot, +And I'll explain my sad situation. +Then we'll both laugh at the thought +Of me writing poetry about my frustration. diff --git a/src/posts/poetry/molecules-and-men.md b/src/posts/poetry/molecules-and-men.md index f951552..1bd0ced 100644 --- a/src/posts/poetry/molecules-and-men.md +++ b/src/posts/poetry/molecules-and-men.md @@ -1,9 +1,9 @@ --- categories: -- Poetry + - Poetry date: 2019-10-26 12:00:00 +0000 tags: -- Wisdom + - Wisdom title: Of Molecules And Men --- @@ -49,4 +49,3 @@ To cease to be Is to become Every friend And alleged foe. - diff --git a/src/posts/poetry/monday-morning-shift.md b/src/posts/poetry/monday-morning-shift.md index e9b37a3..ea988d2 100644 --- a/src/posts/poetry/monday-morning-shift.md +++ b/src/posts/poetry/monday-morning-shift.md @@ -1,35 +1,35 @@ --- categories: -- Poetry + - Poetry date: 2012-03-01 00:00:00 +0000 tags: -- Grounds -- Covenant + - Grounds + - Covenant title: Monday Morning Shift - --- -These plants look beautiful, but not at this location. -They must be eradicated according to administration. -I brought out my tools; Some gloves and a spade, -Then sat down, Indian style, to begin the raid. -The roots, like little fingers, held on to dear life + +These plants look beautiful, but not at this location. +They must be eradicated according to administration. +I brought out my tools; Some gloves and a spade, +Then sat down, Indian style, to begin the raid. +The roots, like little fingers, held on to dear life As I cut through their homes with an oddly-shaped knife. -To justify these cruel killings -I thought of what they've done: -Suffocated the superior plants +To justify these cruel killings +I thought of what they've done: +Suffocated the superior plants And blocked out the lovely sun. -But what makes one plant superior and the other inferior? -Just the fact that the other has a beautiful exterior? -They are simply trying their best to make a living. +But what makes one plant superior and the other inferior? +Just the fact that the other has a beautiful exterior? +They are simply trying their best to make a living. We must see past our differences and be more forgiving. -But these thoughts lead down to a dangerous road; +But these thoughts lead down to a dangerous road; Let's not personify each seed we've sowed. -The sun now rises and heats the ground. -The ice embedded within melts all around, -And now a nice wet spot on my pants is found -Which leaves me thinking of thoughts more profound: -"I really hope no one's looking at me right now." \ No newline at end of file +The sun now rises and heats the ground. +The ice embedded within melts all around, +And now a nice wet spot on my pants is found +Which leaves me thinking of thoughts more profound: +"I really hope no one's looking at me right now." diff --git a/src/posts/poetry/morning-commute.md b/src/posts/poetry/morning-commute.md index c5edacb..db77670 100644 --- a/src/posts/poetry/morning-commute.md +++ b/src/posts/poetry/morning-commute.md @@ -1,13 +1,12 @@ --- categories: -- Poetry + - Poetry date: 2016-05-10 00:00:00 +0000 tags: -- Work -- Worry -- Self-conscious + - Work + - Worry + - Self-conscious title: Morning Commute - --- A few minutes into my morning commute @@ -24,4 +23,3 @@ So I ditched the car and snuck into work, Though I knew my hopes and dreams would be seen Swirled amidst my self-doubt and worries Like creamer mixed in bitter cups of caffeine. - diff --git a/src/posts/poetry/perfect-situation.md b/src/posts/poetry/perfect-situation.md index bbbe056..06469e9 100644 --- a/src/posts/poetry/perfect-situation.md +++ b/src/posts/poetry/perfect-situation.md @@ -1,14 +1,13 @@ --- categories: -- Poetry + - Poetry date: 2015-07-15 00:00:00 +0000 tags: -- Relationships -- Love -- Drinking -- Humor + - Relationships + - Love + - Drinking + - Humor title: Perfect Situation - --- When I'm hammered, @@ -32,5 +31,3 @@ And I speculate the odds Given a perfect situation In a parallel universe If I'd rise to the occasion. - - diff --git a/src/posts/poetry/silent-silas.md b/src/posts/poetry/silent-silas.md index ebeaaf5..3467e69 100644 --- a/src/posts/poetry/silent-silas.md +++ b/src/posts/poetry/silent-silas.md @@ -1,12 +1,11 @@ --- categories: -- Poetry + - Poetry date: 2016-12-20 00:00:00 +0000 tags: -- Introspective -- Silence + - Introspective + - Silence title: Silent Silas - --- The windows to my soul @@ -24,4 +23,3 @@ But if it's any consolation, I am striving to get better At voicing my own thoughts Without resorting to writing letters. - diff --git a/src/posts/poetry/thought-experiment.md b/src/posts/poetry/thought-experiment.md index 2789a5e..6f4a381 100644 --- a/src/posts/poetry/thought-experiment.md +++ b/src/posts/poetry/thought-experiment.md @@ -1,18 +1,15 @@ --- categories: -- Poetry + - Poetry date: 2014-07-20 00:00:00 +0000 tags: -- Love -- Relationships -- Realtalk + - Love + - Relationships + - Realtalk title: Thought Experiment - --- Love is a free fall And I'm afraid of the ground. If I jump and no one's there, Will my body make a sound? - - diff --git a/src/posts/poetry/unintentional-internalization.md b/src/posts/poetry/unintentional-internalization.md index 62cfad3..2ef14be 100644 --- a/src/posts/poetry/unintentional-internalization.md +++ b/src/posts/poetry/unintentional-internalization.md @@ -1,13 +1,12 @@ --- categories: -- Poetry + - Poetry date: 2017-10-10 00:00:00 +0000 tags: -- Wisdom -- Speech -- Verbal Abuse + - Wisdom + - Speech + - Verbal Abuse title: Unintentional Internalization - --- Our skin's as thick @@ -29,4 +28,3 @@ For each one we've endured, We've dealt so many more For the most innocuous remark Still can pierce like a sword. - diff --git a/src/posts/poetry/who-am-i-.md b/src/posts/poetry/who-am-i-.md index 637d54b..52348b5 100644 --- a/src/posts/poetry/who-am-i-.md +++ b/src/posts/poetry/who-am-i-.md @@ -1,33 +1,33 @@ --- categories: -- Poetry + - Poetry date: 2013-05-10 00:00:00 +0000 tags: -- Realtalk + - Realtalk title: Who Am I? - --- -Am I the clothes on my back -And the hair on my head? -Am I the people I'm with + +Am I the clothes on my back +And the hair on my head? +Am I the people I'm with And the words I've said? -Am I the field I study -And the school I attend? -Am I the programs I write +Am I the field I study +And the school I attend? +Am I the programs I write And the poems I've penned? -Am I the music I enjoy -And the guitar I play? -Am I the grade on my test +Am I the music I enjoy +And the guitar I play? +Am I the grade on my test And my ten page essay? -Am I the habits I've formed -And the phrases I repeat? -Am I the fake smile given +Am I the habits I've formed +And the phrases I repeat? +Am I the fake smile given To every person I meet? -Am I the religion I follow -And the politician I elect? -Am I every action I carry out -And every thought I reflect? \ No newline at end of file +Am I the religion I follow +And the politician I elect? +Am I every action I carry out +And every thought I reflect? diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 2ef4871..5bf368a 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -1,7 +1,52 @@ - - - - +
+ + +
+ +
+
diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index c00b942..20fda35 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -1,23 +1,106 @@ - - - console.log('clicked!')} -/> - - console.log('clicked!')} -/> - - console.log('clicked!')} -/> +
+
+ {#if visible && currentGreeting} +
+ {currentGreeting.greeting} + {#if currentGreeting.romanisation} + ( {currentGreeting.romanisation} ) + {/if} +
+

+ That's {currentGreeting.language} for hello! +

+ {/if} +
+
+

+ The name's Silas. I write code for a living, and sometimes for fun. I use Elixir + at my day job, and recently have been messing around with + Rust, + Svelte, and + three.js +

+

+ Here you can browse my shower thoughts and bad + poetry. Opinions are personally mine and not endorsed by my + employer. +

+

+ I tend to start a lot of projects, but I'm trying to + finish more. I also like to toy with weird web technologies and will host the + experiments here. +

+

+ I self-host a lot of services I find useful. None of them + run any analytics or log your activity, but the software/servers may be outdated, so use at your + own risk. +

+

Shalom.

+
+
diff --git a/src/routes/(app)/poetry/+page.server.ts b/src/routes/(app)/poetry/+page.server.ts new file mode 100644 index 0000000..191ad80 --- /dev/null +++ b/src/routes/(app)/poetry/+page.server.ts @@ -0,0 +1,15 @@ +export const load = async ({ fetch, url }) => { + const limit = 8; + + const page = Number(url.searchParams.get('page')) || 1; + + const response = await fetch(`/api/poetry?limit=${limit}&page=${page}`); + const { posts, total } = await response.json(); + + return { + posts, + total, + page, + limit + }; +}; diff --git a/src/routes/(app)/poetry/+page.svelte b/src/routes/(app)/poetry/+page.svelte index 2f6fb0f..876496f 100644 --- a/src/routes/(app)/poetry/+page.svelte +++ b/src/routes/(app)/poetry/+page.svelte @@ -1,39 +1,70 @@ -{#each data.posts as post, i} - -{/each} +
+
+

Poetry

+
+ + +
+{#if total > 1} + +{/if} diff --git a/src/routes/(app)/poetry/[slug]/+page.svelte b/src/routes/(app)/poetry/[slug]/+page.svelte index 7b595bd..a741e1c 100644 --- a/src/routes/(app)/poetry/[slug]/+page.svelte +++ b/src/routes/(app)/poetry/[slug]/+page.svelte @@ -1,19 +1,16 @@ - - - -
-

{title}

-
- -
+
+
+

{title}

- +
+ +
+ Back to Poetry +
diff --git a/src/routes/(app)/poetry/[slug]/+page.ts b/src/routes/(app)/poetry/[slug]/+page.ts index d0337f4..2249bb7 100644 --- a/src/routes/(app)/poetry/[slug]/+page.ts +++ b/src/routes/(app)/poetry/[slug]/+page.ts @@ -13,6 +13,7 @@ export async function load({ params }) { Content, title, date: validDate, - categories + categories, + post }; } diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7f068da..4fa864c 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,38 +1 @@ - - - - - - -
- - + diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index a032602..440bfd4 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -1,2 +1,2 @@ export const prerender = true -export const ssr = false +export const ssr = true diff --git a/src/routes/api/poetry/+server.ts b/src/routes/api/poetry/+server.ts index c58aecc..f74463c 100644 --- a/src/routes/api/poetry/+server.ts +++ b/src/routes/api/poetry/+server.ts @@ -2,13 +2,14 @@ import { fetchMarkdownPosts } from '$lib/utils'; import { json } from '@sveltejs/kit'; export const GET = async ({ url }) => { - const limit = Number(url.searchParams.get('limit')) || 6; - const offset = Number(url.searchParams.get('offset')) || 0; - const allPosts = await fetchMarkdownPosts('poetry', limit, offset); + const page = Number(url.searchParams.get('page')) || 1; + const limit = Number(url.searchParams.get('limit')) || 8; + const offset = (page - 1) * limit; + const {posts: allPosts, total: total} = await fetchMarkdownPosts('poetry', limit, offset); const sortedPosts = allPosts.sort((a, b) => { return new Date(b.meta.date).getTime() - new Date(a.meta.date).getTime(); }); - return json(sortedPosts); + return json({posts: sortedPosts, total: total, page: page}); }; diff --git a/src/routes/projects/+layout.svelte b/src/routes/projects/+layout.svelte new file mode 100644 index 0000000..0226f7e --- /dev/null +++ b/src/routes/projects/+layout.svelte @@ -0,0 +1,42 @@ + + + + + + + + + +
+ + diff --git a/src/routes/projects/+layout.ts b/src/routes/projects/+layout.ts new file mode 100644 index 0000000..a032602 --- /dev/null +++ b/src/routes/projects/+layout.ts @@ -0,0 +1,2 @@ +export const prerender = true +export const ssr = false diff --git a/src/routes/projects/+page.svelte b/src/routes/projects/+page.svelte new file mode 100644 index 0000000..cd1eda3 --- /dev/null +++ b/src/routes/projects/+page.svelte @@ -0,0 +1,37 @@ + + +{#each data.posts as post, i} + +{/each} diff --git a/src/routes/(app)/poetry/+page.ts b/src/routes/projects/+page.ts similarity index 100% rename from src/routes/(app)/poetry/+page.ts rename to src/routes/projects/+page.ts diff --git a/svelte.config.js b/svelte.config.js index a2de858..d72a93c 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -6,7 +6,10 @@ import { mdsvex } from 'mdsvex'; const config = { // Consult https://kit.svelte.dev/docs/integrations#preprocessors // for more information about preprocessors - preprocess: [vitePreprocess(), mdsvex({ extensions: ['.md'] })], + preprocess: [vitePreprocess(), mdsvex({ extensions: ['.md'], layout: { + poetry: './src/lib/utils/PoetryLayout.svelte' +}})], + kit: { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. diff --git a/tailwind.config.js b/tailwind.config.js index 5844d94..d75ccf0 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -4,6 +4,10 @@ export default { theme: { extend: {}, }, - plugins: [], + plugins: [require("@tailwindcss/typography"), require('daisyui')], + daisyui: { + themes: ["light", "forest"], + darkMode: "forest" + }, }