mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-04-16 05:38:33 +02:00
Add: Theme switcher
This commit is contained in:
@@ -12,4 +12,12 @@
|
||||
<!-- Direct custom CSS -->
|
||||
<link rel="stylesheet" href="{{ "css/custom.css" | relURL }}">
|
||||
|
||||
<!-- Theme switcher: run before paint to avoid flash -->
|
||||
<script>
|
||||
(function(){
|
||||
var t = localStorage.getItem('theme');
|
||||
if (t) { document.documentElement.setAttribute('data-theme', t); }
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{ partial "head/head-end.html" . }}
|
||||
|
||||
Reference in New Issue
Block a user