style: support dark theme

This commit is contained in:
SerKo 2022-04-08 05:11:20 +08:00
parent 5baa434da4
commit 57fb3a42b5
3 changed files with 7 additions and 2 deletions

View File

@ -2,8 +2,8 @@
<html>
{{- partial "head.html" . -}}
<body>
<nav class="w:full h:90 fixed bg:white">
<body class="bg:gray-90@dark font:gray-15@dark">
<nav class="w:full h:90 fixed bg:gray-88@dark bg:white">
<div class="
h:full
w:full

View File

@ -51,6 +51,7 @@
r:8_:where(pre)
overflow:auto_:where(pre)
bg:gray-3_:where(pre,code:not(.highlight_*))
bg:gray-93_:where(pre,code:not(.highlight_*))@dark
p:2;4_:where(code:not(.highlight_*))
r:4_:where(code:not(.highlight_*))

View File

@ -17,4 +17,8 @@
<link href="https://unpkg.com/@master/normal.css" rel="stylesheet">
<script src="https://unpkg.com/@master/style"></script>
<script src="https://unpkg.com/@master/styles"></script>
<script>
window.matchMedia('(prefers-color-scheme: dark)').matches && document.documentElement.classList.add("dark");
</script>
</head>