update head and toc components

pyrox.dev 2b13e23a 6886f5c8

verified
Changed files
+8 -5
src
+6 -3
src/_components/head.vto
···
<link rel="canonical" href="{{ url |> url(true) }}" />
<title>{{ title }}</title>
{{ if !production }}
-
<script defer="defer" src="/static/scripts/open-in-editor.js"></script>
+
<script defer src="/static/scripts/open-in-editor.js"></script>
{{# Load Sa11y #}}
-
<link rel="preconnect" href="https://cnd.jsdelivr.net">
+
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/ryersondmp/sa11y@latest/dist/css/sa11y.min.css"
···
<script
src="https://cdn.jsdelivr.net/combine/gh/ryersondmp/sa11y@latest/dist/js/lang/en.umd.js,gh/ryersondmp/sa11y@latest/dist/js/sa11y.umd.min.js"
></script>
-
<script>
+
<script defer>
Sa11y.Lang.addI18n(Sa11yLangEn.strings);
const sa11y = new Sa11y.Sa11y({
checkRoot: "body",
···
});
</script>
{{ /if }}
+
+
{{# Disable Dark Reader #}}
+
<meta name="darkreader-lock">
+2 -2
src/_components/table_of_contents.vto
···
-
<nav class="toc">
-
<h2 class="text-overlay1 mb-1">Table of Contents</h2>
+
<nav class="toc" aria-labelledby="toc-header">
+
<h2 class="text-overlay1 mb-1" id="toc-header">Table of Contents</h2>
<ol class="toc-l1">
{{ for item of toc }}
<li>