From 92cc35522658c8702a09aca79a23bee18be76b4c Mon Sep 17 00:00:00 2001 From: janis Date: Mon, 23 Jan 2023 19:40:07 +0100 Subject: [PATCH] fix dark mode link color --- website/css/docs/style.css | 4 ++++ website/docs/src/build.js | 2 +- website/js/docs/loader.js | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/website/css/docs/style.css b/website/css/docs/style.css index 7b76f5b..afa8339 100644 --- a/website/css/docs/style.css +++ b/website/css/docs/style.css @@ -32,6 +32,10 @@ html, body { 'menu footer footer footer footer'; } +.docs-link { + color: blue; +} + .logo { width: 60%; height: auto; diff --git a/website/docs/src/build.js b/website/docs/src/build.js index c660706..d86a609 100644 --- a/website/docs/src/build.js +++ b/website/docs/src/build.js @@ -42,7 +42,7 @@ function parseJS ( filepath ) { } function checkLinks ( html ) { - + } function storeHTML ( html, path ) { diff --git a/website/js/docs/loader.js b/website/js/docs/loader.js index dcff31b..f79d2ce 100644 --- a/website/js/docs/loader.js +++ b/website/js/docs/loader.js @@ -17,6 +17,7 @@ function setTheme () { $( '.nav-subitem' ).css( 'background-color', 'rgb(18, 18, 99)' ); $( '.navitem' ).css( 'background-color', 'rgb(12, 12, 60)' ); $( '.nav-container' ).css( 'background-color', 'rgb(0, 0, 100)' ); + $( '.docs-link' ).css( 'color', 'white' ); } } @@ -41,16 +42,18 @@ function setPreferredTheme ( userTheme ) { function toggleDarkMode () { if ( theme == 'light' ) { $( '.content' ).animate( { 'background-color': 'rgb(46, 46, 46)' } ); + $( '.content' ).animate( { 'color': 'white' } ); + $( '.docs-link' ).animate( { 'color': 'white' } ); $( '.top-container' ).animate( { 'background-color': 'rgb(100, 100, 100)' } ); $( '.nav-subitem' ).animate( { 'background-color': 'rgb(18, 18, 99)' } ); $( '.navitem' ).animate( { 'background-color': 'rgb(12, 12, 60)' } ); $( '.nav-container' ).animate( { 'background-color': 'rgb(0, 0, 100)' } ); - $( '.content' ).animate( { 'color': 'white' } ); document.getElementById( 'darkToggle' ).innerHTML = '☼'; setPreferredTheme( 'dark' ); } else { $( '.content' ).animate( { 'background-color': 'white' } ); $( '.content' ).animate( { 'color': 'black' } ); + $( '.docs-link' ).animate( { 'color': 'blue' } ); $( '.nav-subitem' ).animate( { 'background-color': 'rgb(27, 27, 165)' } ); $( '.navitem' ).animate( { 'background-color': 'rgb(22, 22, 117)' } ); $( '.nav-container' ).animate( { 'background-color': 'blue' } );