From bd3782cd93341722b64af1042a63f75d116f36b1 Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Fri, 21 Aug 2020 21:49:54 +0200 Subject: [PATCH 01/12] Resize post entries to h2 with no horizontal margin --- client/public/assets/styling/general.css | 5 +++++ client/public/posts.mjs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client/public/assets/styling/general.css b/client/public/assets/styling/general.css index 578adba..c1376ef 100644 --- a/client/public/assets/styling/general.css +++ b/client/public/assets/styling/general.css @@ -21,6 +21,11 @@ nav { font-style: italic; } +h2 { + font-size: 0.6em; + margin: auto 0; +} + @media (prefers-color-scheme: light) { :root { --primary-color: #ffffeb; diff --git a/client/public/posts.mjs b/client/public/posts.mjs index ff27c4b..e6fb25d 100644 --- a/client/public/posts.mjs +++ b/client/public/posts.mjs @@ -36,7 +36,7 @@ async function updatePosts() { month_DOM.textContent = month month_lists[i].forEach((post, i) => { - const post_DOM = document.createElement("h6") + const post_DOM = document.createElement("h2") post_DOM.textContent = `${post.date.substring(0, 10)} - ` const post_link = document.createElement("a") From 7a231173289331197e399c004f0f749d35eb6c1b Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Sat, 26 Sep 2020 18:22:07 +0200 Subject: [PATCH 02/12] Remove unneeded paragraph title --- client/public/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/client/public/index.html b/client/public/index.html index d1db1e4..778db61 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -30,7 +30,6 @@
Hi there, good to see you on my website. My name is Raymon Zutekouw (born on 29-08-2002) From 4b0f683901ea8bf6fe9e6c5f37b9b271f159aec3 Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Sat, 26 Sep 2020 18:25:41 +0200 Subject: [PATCH 03/12] Remove unneeded curly braces --- client/public/lib/me.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/public/lib/me.mjs b/client/public/lib/me.mjs index 8daaa17..768190a 100644 --- a/client/public/lib/me.mjs +++ b/client/public/lib/me.mjs @@ -4,14 +4,14 @@ export function age() { let age = now.getFullYear() - birthdate.getFullYear() - if (now.getMonth() < birthdate.getMonth()) { + if (now.getMonth() < birthdate.getMonth()) age-- - } + if ( birthdate.getMonth() === now.getMonth() && now.getDate() < birthdate.getDate() - ) { + ) age-- - } + return age } From 9d44aa5d4eda82b321bf089c5b7905433a9c141f Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Sat, 26 Sep 2020 18:27:58 +0200 Subject: [PATCH 04/12] Convert raw post content to HTML - Contains \n shorthand for a paragraph --- server/routes/api/posts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/routes/api/posts.js b/server/routes/api/posts.js index 7509328..cfeb6c8 100644 --- a/server/routes/api/posts.js +++ b/server/routes/api/posts.js @@ -73,7 +73,9 @@ routes.set('/rss.xml', async (req, res) => {
" + v + "
")}]]>