blowfish/layouts/partials/vendor.html

65 lines
3 KiB
HTML
Raw Normal View History

2023-01-14 17:05:10 -06:00
{{/* jQuery */}}
{{ $jqueryLib := resources.Get "lib/jquery/jquery.slim.min.js" }}
<script src="{{ $jqueryLib.RelPermalink }}" integrity="{{ $jqueryLib.Data.Integrity }}"></script>
2022-09-10 14:05:37 -05:00
{{/* Mermaid */}}
{{ if .Page.HasShortcode "mermaid" }}
2023-03-02 16:28:51 -06:00
{{ $mermaidLib := resources.Get "lib/mermaid/mermaid.esm.min.mjs" }}
2023-01-08 15:44:15 -06:00
{{ $mermaidConfig := resources.Get "js/mermaid.js" }}
{{ $mermaidConfig := $mermaidConfig | resources.Minify }}
{{ $mermaidJS := slice $mermaidLib $mermaidConfig | resources.Concat "js/mermaid.bundle.js" | resources.Fingerprint
"sha512" }}
2023-03-02 16:28:51 -06:00
<!--script defer type="text/javascript" src="{{ $mermaidJS.RelPermalink }}"
integrity="{{ $mermaidJS.Data.Integrity }}"></script-->
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });
</script>
2022-09-10 14:05:37 -05:00
{{ end }}
2023-01-08 15:44:15 -06:00
2022-09-10 14:05:37 -05:00
{{/* Chart */}}
{{ if .Page.HasShortcode "chart" }}
2023-01-08 15:44:15 -06:00
{{ $chartLib := resources.Get "lib/chart/chart.min.js" }}
{{ $chartConfig := resources.Get "js/chart.js" }}
{{ $chartConfig := $chartConfig | resources.Minify }}
{{ $chartJS := slice $chartLib $chartConfig | resources.Concat "js/chart.bundle.js" | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" src="{{ $chartJS.RelPermalink }}"
integrity="{{ $chartJS.Data.Integrity }}"></script>
2022-09-10 14:05:37 -05:00
{{ end }}
2023-01-08 15:44:15 -06:00
2022-09-10 14:05:37 -05:00
{{/* Katex */}}
{{ if .Page.HasShortcode "katex" }}
2023-01-08 15:44:15 -06:00
{{ $katexCSS := resources.Get "lib/katex/katex.min.css" }}
{{ $katexCSS := $katexCSS | resources.Fingerprint "sha512" }}
<link type="text/css" rel="stylesheet" href="{{ $katexCSS.RelPermalink }}" integrity="{{ $katexCSS.Data.Integrity }}" />
{{ $katexJS := resources.Get "lib/katex/katex.min.js" }}
{{ $katexJS := $katexJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexJS.RelPermalink }}" integrity="{{ $katexJS.Data.Integrity }}"></script>
{{ $katexRenderJS := resources.Get "lib/katex/auto-render.min.js" }}
{{ $katexRenderJS := $katexRenderJS | resources.Fingerprint "sha512" }}
<script defer src="{{ $katexRenderJS.RelPermalink }}" integrity="{{ $katexRenderJS.Data.Integrity }}"
onload="renderMathInElement(document.body);"></script>
{{ $katexFonts := resources.Match "lib/katex/fonts/*" }}
{{ range $katexFonts }}
<!-- {{ .RelPermalink }} -->
2022-09-10 14:05:37 -05:00
{{ end }}
2023-01-08 15:44:15 -06:00
{{ end }}
{{/* TypeIt */}}
{{ if .Page.HasShortcode "typeit" }}
{{ $typeitLib := resources.Get "lib/typeit/typeit.umd.js" }}
2023-01-13 20:19:32 -06:00
<script defer src="{{ $typeitLib.RelPermalink }}" integrity="{{ $typeitLib.Data.Integrity }}"></script>
{{ end }}
{{/* Packery */}}
{{ if .Page.HasShortcode "gallery" }}
{{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }}
<script defer src="{{ $packeryLib.RelPermalink }}" integrity="{{ $packeryLib.Data.Integrity }}"></script>
2023-01-17 16:36:56 -06:00
{{ end }}
{{/* tw-elements */}}
2023-01-24 17:53:01 -06:00
{{ if or (.Page.HasShortcode "carousel") (.Page.HasShortcode "timeline")}}
2023-01-17 16:36:56 -06:00
{{ $twelementsLib := resources.Get "lib/tw-elements/index.min.js" }}
<script defer src="{{ $twelementsLib.RelPermalink }}" integrity="{{ $twelementsLib.Data.Integrity }}"></script>
2023-01-08 15:44:15 -06:00
{{ end }}