+ `;
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!