Dark mode

This commit is contained in:
Neale Pickett 2022-09-04 19:54:41 -06:00
parent aa685d51ac
commit 8e34265b76
5 changed files with 12 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#! /bin/sh #! /bin/sh
rm -rf $(dirname $0)/public
docker run \ docker run \
--rm -i \ --rm -i \
-v $(realpath $(dirname $0)):/src \ -v $(realpath $(dirname $0)):/src \

View File

@ -24,7 +24,6 @@
<main id="content"> <main id="content">
{{ block "main" . }}{{end}} {{ block "main" . }}{{end}}
<p id="timestamp">Last modified: {{.Lastmod | time.Format "2006-Jan-02"}}</p>
</main> </main>
<footer> <footer>
@ -40,6 +39,7 @@
<li><a href="mailto:neale@woozle.org">Email</a></li> <li><a href="mailto:neale@woozle.org">Email</a></li>
</ul> </ul>
</nav> </nav>
<p id="timestamp">Last modified: {{.Lastmod | time.Format "2006-Jan-02"}}</p>
</footer> </footer>
</body> </body>

1
run.sh
View File

@ -13,5 +13,6 @@ docker run \
--rm -i \ --rm -i \
-v $(realpath $(dirname $0)):/src \ -v $(realpath $(dirname $0)):/src \
-u $(id -u):$(id -g) \ -u $(id -u):$(id -g) \
-p 1313:1313 \
klakegg/hugo:ext server \ klakegg/hugo:ext server \
--baseURL "$baseURL" --baseURL "$baseURL"

View File

@ -159,4 +159,13 @@ button.big {
max-width: 60%; max-width: 60%;
} }
} }
@media (prefers-color-scheme: dark) {
html {
background-image: url("../images/bg-dark.jpg");
filter: invert(1);
}
img {
filter: invert(1);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB