feat: use CSS prefers-color-scheme for dark mode (no JS)
- Remove inline JS that sets data-theme from localStorage - Use @media (prefers-color-scheme: dark) in CSS for automatic dark mode - Remove JS-dependent theme toggle from preferences - Theme now follows system preference automatically Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8f2fd671f1
commit
056d2d1175
3 changed files with 3 additions and 31 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{{define "base"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="light">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
|
@ -12,7 +12,6 @@
|
|||
<link rel="icon" href="/static/img/favicon.svg" type="image/svg+xml">
|
||||
<link title="samsa" type="application/opensearchdescription+xml" rel="search" href="/opensearch.xml">
|
||||
<meta name="samsa" content="samsa">
|
||||
<script>var s=document.documentElement;s.setAttribute('data-theme',localStorage.getItem('samsa-theme')||'light');</script>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue