2019-08-07 13:15:44 +02:00
|
|
|
<!-- jQuery https://github.com/jquery/jquery -->
|
2019-08-07 06:31:14 +02:00
|
|
|
{{ $jquery := `
|
2019-08-11 19:36:19 +02:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
2019-08-07 06:31:14 +02:00
|
|
|
` }}
|
|
|
|
{{ $lazysizes := `
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/lazysizes@5.1.1/lazysizes.min.js" integrity="sha256-6zKmNZVeImc0d1Y55vm4So/0W5mbwWiPS4zJt3F4t2A=" crossorigin="anonymous"></script>
|
|
|
|
` }}
|
2019-08-07 13:15:44 +02:00
|
|
|
<!-- KaTeX https://github.com/KaTeX/KaTeX -->
|
2019-08-07 06:31:14 +02:00
|
|
|
{{ $katex := `
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.css" integrity="sha384-yFRtMMDnQtDRO8rLpMIKrtPCD5jdktao2TV19YiZYWMDkUR5GQZR/NOVTdquEx1j" crossorigin="anonymous">
|
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/katex.min.js" integrity="sha384-9Nhn55MVVN0/4OFx7EE5kpFBPsEMZxKTCnA+4fqDmg12eCTqGi6+BB2LjY8brQxJ" crossorigin="anonymous"></script>
|
|
|
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.2/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
|
|
|
|
` }}
|
2019-08-17 17:16:09 +02:00
|
|
|
<!-- mermaid https://github.com/knsv/mermaid -->
|
|
|
|
{{ $diagram := `
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/mermaid@8.2.3/dist/mermaid.min.js" integrity="sha256-4s3fF5e1iWRLtiV7mRev7n17oALqqDHbWrNqF3/r7jU=" crossorigin="anonymous"></script>
|
|
|
|
<script>mermaid.initialize({startOnLoad: true, theme: null,});</script>
|
|
|
|
` }}
|
|
|
|
<!-- ECharts https://github.com/apache/incubator-echarts -->
|
|
|
|
{{ $echarts := `
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/echarts@4.2.1/dist/echarts.min.js" integrity="sha256-XNiBJGZuErA+MsbKwxuTqNMimobZMsVS79SkTUroRz4=" crossorigin="anonymous"></script>
|
|
|
|
` }}
|
2019-08-07 23:01:18 +02:00
|
|
|
<!-- TypeIt https://github.com/alexmacarthur/typeit -->
|
|
|
|
{{ $typeit := `
|
2019-08-11 19:36:19 +02:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/typeit@6.0.3/dist/typeit.min.js" integrity="sha256-jl1b2Wp4cXCUyX8FxPZ8Z0PPIPV3QYNb/jPSLGDej2c=" crossorigin="anonymous"></script>
|
2019-08-07 23:01:18 +02:00
|
|
|
` }}
|
2019-08-11 19:36:19 +02:00
|
|
|
<!-- jQuery.countdown https://github.com/hilios/jQuery.countdown -->
|
2019-08-07 23:01:18 +02:00
|
|
|
{{ $countdown := `
|
2019-08-11 19:36:19 +02:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery-countdown@2.2.0/dist/jquery.countdown.min.js" integrity="sha256-Ikk5myJowmDQaYVCUD0Wr+vIDkN8hGI58SGWdE671A8=" crossorigin="anonymous"></script>
|
2019-08-07 13:15:44 +02:00
|
|
|
` }}
|
2019-08-11 19:36:19 +02:00
|
|
|
<!-- MetingJS https://github.com/metowolf/MetingJS -->
|
2019-08-08 19:54:09 +02:00
|
|
|
{{ $metingjs := `
|
2019-08-11 19:36:19 +02:00
|
|
|
<!-- require APlayer -->
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
|
|
|
|
<!-- require MetingJS -->
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>
|
2019-08-08 19:54:09 +02:00
|
|
|
` }}
|
2019-08-08 00:05:51 +02:00
|
|
|
|
2019-08-07 06:31:14 +02:00
|
|
|
{{ $jquery | safeHTML }}
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ $lazysizes | safeHTML }}
|
2019-08-07 06:31:14 +02:00
|
|
|
|
2019-08-05 15:15:01 +02:00
|
|
|
{{ if .IsPage }}
|
2019-08-17 17:16:09 +02:00
|
|
|
{{ if .Scratch.Get "diagram" }}
|
|
|
|
{{ $diagram | safeHTML }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ with .Scratch.Get "echartsMap" }}
|
|
|
|
{{ $echarts | safeHTML }}
|
|
|
|
{{ $echartsMap := . }}
|
|
|
|
<script>var echartsMap = {
|
|
|
|
{{ range $key, $var := $echartsMap }}
|
|
|
|
{{ $key }}: {{ $var | safeJS }},
|
|
|
|
{{ end }}
|
|
|
|
};var echartsArr=[];</script>
|
2019-08-08 19:54:09 +02:00
|
|
|
{{ end }}
|
2019-08-17 17:16:09 +02:00
|
|
|
|
2019-08-16 21:40:34 +02:00
|
|
|
{{ if or .Params.math .Site.Params.math }}
|
2019-08-07 06:31:14 +02:00
|
|
|
{{ $katex | safeHTML }}
|
2019-08-06 18:16:32 +02:00
|
|
|
{{ end }}
|
2019-08-17 17:16:09 +02:00
|
|
|
|
|
|
|
{{ if .Scratch.Get "music" }}
|
|
|
|
{{ $metingjs | safeHTML }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ with .Scratch.Get "countdownMap" }}
|
|
|
|
{{ $countdown | safeHTML }}
|
|
|
|
<script>var countdownMap = {{ . | jsonify | safeJS }};</script>
|
|
|
|
{{ end }}
|
2019-03-13 23:35:27 +01:00
|
|
|
{{ end }}
|
2019-03-13 23:38:18 +01:00
|
|
|
|
2019-08-16 21:40:34 +02:00
|
|
|
{{ $typeitMap := .Scratch.Get "typeitMap" }}
|
|
|
|
{{ if $typeitMap }}
|
|
|
|
{{ $typeit | safeHTML }}
|
|
|
|
{{ $typeitArr := slice }}
|
|
|
|
{{ range $key, $val := $typeitMap }}
|
|
|
|
{{ $typeitArr = $typeitArr | append (slice $val) }}
|
|
|
|
{{ end }}
|
|
|
|
<script>var typeitArr = {{ $typeitArr | jsonify | safeJS }};</script>
|
|
|
|
{{ end }}
|
|
|
|
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ $scripts := slice (resources.Get "/js/main.js") (resources.Get "/js/dynamicToTop.js") | resources.Concat "/js/vendor.js" | resources.Minify }}
|
2019-08-11 19:36:19 +02:00
|
|
|
<script src="{{ $scripts.RelPermalink }}" async=""></script>
|
|
|
|
|
2019-08-18 19:36:52 +02:00
|
|
|
{{ template "_internal/google_analytics_async.html" . }}
|