diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-05-24 22:22:07 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-05-24 22:22:07 +0200 |
commit | a19196cee506556ed06ce2963bbcfa0004469e74 (patch) | |
tree | d83e2237facc6a7ef0a7540f058742be0fe229a9 /share/html_detail_start | |
parent | 5814bd16d520b779dce68d69241c940921080a4f (diff) |
add an optional detail page. more EXIF to come.
Diffstat (limited to 'share/html_detail_start')
-rw-r--r-- | share/html_detail_start | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/share/html_detail_start b/share/html_detail_start new file mode 100644 index 0000000..2cd32ec --- /dev/null +++ b/share/html_detail_start @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html> +<head> + <title><!-- $title --></title> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link rel="stylesheet" type="text/css" href=".data/css/main.css"/> + <link rel="stylesheet" type="text/css" href=".data/css/light.css" id="theme"/> + <script> + function addStyleSheet(name, id) { + var path = '.data/css/' + name + '.css'; + var old = document.getElementById(id); + if (old && (old.href != path)) { + old.href = path; + } + } + var otherTheme = { + 'dark': 'light', + 'light': 'dark', + }; + var currentTheme = localStorage.getItem('theme'); + if (!otherTheme.hasOwnProperty(currentTheme)) { + currentTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; + } + addStyleSheet(currentTheme, 'theme'); + + function toggleTheme() { + currentTheme = otherTheme[currentTheme] || 'light'; + localStorage.setItem('theme', currentTheme); + addStyleSheet(currentTheme, 'theme'); + } + </script> +</head> +<body> |