Welcome to mirror list, hosted at ThFree Co, Russian Federation.

script.html « partials « layouts - github.com/xiaoheiAh/hugo-theme-pure.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b18a56c76cabbac88633bad63a4cce537fe2c105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{{ if or .Site.Params.enableMathJax .Params.math }}
{{ partial "math.html" . }}
{{ end }}
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
<script>
    window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/rust.min.js"></script>
<script type="text/javascript"
    src="https://cdn.staticfile.org/highlight.js/9.15.10/languages/dockerfile.min.js"></script>
<script>
    hljs.configure({
        tabReplace: '    ', // 4 spaces
        classPrefix: ''     // don't append class prefix
        // … other options aren't changed
    })
    hljs.initHighlightingOnLoad();
</script>
<script type="text/javascript" src="{{ "js/application.js" | absURL }}"></script>
<script type="text/javascript" src="{{ "js/plugin.js" | absURL }}"></script>
<script>
    (function (window) {
        var INSIGHT_CONFIG = {
            TRANSLATION: {
                POSTS: '{{ T "insight_posts"}}',
                PAGES: '{{ T "insight_pages"}}',
                CATEGORIES: '{{ T "insight_categories"}}',
                TAGS: '{{ T "insight_tags"}}',
                UNTITLED: '{{ T "insight_untitled"}}',
            },
            ROOT_URL: '{{ .Site.BaseURL }}',
            CONTENT_URL: '{{ print .Site.BaseURL "/searchindex.json" | safeURL }} ',
        };
        window.INSIGHT_CONFIG = INSIGHT_CONFIG;
    })(window);
</script>
<script type="text/javascript" src="{{ "js/insight.js" | absURL }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tocbot/4.4.2/tocbot.min.js"></script>
<script>
    tocbot.init({
        // Where to render the table of contents.
        tocSelector: '.js-toc',
        // Where to grab the headings to build the table of contents.
        contentSelector: '.js-toc-content',
        // Which headings to grab inside of the contentSelector element.
        headingSelector: 'h1, h2, h3',
        // For headings inside relative or absolute positioned containers within content.
        hasInnerContainers: true,
    });
</script>
{{- if eq .Type "repository" }}
{{- partial "_script/repository.html" . }}
{{- end}}
<!-- TODO books -->
{{- if .IsPage }}
{{- partial "_script/pv.html" . }}
{{- end }}
{{- if in $.Site.Params.mainSections .Type }}
{{- partial "_script/comment.html" . }}
{{- end }}
{{- partial "_script/fancybox.html" . }}
{{- partial "_script/analytics.html" . }}