hugo-theme-relearn/layouts/partials/footer.html

96 lines
4.6 KiB
HTML
Raw Normal View History

2022-02-28 00:19:32 +00:00
</div>
</main><!-- #body-inner -->
{{- partial "custom-comments.html" . }}
2021-09-13 17:23:38 +00:00
</div><!-- #body -->
2022-02-28 00:19:32 +00:00
{{- partial "menu.html" . }}
<script src="{{"js/clipboard.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
<script src="{{"js/featherlight.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- $wantsMathJax := or (.Page.Store.Get "hasMathJax") (and (.Page.Store.Get (printf "%sIsNested" (partial "output-format.hugo" .Page))) (.Page.Store.Get "nestedHasMathJax")) }}
2022-07-02 12:00:23 +00:00
{{- if $wantsMathJax }}
{{- if isset .Params "mathjaxinitialize" }}
{{- $.Scratch.Set "mathJaxInitialize" .Params.mathJaxInitialize }}
{{- else if isset .Site.Params "mathjaxinitialize" }}
{{- $.Scratch.Set "mathJaxInitialize" .Site.Params.mathJaxInitialize }}
{{- else }}
{{- $.Scratch.Set "mathJaxInitialize" "{}" }}
{{- end }}
<script>
function useMathJax( config ){
window.MathJax = Object.assign( window.MathJax || {}, {
2022-07-02 12:00:23 +00:00
loader: {
load: ['[tex]/mhchem']
},
startup: {
elements: [
'.math'
]
},
tex: {
inlineMath: [
['$', '$'], // allow for single dollars as we set startup.elements
['\\(', '\\)']
]
},
options: {
enableMenu: false // avoid translation hassle for context menu
}
}, config );
}
useMathJax( JSON.parse({{ $.Scratch.Get "mathJaxInitialize" }}) );
</script>
{{- if isset .Params "custommathjaxurl" }}
<script id="MathJax-script" async src="{{ .Params.customMathJaxURL }}"></script>
{{- else if isset .Site.Params "custommathjaxurl" }}
<script id="MathJax-script" async src="{{ .Site.Params.customMathJaxURL }}"></script>
{{- else }}
<script id="MathJax-script" async src="{{"js/mathjax/tex-mml-chtml.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
{{- end }}
{{- end }}
{{- $wantsMermaid := or (.Page.Store.Get "hasMermaid") (and (.Page.Store.Get (printf "%sIsNested" (partial "output-format.hugo" .Page))) (.Page.Store.Get "nestedHasMermaid")) }}
{{- if $wantsMermaid }}
<script src="{{"js/jquery.svg.pan.zoom.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- if isset .Params "custommermaidurl" }}
<script src="{{ .Params.customMermaidURL }}" defer></script>
{{- else if isset .Site.Params "custommermaidurl" }}
<script src="{{ .Site.Params.customMermaidURL }}" defer></script>
{{- else }}
<script src="{{"js/mermaid.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- end }}
{{- if isset .Params "mermaidinitialize" }}
{{- $.Scratch.Set "mermaidInitialize" .Params.mermaidInitialize }}
{{- else if isset .Site.Params "mermaidinitialize" }}
{{- $.Scratch.Set "mermaidInitialize" .Site.Params.mermaidInitialize }}
{{- else }}
{{- $.Scratch.Set "mermaidInitialize" "{}" }}
{{- end }}
<script>
window.themeUseMermaid = JSON.parse({{ $.Scratch.Get "mermaidInitialize" }});
</script>
{{- end }}
{{- $wantsSwagger := or (.Page.Store.Get "hasSwagger") (and (.Page.Store.Get (printf "%sIsNested" (partial "output-format.hugo" .Page))) (.Page.Store.Get "nestedHasSwagger")) }}
{{- if $wantsSwagger }}
{{- if isset .Params "customswaggerurl" }}
<script src="{{ .Params.customSwaggerURL }}" defer></script>
{{- else if isset .Site.Params "customswaggerurl" }}
<script src="{{ .Site.Params.customSwaggerURL }}" defer></script>
{{- else }}
<script src="{{ "js/rapidoc-min.js" | relURL }}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- end }}
{{- if isset .Params "swaggerinitialize" }}
{{- $.Scratch.Set "swaggerInitialize" .Params.swaggerInitialize }}
{{- else if isset .Site.Params "swaggerinitialize" }}
{{- $.Scratch.Set "swaggerInitialize" .Site.Params.swaggerInitialize }}
{{- else }}
{{- $.Scratch.Set "swaggerInitialize" "{}" }}
{{- end }}
<script>
window.themeUseSwagger = JSON.parse({{ $.Scratch.Get "swaggerInitialize" }});
</script>
{{- end }}
<script src="{{"js/theme.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
{{- partial "custom-footer.html" . }}
</body>
</html>