ref: master
layouts/_partials/head.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>{{ .Title }}</title> <script> (function () { var stored = localStorage.getItem('theme'); if (stored === 'dark' || (!stored && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.documentElement.classList.add('dark'); } else { document.documentElement.classList.remove('dark'); } })(); </script> <link rel="alternate" type="application/rss+xml" title="RSS for {{ .Lang }}" href="{{ "index.xml" | relLangURL }}"> <link rel="icon" type="image/jpeg" href="/avatar.jpg"> {{ $style := resources.Get "style.scss" | css.Sass | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $style.RelPermalink }}" /> <style type="text/css" media="screen"> :root { --footnote-label: "{{ i18n "footnotes" }}"; } {{ partial "css/syntax-light.css" . | safeCSS }} .dark { {{ partial "css/syntax-dark.css" . | safeCSS }} } </style> </head> |