summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
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