LinkStack/resources/views
JulianPrieber a5c81158cf
Added dark mode detection
Added automatic dark mode detection to home.blade.php via a cookie with js.cookie.min.js (see previous commit).

Detecting the dark mode setting is done with JavaScript. The script detects the preferred dark mode setting in the client's browser and saves it with a cookie. If the script detects a change in this setting, it corrects the cookie. 

Loading the appropriate skeleton.css is done via PHP with an if-else statement. If the cookie (saved by the previous script) color scheme equals 'dark' it will load skeleton-dark.css (found in /littlelink/css). 

If dark mode is not detected OR nothing is detected/cookie is getting blocked, the statement defaults to skeleton-light.css (also found in /littlelink/css).

You could change what the if-else statement defaults to (i.e. which color scheme is loaded if the cookie fails to detect) by switching 'skeleton-dark.css' and 'skeleton-light.css' around (see comment in if statement).

Everything added is commented and marked with begin/end.


Credit to 'user1575941' on Stack Overflow who's commented code REALLY helped getting behind all this.
2022-02-18 10:08:24 +01:00
..
auth update auth header logo link and page margin top-bottom 2021-07-06 16:42:39 +07:00
components admin littlelink 2021-04-16 03:30:00 +04:30
layouts update auth header logo link and page margin top-bottom 2021-07-06 16:42:39 +07:00
panel Change public path 2022-02-14 12:56:03 +01:00
studio Change public path 2022-02-14 12:56:50 +01:00
home.blade.php Added dark mode detection 2022-02-18 10:08:24 +01:00
littlelink.blade.php Added button entrance animation 2022-02-17 22:09:58 +01:00
pages.blade.php admin littlelink 2021-04-16 03:30:00 +04:30