2017-08-27 14:38:42 +00:00
|
|
|
<!-- js -->
|
2017-10-01 14:22:08 +00:00
|
|
|
<script src="{{ "lib/highlight/highlight.pack.js?v=20171001" | relURL }}"></script>
|
2018-01-31 14:14:48 +00:00
|
|
|
{{- if .Site.Params.publicCDN.enable }}
|
2017-09-12 15:59:08 +00:00
|
|
|
{{ .Site.Params.publicCDN.jquery | safeHTML }}
|
|
|
|
{{ .Site.Params.publicCDN.slideout | safeHTML }}
|
|
|
|
{{ if .Site.Params.fancybox }}{{ .Site.Params.publicCDN.fancyboxJs | safeHTML }}{{ end }}
|
|
|
|
{{- else -}}
|
2017-08-30 16:18:22 +00:00
|
|
|
<script type="text/javascript" src="{{ "lib/jquery/jquery-3.2.1.min.js" | relURL }}"></script>
|
|
|
|
<script type="text/javascript" src="{{ "lib/slideout/slideout-1.0.1.min.js" | relURL }}"></script>
|
|
|
|
{{ if .Site.Params.fancybox }}<script type="text/javascript" src="{{ "lib/fancybox/jquery.fancybox-3.1.20.min.js" | relURL }}"></script>{{ end }}
|
2018-03-12 13:30:47 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
<!-- flowchart -->
|
|
|
|
{{- if and (or .Params.flowchartDiagrams.enable (and .Site.Params.flowchartDiagrams.enable (ne .Params.flowchartDiagrams.enable false))) (or .IsPage .IsHome) -}}
|
|
|
|
<script>
|
|
|
|
{{- if .Params.flowchartDiagrams.options -}}
|
|
|
|
window.flowchartDiagramsOptions = {{ .Params.flowchartDiagrams.options | safeJS }};
|
|
|
|
{{- else if .Site.Params.flowchartDiagrams.options -}}
|
|
|
|
window.flowchartDiagramsOptions = {{ .Site.Params.flowchartDiagrams.options | safeJS }};
|
|
|
|
{{- end -}}
|
|
|
|
</script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/raphael@2.2.7/raphael.min.js" integrity="sha256-67By+NpOtm9ka1R6xpUefeGOY8kWWHHRAKlvaTJ7ONI=" crossorigin="anonymous"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/flowchart.js@1.8.0/release/flowchart.min.js" integrity="sha256-zNGWjubXoY6rb5MnmpBNefO0RgoVYfle9p0tvOQM+6k=" crossorigin="anonymous"></script>
|
2017-08-27 14:38:42 +00:00
|
|
|
{{- end }}
|
2018-02-22 07:53:33 +00:00
|
|
|
<script type="text/javascript" src="{{ "dist/even.min.js?v=3.0.1" | relURL }}"></script>
|
2017-08-27 14:38:42 +00:00
|
|
|
|
2017-12-06 12:34:22 +00:00
|
|
|
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}
|
2018-02-13 08:19:47 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
window.MathJax = {
|
2018-01-15 14:22:14 +00:00
|
|
|
{{ if or .Params.mathjaxEnableSingleDollar (and .Site.Params.mathjaxEnableSingleDollar (ne .Params.mathjaxEnableSingleDollar false)) -}}
|
|
|
|
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]},
|
|
|
|
{{ end -}}
|
2017-09-10 13:20:56 +00:00
|
|
|
showProcessingMessages: false,
|
|
|
|
messageStyle: 'none'
|
2018-02-13 08:19:47 +00:00
|
|
|
};
|
2017-09-10 13:20:56 +00:00
|
|
|
</script>
|
2018-01-15 14:22:14 +00:00
|
|
|
<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
2017-08-27 14:38:42 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<!-- Analytics -->
|
|
|
|
{{- if .Site.GoogleAnalytics -}}
|
|
|
|
{{ template "_internal/google_analytics_async.html" . }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- with .Site.Params.baidu_analytics -}}
|
|
|
|
<script id="baidu_analytics">
|
|
|
|
var _hmt = _hmt || [];
|
|
|
|
(function() {
|
|
|
|
if (window.location.hostname === 'localhost') return;
|
|
|
|
var hm = document.createElement("script"); hm.async = true;
|
|
|
|
hm.src = "https://hm.baidu.com/hm.js?{{.}}";
|
|
|
|
var s = document.getElementsByTagName("script")[0];
|
|
|
|
s.parentNode.insertBefore(hm, s);
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<!-- baidu_push -->
|
|
|
|
{{- if .Site.Params.baidu_push -}}
|
|
|
|
<script id="baidu_push">
|
|
|
|
(function(){
|
|
|
|
if (window.location.hostname === 'localhost') return;
|
|
|
|
var bp = document.createElement('script'); bp.async = true;
|
|
|
|
var curProtocol = window.location.protocol.split(':')[0];
|
|
|
|
if (curProtocol === 'https') {
|
|
|
|
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
|
|
|
|
}
|
|
|
|
var s = document.getElementsByTagName("script")[0];
|
|
|
|
s.parentNode.insertBefore(bp, s);
|
|
|
|
})();
|
|
|
|
</script>
|
2018-02-03 13:41:44 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
<!-- custom js -->
|
|
|
|
{{ range .Site.Params.customJS }}
|
|
|
|
<script src="{{ "/js/" | relURL }}{{ . }}"></script>
|
|
|
|
{{ end }}
|