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

baseof.html « _default « layouts - github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aeff9cfa25ea0846f41072bb90e519d581f74b9d (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
64
65
{{- /* LoveIt theme version detection */ -}}
{{- if ne .Site.Params.version "0.1.X" -}}
  {{- errorf "\n\nThere are two possible situations that led to this error:\n  1. You haven't copied the config.toml yet. See https://github.com/dillonzq/LoveIt#installation \n  2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n  1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n  2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
{{- end -}}

{{- $scratch := newScratch -}}
{{- .Scratch.Set "scratch" $scratch -}}
{{- if eq hugo.Environment "production" -}}
    {{- $scratch.Set "production" true -}}
    {{- $scratch.Set "CDN" .Site.Params.cdn -}}
    {{- $scratch.Set "fingerprint" .Site.Params.fingerprint -}}
{{- end -}}

<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>
            {{- block "title" . }}{{ .Site.Title }}{{ end -}}
        </title>
        <meta name="Description" content="{{ .Params.description | default .Site.Params.description }}">

        {{- partial "head/meta.html" . -}}
        {{- partial "head/link.html" . -}}
        {{- partial "head/seo.html" . -}}
    </head>
    <body>
        {{- /* Check theme isDark before body rendering */ -}}
        <script>
            if (!window.localStorage || !window.localStorage.getItem('theme')) {
                {{- $theme := .Site.Params.defaultTheme -}}
                {{- if eq $theme "auto" -}}
                    window.isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
                {{- else -}}
                    window.isDark = '{{ $theme }}' === 'dark';
                {{- end -}}
            } else {
                window.isDark = (window.localStorage && window.localStorage.getItem('theme')) === 'dark';
            }
            window.isDark && document.body.classList.add('dark-theme');
        </script>

        {{- /* Body wrapper */ -}}
        <div class="wrapper">
            {{- partial "header.html" . -}}
            <main class="main">
                <div class="container">
                    {{- block "content" . }}{{ end -}}
                </div>
            </main>
            {{- partial "footer.html" . -}}
        </div>

        {{- /* Dynamic to top button */ -}}
        <a href="#" class="dynamic-to-top animated faster" id="dynamic-to-top">
            <i class="fas fa-chevron-up fa-fw"></i>
        </a>

        {{- /* Load JavaScript scripts and CSS */ -}}
        {{- partial "assets.html" . -}}
    </body>
</html>