aboutsummaryrefslogtreecommitdiff
path: root/layouts/_default/baseof.html
blob: fcf2ad8aee74a865110f66c274b5ecfe56c6b7f0 (plain) (blame)
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
<!DOCTYPE html>
<html lang="{{ .Lang }}">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    {{- $mainCSS  := resources.Get "css/main.scss"  | toCSS }}
    {{- $lightCSS := resources.Get "css/light.scss" | toCSS }}
    {{- $darkCSS  := resources.Get "css/dark.scss"  | toCSS }}
    {{- $printCSS := resources.Get "css/print.scss" | toCSS }}

    <link href="{{ $mainCSS.RelPermalink }}?t={{ now.Unix }}"  rel="stylesheet" />
    <link href="{{ $lightCSS.RelPermalink }}?t={{ now.Unix }}" rel="stylesheet" />
    <link href="{{ $darkCSS.RelPermalink }}?t={{ now.Unix }}"  rel="stylesheet" media="screen and (prefers-color-scheme: dark)" />
    <link href="{{ $printCSS.RelPermalink }}?t={{ now.Unix }}" rel="stylesheet" media="print" />

    <link rel="icon" href="/favicon.ico?t={{ now.Unix }}" sizes="any" />
    <link rel="icon" href="/img/favicon/normal.svg?t={{ now.Unix }}" sizes="any" type="image/svg+xml" />
    <link rel="apple-touch-icon" href="/img/favicon/normal-180x180.png?t={{ now.Unix }}" sizes="180x180" />
    {{- $webmanifest := resources.Get "site.webmanifest" | resources.ExecuteAsTemplate "site.webmanifest" . }}
    <link rel="manifest" href="{{ $webmanifest.RelPermalink }}?t={{ now.Unix }}" />

    {{- if eq .Title .Site.Title }}
    <title>{{ .Site.Title }}</title>
    {{- else }}
    <title>{{ .Page.Title }} - {{ .Site.Title }}</title>
    {{- end }}

    {{- if .Description }}
    <meta name="description" content="{{ .Description }}">
    {{- else if eq .RelPermalink ("/" | relLangURL) }}
    <meta name="description" content="{{ i18n "home_description" }}">
    {{- end }}

    <link rel="alternate" href="/{{ .Language }}/feed.atom" type="application/atom+xml" title="Atom feed" />
    <link rel="alternate" href="{{ .Permalink }}" hreflang="{{ .Lang }}"/>
    {{- range .Translations }}
    <link rel="alternate" href="{{ .Permalink }}" hreflang="{{ .Lang }}"/>
    {{- end }}

    {{ hugo.Generator }}
  </head>

  <body>
    <a class="skip-to-content" href="#main">Skip to content</a>
    {{ partial "nav.html" . }}
    <div id="container">
      <main id="main">
        {{ block "main" . }}
        {{ end }}
      </main>
      {{ partial "aside.html" . }}
    </div>

    <div id="clipboard" hidden>{{ i18n "copied_clipboard" }}</div>
    <a data-jslicense="1" href="/librejs/" rel="noindex" hidden></a>

    {{- $mainjs := resources.Get "js/main.js" | resources.ExecuteAsTemplate "js/main.js" . }}
    <script src="{{ $mainjs.RelPermalink }}?v={{ now.Unix }}"></script>
  </body>
</html>