MATH201/themes/zettels/layouts/_default/baseof.html

127 lines
4.1 KiB
HTML
Raw Normal View History

2023-09-27 10:58:42 -06:00
<!DOCTYPE html>
<html lang="{{ .Language.Lang }}">
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" integrity="sha384-GvrOXuhMATgEsSwCs4smul74iXGOixntILdUW9XmUC6+HX0sLNAK3q71HotJqlAn" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js" integrity="sha384-cpW21h6RZv/phavutF+AuVYrr+dA8xD9zs6FwLpaCct6O9ctzYFfFr4dgmgccOTx" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ .Content | truncate 300 }}">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `
<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
{{ $manifest := resources.Get "manifest.json" }}
<link rel="manifest" href="{{ $manifest.Permalink }}">
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{ $.Scratch.Set "title" "" }}
{{ if eq (.Param "bear") true }}
{{ $.Scratch.Set "title" .File.BaseFileName }}
{{ else }}
{{ $.Scratch.Set "title" .Title }}
{{ end }}
{{ $title := $.Scratch.Get "title" }}
{{- $siteTitle := ( .Site.Title ) -}}
{{- if .IsHome -}}
<title>{{ $siteTitle }}</title>
{{- else -}}
<title>{{ $title }} - {{ $siteTitle }}</title>
{{- end -}}
{{ $theme := .Param "theme" }}
{{ $themeRoute := printf "%s%s%s" "css/themes/" $theme ".css" }}
{{ $themeVariables := resources.Get $themeRoute }}
{{ $styles := resources.Get "css/style.scss" | toCSS }}
{{ $syntax := resources.Get "css/utilities/syntax-light.css"}}
{{ $main := slice $themeVariables $styles $syntax | resources.Concat "css/main.css" | minify | fingerprint }}
<link rel="stylesheet" href="{{ $main.Permalink }}" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
{{ $turbolinks := resources.Get "js/turbolinks.js" }}
{{ $thumbnails := resources.Get "js/thumbnails.js" }}
{{ $search := resources.Get "js/search.js" }}
{{ $.Scratch.Set "jslibs" slice }}
{{ $libs := slice "js/turbolinks.js" "js/thumbnails.js" "js/search.js" }}
{{ range $libs }}
{{ $.Scratch.Add "jslibs" (resources.Get . ) }}
{{ end }}
{{ $js := .Scratch.Get "jslibs" | resources.Concat "js/main.js" }}
{{ if .Site.IsServer }}
<script src="{{ $js.Permalink }}"></script>
{{ else }}
{{ $js := $js | minify | fingerprint }}
<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
{{ end }}
</head>
<body>
{{ partialCached "search.html" . }}
{{ partialCached "toolbar.html" . }}
{{ partial "tests/main.html" . }}
<main id="main">
<div id="note-wrapper" class="note-wrapper">
{{ block "main" . }}{{ end }}
</div>
</main>
<script type="text/javascript">
function renderMath(){ renderMathInElement(document.body, {
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true}
],
throwOnError : false
});
}
//document.addEventListener("DOMContentLoaded", renderMath);
//renderMath();
if (document.readyState !== 'loading'){
renderMath();} else {
document.addEventListener("DOMContentLoaded", renderMath);}
// (function() {
//
// var doc_ols = document.getElementsByTagName("ol");
//
// for ( i=0; i<doc_ols.length; i++) {
//
// var ol_start = doc_ols[i].getAttribute("start") - 1;
// doc_ols[i].setAttribute("style", "counter-reset:ol_counter " + ol_start + ";");
//
// }
//
// })();
</script>
</body>
</html>