diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-11-12 10:37:49 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-11-16 13:06:03 +0100 |
commit | 50af81193c3ae78b23a4573f3fb69136462a883b (patch) | |
tree | 525ece59e4edf9f91f59a995835eb6ecc1a4c528 /modules | |
parent | de4c4f7fd445e7a59691e50edead472900270e59 (diff) |
luci-base: apply Browser/OS dark mode preference to index redirect page
Turn white body, black link into black body, white link if the Browser/OS
indicates dark mode preference.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/root/www/index.html | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/modules/luci-base/root/www/index.html b/modules/luci-base/root/www/index.html index 35c0ea0d32..bc3c98fe71 100644 --- a/modules/luci-base/root/www/index.html +++ b/modules/luci-base/root/www/index.html @@ -1,11 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> -<head> -<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> -<meta http-equiv="refresh" content="0; URL=cgi-bin/luci/" /> -</head> -<body style="background-color: white"> -<a style="color: black; font-family: arial, helvetica, sans-serif;" href="cgi-bin/luci/">LuCI - Lua Configuration Interface</a> -</body> + <head> + <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> + <meta http-equiv="refresh" content="0; URL=cgi-bin/luci/" /> + <style type="text/css"> + body { background: white; font-family: arial, helvetica, sans-serif; } + a { color: black; } + + @media (prefers-color-scheme: dark) { + body { background: black; } + a { color: white; } + } + </style> + </head> + <body> + <a href="cgi-bin/luci/">LuCI - Lua Configuration Interface</a> + </body> </html> |