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

baseof.html « _default « layouts - gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f0f1679e2cd493e2d75b634835534906b48d3025 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!--
  HACK
  Set image processing options for render hooks
  Currently here to avoid certain priority issues...
-->

{{- .Scratch.Set "imageProc" (dict "highRes" (.Site.Params.imageProc.highRes | default .Site.Data.default.imageProc.highRes) "mediumRes" (.Site.Params.imageProc.mediumRes | default .Site.Data.default.imageProc.mediumRes) "lowRes" (.Site.Params.imageProc.lowRes | default .Site.Data.default.imageProc.lowRes) "markupAutoResizeWidth" (.Site.Params.imageProc.markupAutoResizeWidth | default .Site.Data.default.imageProc.markupAutoResizeWidth)) }}

<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}" data-mode="{{ if .Site.Params.Style.isDark }}dark{{ else }}light{{ end }}">
  <head prefix="og: http://ogp.me/ns#">
    {{ partial "head" . }}
  </head>

  <body>

    <header>
      {{ partial "header" . }}
    </header>

    <div class="filler">
      {{ block "main" . }}
        <!-- Stuff -->
      {{ end }}
    </div>
    
    <footer>
      {{ partial "footer" . }}
    </footer>
    
    <svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" aria-hidden="true">
      <symbol viewBox="0 0 512 512" id="adjust">
        <path d="M8 256c0 136.966 111.033 248 248 248s248-111.034 248-248S392.966 8 256 8 8 119.033 8 256zm248 184V72c101.705 0 184 82.311 184 184 0 101.705-82.311 184-184 184z"/>
      </symbol>
      
      {{ if or (eq .Kind "section") (eq .Layout "search") }}
        <symbol viewBox="0 0 512 512" id="search">
          <path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"/>
        </symbol>
      {{ end }}
      
      {{ block "svg-extra" . }}
        <!-- Additional symbols -->
      {{ end }}
      
      {{ if .HasShortcode "social" }}

        <!-- Get info about social platform and icon id from "social.json" -->
        {{ range .Site.Data.social }}
          {{ if and (or (index $.Site.Params.Social.Centralized .entry) (index $.Site.Params.Social.Decentralized .entry)) .icon }}
            {{ $iconId        := .icon.id }}
            {{ $svgEssential  := `(?:<svg (?:.*?)(viewBox="(?:.*?)")(?:.*?)>((?:.|\n)+?)(?:</svg>))` }}
            {{ $asSymbol      := printf `<symbol ${1} id="%s">${2}</symbol>` $iconId }}
            
            <!-- Get the required SVG file and insert here as a symbol -->
            {{ with (resources.Get (printf "svg/%s.svg" $iconId)) }}
              {{ .Content | replaceRE $svgEssential $asSymbol | safeHTML }}
            {{ end }}
          {{ end }}
        {{ end }}
      
      {{ end }}
      
    </svg>

    <!--
      Remnant JavaScript
      If not using Hugo server, remove every "console.log()"
    -->
    
    {{ with resources.Get "js/postpone.js" | resources.ExecuteAsTemplate .Page . | minify }}

      <script>
        {{ if $.Site.IsServer }}
          {{ .Content | safeJS }}
        {{ else }}
          {{ .Content | replaceRE "console.log(.*?);" "" | safeJS }}
        {{ end }}
      </script>

    {{ end }}
    
    <!-- KaTeX -->
    {{ if or .Params.katex .Site.Params.katex .Params.math .Site.Params.math }}
      {{ partial "katex.html" . }}
    {{ end }}

  </body>
</html>