From e864a43bce766ce53b6d3d454f3db6421013d095 Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:43:44 +0100 Subject: [PATCH 1/8] fix ascii formating --- 404.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/404.html b/404.html index fd6cf27..e559658 100644 --- a/404.html +++ b/404.html @@ -62,7 +62,7 @@ background-color: #220707; } - pre, p, em, br, a { + p, em, br, a { z-index: 4; opacity: 0.9; From c5147085c0d01cb036838e1c049e17c8471f1b25 Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:50:21 +0100 Subject: [PATCH 2/8] update link --- archive.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archive.html b/archive.html index 0cb45ad..903b30e 100644 --- a/archive.html +++ b/archive.html @@ -55,7 +55,7 @@

Archive

-> A RPG gamemode with a explorable world, custom weapons, npc's with AI, and a main quest!

[?] Is currently not being worked on anymore.


-

VISIT PAGE

+

VISIT PAGE

..

From 1c41149d388220979e13eaa2fcb8bf3ca45c00fa Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:52:01 +0100 Subject: [PATCH 3/8] add comments --- src/js/config.js | 4 ++-- src/js/modules/animations.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/config.js b/src/js/config.js index 4c6c20f..818c98c 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -1,6 +1,6 @@ export const CONFIG = { defaultTheme: 'ocean', - seasonalTheme: false, // will change the default theme based on the date + seasonalTheme: false, // will change the default theme based on the date (unless a theme is already set in local storage) // effects effectsDisabledByDefault: false, @@ -20,6 +20,6 @@ export const CONFIG = { // blog blogUrl: 'https://data.richardapps.net/blog.xml', // example: '/src/example/blog.xml' useExample: false, - writeAnimationOnPostOpen: true, + writeAnimationOnPostOpen: false, showEstimatedReadTime: true, }; diff --git a/src/js/modules/animations.js b/src/js/modules/animations.js index e9ec6b7..b1ce0bd 100644 --- a/src/js/modules/animations.js +++ b/src/js/modules/animations.js @@ -75,7 +75,7 @@ export function tabAnimation(tab, fadeInDelay = 16) { }, delay); delay += fadeInDelay; - // add write-animation to text elements + // add write-animation to text elements if enabled in config.js if ( CONFIG.writeAnimationOnTabChange && (element.tagName === 'P' || From 146e2e818dc8262ae0ba77f600aeb5e5ba9ce2a0 Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:52:45 +0100 Subject: [PATCH 4/8] Add quick blog link --- src/js/modules/blog.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/js/modules/blog.js b/src/js/modules/blog.js index 39f4e1f..c378cb3 100644 --- a/src/js/modules/blog.js +++ b/src/js/modules/blog.js @@ -91,18 +91,22 @@ export function openPost(postId) { const post = posts.find((p) => p.id === postId); if (post) { POSTS_CONTAINER.innerHTML = ` -
-
- [${post.date}] - ${post.title} +
+ BLOG + > ${post.title} +
+
+
+ + ${post.title} ${CONFIG.showEstimatedReadTime ? convertReadTime(post.timeToRead) : ''} -
-
-

${post.content}

-
-
-
< Back to postsShare
- `; +
+
+

${post.content}

+
+
+
< Back to postsShare
+ `; const postShareBtn = document.getElementById('post-share-btn'); postShareBtn.addEventListener('click', () => { copyClipboard(window.location.href, postShareBtn, 'Link copied!'); From f983e1b424e54a19a01ac40829a8bb7e40391f28 Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:53:40 +0100 Subject: [PATCH 5/8] Improve theme-selection list --- assets/css/style.css | 66 ++++++++++++++++++++++++++++++++++++----- src/js/modules/theme.js | 10 +++++-- 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index f87b245..81b93af 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -49,6 +49,10 @@ body { font-family: 'Terminus', 'Courier New', monospace; } +.show-noscript { + display: none; +} + /* BACKGROUND AND OVERLAYS */ #rain-vid, #noise-overlay, @@ -163,7 +167,7 @@ a { a:hover { background-color: var(--main-color); cursor: pointer; - color: rgba(24, 45, 75, 0.616); + color: rgb(28, 38, 53); transition: box-shadow 0.1s, background-color 0s, color 0s; @@ -213,7 +217,7 @@ summary::marker { summary:hover { cursor: pointer; background-color: var(--main-color); - color: rgba(24, 45, 75, 0.616); + color: rgba(24, 45, 75, 0.8); } details[open] summary { @@ -309,8 +313,9 @@ nav ul li a { .tab-active { background-color: var(--main-color); - color: rgba(24, 45, 75, 0.616); + color: rgba(6, 21, 43, 0.664); text-decoration: none; + font-weight: bolder; } /* PRINT ANIMATION WHEN CHANGING TABS AND ON PAGE LOAD */ @@ -401,6 +406,43 @@ nav ul li a { margin-bottom: 0.5em; } +#theme-list p { + border: 1px solid rgba(var(--bg-color), 0.5); + height: 1.75em; +} + +#theme-list p a { + text-transform: uppercase; + text-decoration: none; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + + background: radial-gradient( + ellipse at center, + transparent 0%, + rgba(var(--bg-color), 0.1) 30%, + rgba(var(--bg-color), 0.8) 120% + ); + background-size: 350% 350%; + background-position: center; + transition: background-size 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +#theme-list p a[class*='active'], +#theme-list p a:hover { + box-shadow: none; + color: var(--main-color); + outline: 1px inset var(--main-color); + + background-size: 100% 100%; +} + +#theme-list p a:hover { + filter: brightness(1.25) saturate(1.3); +} + /* PROJECTS TAB */ #pr-list { padding-left: 0; @@ -665,7 +707,7 @@ nav ul li a { } } -@media screen and (max-width: 1050px) { +@media screen and (max-width: 1150px) { #title { font-size: 2.3vw; margin-bottom: 2em; @@ -676,6 +718,9 @@ nav ul li a { .tabs { padding: 0.75em; } + .grid-row-box-shrink { + flex-shrink: 3; + } } @media screen and (min-width: 1600px) { @@ -688,6 +733,12 @@ nav ul li a { } } +@media screen and (min-width: 2060px) { + #grunge-overlay { + opacity: calc(var(--grunge-overlay-opacity) - 0.4); + } +} + @media (hover: none) { summary:hover { background-color: transparent; @@ -695,11 +746,10 @@ nav ul li a { } } -/* To comply with outlinenone.com */ -:focus { - outline: 2px solid var(--main-color); +:focus-visible { + outline: 1px solid white; color: var(--main-color); - background: rgba(var(--bg-color), 0.3); + background: rgba(var(--bg-color), 0.4); text-decoration: none; } diff --git a/src/js/modules/theme.js b/src/js/modules/theme.js index db816cc..e870ac4 100644 --- a/src/js/modules/theme.js +++ b/src/js/modules/theme.js @@ -79,7 +79,13 @@ export function changeTheme(theme, save = true) { // update theme list by adding '>' and '<' to the current theme name and removing them from the others if (document.getElementById('theme-list')) { document.querySelectorAll('#theme-list p a').forEach((link) => { - link.textContent = link.dataset.theme === theme ? `> ${theme} <` : link.dataset.theme; + if (link.dataset.theme === theme) { + link.textContent = `> ${theme} <`; + link.classList.add('active'); + } else { + link.textContent = link.dataset.theme; + link.classList.remove('active'); + } }); } } @@ -110,7 +116,7 @@ export function addThemeList() { // separate special cases if (document.getElementById('rainy')) { const rainy = document.getElementById('rainy'); - rainy.style.marginTop = '1em'; + rainy.style.marginTop = '1.5em'; } } From 7c251d54eef539f2a8f5add93259ca85e3ea405f Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:54:22 +0100 Subject: [PATCH 6/8] update rounded option --- assets/css/effects.css | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/assets/css/effects.css b/assets/css/effects.css index 8e448b7..a009b28 100644 --- a/assets/css/effects.css +++ b/assets/css/effects.css @@ -77,20 +77,33 @@ em { /* - rounded design - */ /* :root { - --br: 20px; + --br: 20px; } nav ul { - border: solid var(--main-color); - padding: .25em; + border: solid var(--main-color); + padding: 0.5em 0; } nav ul li a { - padding: .5em; + padding: 0.5em; } -summary, #welcome-title, a, .tabs, #pr-list li, img, .grid-row-box, nav ul, .pr-title, .post, .tag { - border-radius: var(--br); +summary, +#welcome-title, +a, +.tabs, +#pr-list li, +img, +.grid-row-box, +nav ul, +.pr-title, +.post, +.tag, +#theme-list p, +.tooltip, +.post-time-to-read { + border-radius: var(--br); } */ /* - additional glow - */ From 781c0faa6da11f008084534dd979c61d29a108bb Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:55:01 +0100 Subject: [PATCH 7/8] fix effect-toggle link --- src/js/modules/effects.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/modules/effects.js b/src/js/modules/effects.js index e7a5f40..70e7cda 100644 --- a/src/js/modules/effects.js +++ b/src/js/modules/effects.js @@ -36,9 +36,9 @@ export function initEffectsToggle() { document.getElementById('toggle-effects').style.display = 'none'; } else { const nfbText = document.getElementById('toggle-effects'); - nfbText.innerHTML = `Don't like the effects? Click HERE to turn them ${ - effectsDisabled ? 'on' : 'off' - }.`; + nfbText.innerHTML = `${ + effectsDisabled ? 'Enable effects?' : "Don't like the effects?" + } Click HERE to turn them ${effectsDisabled ? 'on' : 'off'}.`; document.getElementById('toggle-effects-link').addEventListener('click', (event) => { event.preventDefault(); @@ -49,7 +49,7 @@ export function initEffectsToggle() { export function initEffects() { if ( - window.matchMedia('(max-width: 767px)').matches && + window.matchMedia('(max-width: 767px)').matches && // Disable effects on mobile by default !('effectsDisabled' in localStorage) && CONFIG.effectsDisabledByDefaultMobile ) { From 84a6ec358508de6f6b8803015a727cca2d59c33c Mon Sep 17 00:00:00 2001 From: Richard-Apps <66631299+Richard-Apps@users.noreply.github.com> Date: Tue, 24 Dec 2024 13:55:31 +0100 Subject: [PATCH 8/8] Improve experience if JavaScript is disabled --- index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index ff3bebb..54de7bd 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ - + @@ -50,6 +50,9 @@

You are viewing a limited version of this site because .hide-noscript { display: none; } + .show-noscript { + display: block; + } #noscript-warning { color: rgb(245, 67, 67); text-align: center; @@ -93,7 +96,7 @@

Coding, photography, 3D-art and personal projects!

  • Home
  • Projects
  • Pictures
  • -
  • Blog
  • +
  • Blog
  • Resources
  • About
  • @@ -294,6 +297,7 @@

    Resources

    Blog

    +

    Sorry, you need to enable JavaScript to view the blog page.