2016-03-17 11:01:39 +00:00
<!DOCTYPE html>
2022-11-17 21:12:18 +00:00
{{- $format := partial "get-format.hugo" . }}
{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
{{- $basename := "index" }}
{{- if eq $outputFormat "searchpage" }}
2022-11-19 12:40:26 +00:00
{{- $basename = partial "BaseName.hugo" $format.RelPermalink }}
2022-11-17 21:12:18 +00:00
{{- end }}
2022-11-07 19:57:17 +00:00
< html lang = "{{ .Page.Language | default " en " } } " dir = "{{ T " Reading-direction " | default " ltr " } } " >
2016-03-17 11:01:39 +00:00
< head >
2021-09-11 22:40:03 +00:00
{{- partial "meta.html" . }}
2022-11-01 23:14:19 +00:00
{{- $page := . }}
2022-07-07 19:42:45 +00:00
{{- $link := "< link href = \"%s\" rel = \"%s\" type = \"%s\" title = \"%s\" > " }}
2022-11-06 00:37:33 +00:00
{{- $title := "" }}
{{- if and .Title (not (eq .Title .Site.Title)) }}
{{- $title = printf "%s %s " .Title (default "::" .Site.Params.titleSeparator) }}
{{- end }}
{{- $title = printf "%s%s" $title .Site.Title }}
< title > {{ $title }}< / title >
2018-02-19 16:09:45 +00:00
2023-01-25 11:41:02 +00:00
{{- if .IsTranslated -}}
{{- range $index, $trans := .AllTranslations }}
{{- if eq $index 0 }}
< link href = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " . " abs " true " basename " $ basename ) } } " rel = "alternate" hreflang = "x-default" >
{{- end }}
< link href = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " . " abs " true " basename " $ basename ) } } " rel = "alternate" hreflang = "{{ .Language.Lang }}" >
{{- end }}
{{- end }}
2022-02-06 12:51:54 +00:00
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
{{- else }}
2023-01-25 11:41:02 +00:00
{{- range .AlternativeOutputFormats }}
{{- if eq .Rel "canonical" }}
2022-11-17 21:12:18 +00:00
{{ (printf $link (partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true "basename" $basename)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
2023-01-25 11:41:02 +00:00
{{- else if eq $outputFormat "searchpage" }}
{{- else if eq .Name "SEARCHPAGE" }}
{{- else if and (ne .Name "JSON") (ne .Name "SEARCH") }}
2022-11-11 12:44:23 +00:00
{{ (printf $link (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
2022-02-06 12:51:54 +00:00
{{- end }}
2023-01-25 11:41:02 +00:00
{{- end }}
2020-03-09 15:50:24 +00:00
{{- end }}
2023-01-25 11:41:02 +00:00
2022-02-06 12:51:54 +00:00
{{- if and (ne .Site.Params.disableSeoHiddenPages true) (ne .Site.Params.disableSearchHiddenPages true) }}
2023-01-25 11:41:02 +00:00
{{- range .AlternativeOutputFormats }}
{{- if eq .Name "SEARCHPAGE" }}
{{- else if eq .Name "JSON" }}
2022-11-06 00:37:33 +00:00
{{ (printf $link (.Permalink | relURL) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }}
2022-02-06 12:51:54 +00:00
{{- end }}
2023-01-25 11:41:02 +00:00
{{- end }}
2021-11-24 11:03:11 +00:00
{{- end }}
2022-02-06 12:51:54 +00:00
2022-11-12 14:16:53 +00:00
{{- partialCached "favicon.html" . }}
2022-11-13 09:55:17 +00:00
{{- partialCached "stylesheet.html" (dict "page" . "outputFormat" $outputFormat) $outputFormat }}
2021-09-11 22:40:03 +00:00
{{- partial "custom-header.html" . }}
2016-03-17 11:01:39 +00:00
< / head >
2022-11-15 06:34:06 +00:00
< body class = "mobile-support {{ $outputFormat }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}" data-url = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " . ) } } " >
2022-02-13 00:53:23 +00:00
< div id = "body" class = "default-animation" >
2022-02-27 08:59:38 +00:00
< div id = "sidebar-overlay" > < / div >
2022-02-28 00:19:32 +00:00
< div id = "toc-overlay" > < / div >
2022-11-07 19:57:17 +00:00
< nav id = "topbar" class = "highlightable" dir = "ltr" >
2022-02-27 09:27:12 +00:00
< div >
2022-11-17 21:12:18 +00:00
{{- $File := .File }}
{{- $Site := .Site }}
2022-02-17 23:09:06 +00:00
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
2022-11-17 21:12:18 +00:00
{{- if and (or (eq $outputFormat "html") (eq $outputFormat "searchpage")) $showPrevNext }}
2022-02-18 01:13:35 +00:00
{{- $parent := .Parent }}
{{- $ispublished := true }}
{{- if $parent }}
{{- $ispublished = gt (int (len $parent.Permalink)) 0 }}
{{- end }}
2022-02-17 23:09:06 +00:00
< div class = "navigation" >
2022-11-17 21:12:18 +00:00
{{- if or (ne $outputFormat "html") (not (and $ispublished ($.Scratch.Get "relearnNextPage"))) }}
< span class = "nav nav-next" > < i class = "fa fa-chevron-right fa-fw" > < / i > < / span >
{{- else }}
2022-02-17 23:09:06 +00:00
{{- with ($.Scratch.Get "relearnNextPage") }}
2022-11-11 12:44:23 +00:00
< a class = "nav nav-next" href = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " . ) } } " title = "{{.Title}} (🡒)" > < i class = "fas fa-chevron-right fa-fw" > < / i > < / a >
2022-02-17 23:09:06 +00:00
{{- end }}
{{- end }}
< / div >
< div class = "navigation" >
2022-11-17 21:12:18 +00:00
{{- if and (eq .RelPermalink .Site.Home.RelPermalink) (eq $outputFormat "html") }}
< span class = "nav nav-prev" > < i class = "fa fa-chevron-left fa-fw" > < / i > < / span >
{{- else if or (ne $outputFormat "html") (eq .Page.Kind "taxonomy") (eq .Page.Kind "term") (not (and $ispublished ($.Scratch.Get "relearnPrevPage"))) }}
{{- with .Site.Home }}
< a class = "nav nav-prev" href = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " . ) } } " title = "{{.Title}} (🡐)" > < i class = "fas fa-chevron-left fa-fw" > < / i > < / a >
{{- end }}
{{- else }}
2022-02-17 23:09:06 +00:00
{{- with ($.Scratch.Get "relearnPrevPage") }}
2022-11-11 12:44:23 +00:00
< a class = "nav nav-prev" href = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " . ) } } " title = "{{.Title}} (🡐)" > < i class = "fas fa-chevron-left fa-fw" > < / i > < / a >
2022-02-17 23:09:06 +00:00
{{- end}}
{{- end}}
< / div >
{{- end }}
2022-11-17 21:12:18 +00:00
{{- with and (eq $outputFormat "html") (.OutputFormats.Get "PRINT") }}
2022-04-02 13:29:34 +00:00
< div id = "top-print-link" >
2022-06-06 23:46:39 +00:00
< a class = "print-link" title = '{{ T "Print-this-chapter" }} (CTRL+ALT+p)' href = "{{ .RelPermalink }}" >
2022-04-02 13:29:34 +00:00
< i class = "fas fa-print fa-fw" > < / i >
< / a >
< / div >
{{- end -}}
2022-11-17 21:12:18 +00:00
{{- if and (eq $outputFormat "html") .Site.Params.editURL $File }}
{{- with $File.Path }}
2021-09-23 19:25:45 +00:00
< div id = "top-github-link" >
2023-02-04 01:05:48 +00:00
< a class = "github-link" title = '{{ T "Edit-this-page" }} (CTRL+ALT+w)' href = "{{ $Site.Params.editURL }}{{ strings.TrimLeft " / " ( replace $ File . Dir " \ \ " " / " ) } } { { $ File . LogicalName } } " target = "_blank" >
2022-02-23 11:40:16 +00:00
< i class = "fas fa-pen fa-fw" > < / i >
2021-09-23 19:25:45 +00:00
< / a >
< / div >
2021-09-11 22:40:03 +00:00
{{- end }}
2021-09-23 19:25:45 +00:00
{{- end }}
2021-11-03 19:44:23 +00:00
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
2022-02-15 19:28:29 +00:00
{{- $hastoc := not (eq 0 (int (len (.TableOfContents | plainify)))) }}
2022-11-17 21:12:18 +00:00
{{- $toc := and $hastoc (not $currentDisableToc) (eq $outputFormat "html") }}
2021-09-23 19:25:45 +00:00
< div id = "breadcrumbs" >
< span id = "sidebar-toggle-span" >
2022-10-08 20:50:14 +00:00
< a href = "#" id = "sidebar-toggle" title = '{{ T "Navigation-toggle" }} (CTRL+ALT+n)' > < i class = "fas fa-bars fa-fw" > < / i > < / a >
2021-09-23 19:25:45 +00:00
< / span >
2021-09-11 22:40:03 +00:00
{{- if $toc }}
2022-06-06 23:45:08 +00:00
< span id = "toc-menu" title = '{{ T "Toc-toggle" }} (CTRL+ALT+t)' > < i class = "fas fa-list-alt fa-fw" > < / i > < / span >
2021-09-23 19:25:45 +00:00
{{- end }}
{{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }}
{{- if $showBreadcrumb }}
< ol class = "links" itemscope itemtype = "http://schema.org/BreadcrumbList" >
2022-11-01 23:14:19 +00:00
{{- template "breadcrumb" dict "page" . "to" . }}
2021-09-23 19:25:45 +00:00
< / ol >
{{- else }}
< span class = "links" >
{{ .Title }}
< / span >
2021-09-11 22:40:03 +00:00
{{- end }}
2021-09-13 17:39:20 +00:00
< / div >
2021-09-23 19:25:45 +00:00
{{- if $toc }}
{{- partial "toc.html" . }}
{{- end }}
2022-02-27 09:27:12 +00:00
< / div >
2022-02-28 00:19:32 +00:00
< / nav >
2022-11-13 10:31:46 +00:00
{{- $hook := "styleclass" }}
< main id = "body-inner" class = "highlightable {{ partialCached " archetype . hugo " ( dict " hook " $ hook " page " . " parameter " . " outputFormat " $ outputFormat ) . RelPermalink $ outputFormat $ hook } } " tabindex = "-1" >
2022-02-28 00:19:32 +00:00
< div class = "flex-block-wrapper" >
< div id = "head-tags" >
2022-02-17 23:38:32 +00:00
{{- partial "tags.html" . }}
2022-02-28 00:19:32 +00:00
< / div >
2021-09-11 22:40:03 +00:00
{{- define "breadcrumb" }}
2022-10-02 22:07:28 +00:00
{{- $breadcrumb := slice }}
{{- $page := .page }}
2022-11-01 23:14:19 +00:00
{{- $to := .to }}
{{- $breadcrumb = $breadcrumb | append $to }}
2023-01-25 23:08:25 +00:00
{{- $depth := int (partial "get-page-depth.hugo" (dict "page" $page)) }}
{{- range seq $depth }}
2022-11-01 23:14:19 +00:00
{{- $to = $to.Parent }}
{{- if $to }}
{{- $breadcrumb = $breadcrumb | append $to }}
2022-10-02 22:07:28 +00:00
{{- else }}
{{- break }}
{{- end }}
2022-02-17 13:19:34 +00:00
{{- end }}
2022-10-02 22:07:28 +00:00
{{- $len := len $breadcrumb -}}
{{- $breadcrumbReversed := slice }}
{{- range seq $len }}
{{- $breadcrumbReversed = $breadcrumbReversed | append (index $breadcrumb (sub $len .)) }}
2021-09-11 22:40:03 +00:00
{{- end }}
2022-10-02 22:07:28 +00:00
{{- $remaining := $len }}
{{- $depth := 0 }}
{{- range $i, $e := $breadcrumbReversed }}
2022-11-01 23:14:19 +00:00
{{- $to := $e }}
{{- $ispublished := gt (int (len $to.Permalink)) 0 }}
2022-10-02 22:07:28 +00:00
{{- $remaining = sub $remaining 1 }}
{{- if $ispublished }}
{{- $depth = add $depth 1 }}
2022-11-11 12:44:23 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > {{ if $remaining }}< a itemprop = "item" href = "{{ partial " relLangPrettyUglyURL . hugo " ( dict " to " $ to ) } } " > {{end}}< span itemprop = "name" > {{ if $to.Title }}{{ $to.Title }}{{ else }}{{ $to.Site.Title }}{{ end }}< / span > {{ if $remaining }}< / a > {{ end }}< meta itemprop = "position" content = "{{ $depth }}" > {{ if $remaining }} > {{ end }}< / li >
2022-10-02 22:07:28 +00:00
{{- end }}
2022-02-17 13:19:34 +00:00
{{- end }}
2021-09-11 22:40:03 +00:00
{{- end }}