File size: 2,284 Bytes
b855ced
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{{/*

  A copy of the baseof.html partial in Docsy, modified to:

  * generate a static file `versions.json` that can be used to populate the
    version picker.
  * remove the right-hand column from the layout.

*/ -}}

{{/* Generate a static file versions.json that can be used to populate the version picker */ -}}
{{ if .IsHome }}
  {{- /* Load all changelog subpages, sorted by release date */ -}}
  {{ $changelog := site.GetPage "changelog" }}
  {{ $pages := $changelog.RegularPages.ByDate.Reverse }}

  {{- /* Collect proper versions and build metadata dicts */ -}}
  {{ $versions := slice }}
  {{ range $pages }}
    {{ if findRE `^v[0-9]+\.[0-9]+$` .Params.linkTitle }}
      {{ $versions = $versions | append (dict "name" .Params.linkTitle "date" .Params.date ) }}
    {{ end }}
  {{ end }}

  {{- /* Generate the JSON */ -}}
  {{ $json := jsonify $versions }}
  {{ $noop := (resources.FromString "/versions.json" $json).Permalink }}
{{ end }}

<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
    {{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
    {{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
    class="no-js"
    {{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
    {{- if $darkMode.enable }} data-theme-init{{ end }}>
  <head>
    {{ partial "head.html" . }}
  </head>
  <body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
    <header>
      {{ partial "navbar.html" . }}
    </header>
    <div class="container-fluid td-outer">
      <div class="td-main" {{- partialCached "td/scrollspy-attr.txt" . .Section | safeHTMLAttr }}>
        <div class="row flex-xl-nowrap">
          <aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none">
            {{ partial "sidebar.html" . }}
          </aside>
          <main class="col-12 col-md-9 col-xl-8 ps-md-5" role="main">
            {{ partial "version-banner.html" . }}
            {{ if not (.Param "ui.breadcrumb_disable") -}}
              {{ partial "breadcrumb.html" . -}}
            {{ end -}}
            {{ block "main" . }}{{ end }}
          </main>
        </div>
      </div>
      {{ partial "footer.html" . }}
    </div>
    {{ partial "scripts.html" . }}
  </body>
</html>