From 25f45dfb071e1b58ba2ec850f4ed1f1e08611064 Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Mon, 19 Jul 2021 16:41:33 +0200 Subject: [PATCH] [rain.js,notfound.sass] F Fix rain color on light color scheme --- themes/doublefourteen/assets/js/rain.js | 6 ++++-- themes/doublefourteen/assets/sass/notfound.sass | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/themes/doublefourteen/assets/js/rain.js b/themes/doublefourteen/assets/js/rain.js index aacdca4..09d3556 100644 --- a/themes/doublefourteen/assets/js/rain.js +++ b/themes/doublefourteen/assets/js/rain.js @@ -24,7 +24,7 @@ * for the JavaScript code in this page. * ----------------------------------------------- */ -particlesJS('particles-bg', +particlesJS("particles-bg", { "particles": { @@ -36,7 +36,9 @@ particlesJS('particles-bg', } }, "color": { - "value": "#ffffff" + "value": window.getComputedStyle( + document.getElementById("particles-bg") + ).getPropertyValue("--notfound-particles-color").trim() }, "shape": { "type": "circle" diff --git a/themes/doublefourteen/assets/sass/notfound.sass b/themes/doublefourteen/assets/sass/notfound.sass index 8406842..e95fdd8 100644 --- a/themes/doublefourteen/assets/sass/notfound.sass +++ b/themes/doublefourteen/assets/sass/notfound.sass @@ -27,6 +27,8 @@ size: 144px 256px #particles-bg + --notfound-particles-color: #000 + position: absolute width: 100% height: 100% @@ -39,3 +41,7 @@ text-align: center .notfound-page flex-direction: column + +@media (prefers-color-scheme:dark) + #particles-bg + --notfound-particles-color: #fff