summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorFrancesco <tomaselli.fr@gmail.com>2024-04-22 17:12:48 +0200
committerFrancesco <tomaselli.fr@gmail.com>2024-04-22 17:12:48 +0200
commitb34fd641941143b856d5721b89d6233d5dbbe3d3 (patch)
tree1df8a693aa6402cdfc2cddfdf21b30f432d2a3b7 /assets
parent65817dee0444e28ec0b5da2a75a15aab55dbe730 (diff)
Theme Update
Diffstat (limited to 'assets')
-rw-r--r--assets/css/main.css9
-rw-r--r--assets/js/main.js15
2 files changed, 23 insertions, 1 deletions
diff --git a/assets/css/main.css b/assets/css/main.css
index 0d6d5d8..e43e93b 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -281,4 +281,13 @@ footer a {
.autonumber h4:before {
content: counter(h2-counter) "." counter(h3-counter) "." counter(h4-counter) "\00a0\00a0";
+}
+
+/* Dark mode */
+.dark .img-light {
+ display: none !important;
+}
+
+.light .img-dark {
+ display: none !important;
} \ No newline at end of file
diff --git a/assets/js/main.js b/assets/js/main.js
index e2aac52..b27f7f1 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -1 +1,14 @@
-console.log('This site was generated by Hugo.');
+const images = document.querySelectorAll('img');
+
+images.forEach(img => {
+
+ if (img.src.endsWith('#dark-mode')) {
+
+ console.log('found');
+
+ img.onload = function () {
+ console.log(`Image loaded: ${img.src}`);
+ };
+
+ }
+}); \ No newline at end of file