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

130 lines
4.3 KiB
HTML
Raw Permalink 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.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"
onload="renderMathInElement(document.body);"></script>
2023-09-27 10:58:42 -06:00
<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">
2023-10-08 13:37:18 -06:00
function renderMath(){
const macros = {'\\cancelto': '\\overset{\\phantom{\\normalsize{\\cancel{#2}}}\\hspace{1em}#1}{\\cancel{#2}}'};
renderMathInElement(document.body, {
2023-09-27 10:58:42 -06:00
delimiters: [
{left: '$$', right: '$$', display: true},
{left: '$', right: '$', display: false},
{left: '\\(', right: '\\)', display: false},
{left: '\\[', right: '\\]', display: true}
],
2023-10-08 13:37:18 -06:00
throwOnError : false,
macros : macros
2023-09-27 10:58:42 -06:00
});
}
//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>