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\" > " }}
2023-05-04 20:07:59 +00:00
{{- $title := .Title }}
{{- if eq $outputFormat "searchpage" }}
{{- $title = T "Search" }}
2023-05-20 10:20:58 +00:00
{{- else if eq .Kind "taxonomy" }}
{{- $title = i18n .Data.Plural }}
{{- if not $title }}
2023-06-18 09:13:33 +00:00
{{- $title = .Data.Plural }}
2023-05-20 10:20:58 +00:00
{{- end }}
2023-05-04 20:07:59 +00:00
{{- else if eq .Kind "term" }}
2023-05-18 22:14:08 +00:00
{{- $title = i18n .Data.Singular }}
{{- if not $title }}
2023-06-18 09:13:33 +00:00
{{- $title = .Data.Singular }}
2023-05-18 22:14:08 +00:00
{{- end }}
2023-05-19 16:46:00 +00:00
{{- $title = printf "%s %s %s" .Title (default "::" .Site.Params.titleSeparator) $title }}
2023-05-04 20:07:59 +00:00
{{- end }}
2023-05-18 12:03:39 +00:00
{{- if and $title .Site.Title (not (eq $title .Site.Title)) }}
2023-05-04 20:07:59 +00:00
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) .Site.Title }}
2022-11-06 00:37:33 +00:00
{{- end }}
< 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 >
2023-06-22 16:42:43 +00:00
< body class = "mobile-support {{ $outputFormat }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ 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 >
2023-09-12 21:09:14 +00:00
< nav id = "topbar" >
2022-02-27 09:27:12 +00:00
< div >
2023-09-13 21:10:41 +00:00
< div class = "topbar-sidebar-divider" > < / div >
< div class = "topbar-left" >
{{- partial "topbar-button.html" (dict
"page" $page
"class" "topbar-sidebar"
"href" "javascript:showNav()"
"icon" "bars"
"title" (printf "%s (CTRL+ALT+n)" (T "Navigation-toggle"))
)}}
{{- $defaultDisableToc := .Site.Params.disableToc | default false }}
{{- $currentDisableToc := .Params.disableToc | default $defaultDisableToc }}
{{- $toc_content := partial "toc.html" . }}
{{- $hastoc := not (eq 0 (int (len (trim ($toc_content | plainify) "\n\t ")))) }}
{{- $toc := and $hastoc (not $currentDisableToc) (eq $outputFormat "html") }}
{{- if $toc }}
{{- partial "topbar-button.html" (dict
"page" $page
"class" "topbar-toc"
"href" "javascript:showToc()"
"icon" "list-alt"
"title" (printf "%s (CTRL+ALT+t)" (T "Toc-toggle"))
)}}
{{ $toc_content }}
{{- end }}
< / div >
{{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }}
{{- if $showBreadcrumb }}
< ol class = "topbar-breadcrumbs highlightable" itemscope itemtype = "http://schema.org/BreadcrumbList" >
{{- template "breadcrumb" dict "page" . "to" . }}
< / ol >
{{- else }}
< span class = "topbar-breadcrumbs highlightable" >
{{ .Title }}
< / span >
{{- end }}
2023-09-12 21:18:49 +00:00
< div class = "topbar-right" >
2023-09-13 21:10:41 +00:00
{{- with and (eq $outputFormat "html") .Site.Params.editURL $.File }}
{{- partial "topbar-button.html" (dict
"page" $page
"class" "topbar-edit"
"href" (printf "%s%s%s" $.Site.Params.editURL (strings.TrimLeft "/" (replace .Dir "\\" "/")) .LogicalName)
"icon" "pen"
"title" (printf "%s (CTRL+ALT+w)" (T "Edit-this-page"))
)}}
{{- end }}
{{- with and (eq $outputFormat "html") (.OutputFormats.Get "PRINT") }}
{{- partial "topbar-button.html" (dict
"page" $page
"class" "topbar-print"
"href" .RelPermalink
"icon" "print"
"title" (printf "%s (CTRL+ALT+p)" (T "Print-this-chapter"))
)}}
{{- end -}}
2023-09-12 21:09:14 +00:00
{{- $showPrevNext := (and (not .Params.disableNextPrev) (not .Site.Params.disableNextPrev)) }}
{{- if and (or (eq $outputFormat "html") (eq $outputFormat "searchpage")) $showPrevNext }}
{{- $startarrow := "🡐" }}
{{- $endarrow := "🡒" }}
{{- if eq (T "Reading-direction" | default "ltr") "rtl" }}
{{- $startarrow = "🡒" }}
{{- $endarrow = "🡐" }}
{{- end }}
{{- $ispublished := true }}
{{- with .Parent }}
{{- $ispublished = gt (int (len .Permalink)) 0 }}
{{- end }}
{{- $prev := "" }}
{{- if and (eq .RelPermalink .Site.Home.RelPermalink) (eq $outputFormat "html") }}
{{- else if or (ne $outputFormat "html") (not (and $ispublished ($.Scratch.Get "relearnPrevPage"))) (eq .Page.Kind "taxonomy") (eq .Page.Kind "term") }}
{{- $prev = .Site.Home }}
{{- else }}
{{- $prev = $.Scratch.Get "relearnPrevPage" }}
{{- end}}
{{- partial "topbar-button.html" (dict
"page" $page
"class" "topbar-prev"
"href" (partial "relLangPrettyUglyURL.hugo" (dict "to" $prev))
"icon" "chevron-left"
"title" (printf "%s (%s)" ($prev | default $page).Title ($startarrow | safeHTML))
)}}
2023-09-13 21:10:41 +00:00
{{- $next := "" }}
{{- if or (ne $outputFormat "html") (not (and $ispublished ($.Scratch.Get "relearnNextPage"))) }}
{{- else }}
{{- $next = $.Scratch.Get "relearnNextPage" }}
{{- end }}
2023-09-12 21:09:14 +00:00
{{- partial "topbar-button.html" (dict
"page" $page
2023-09-13 21:10:41 +00:00
"class" "topbar-next"
"href" (partial "relLangPrettyUglyURL.hugo" (dict "to" $next))
"icon" "chevron-right"
"title" (printf "%s (%s)" ($next | default $page).Title ($endarrow | safeHTML))
2023-09-12 21:09:14 +00:00
)}}
{{- end }}
2023-09-12 21:18:49 +00:00
< / div >
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" >
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 }}
2023-05-04 20:07:59 +00:00
{{- $title := $to.Title }}
2023-05-20 10:20:58 +00:00
{{- if eq .Kind "taxonomy" }}
{{- $title = i18n $to.Data.Plural }}
{{- if not $title }}
2023-06-18 09:13:33 +00:00
{{- $title = $to.Data.Plural }}
2023-05-20 10:20:58 +00:00
{{- end }}
{{- else if eq .Kind "term" }}
{{- $title = i18n $to.Data.Singular }}
2023-05-18 22:14:08 +00:00
{{- if not $title }}
2023-06-18 09:13:33 +00:00
{{- $title = $to.Data.Singular }}
2023-05-18 22:14:08 +00:00
{{- end }}
2023-05-19 16:46:00 +00:00
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) $to.Title }}
2023-05-04 20:07:59 +00:00
{{- end }}
{{- if not $title }}
{{- $title = $to.Site.Title }}
{{- end }}
2023-09-05 11:08:16 +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" > {{ $title }}< / span > {{ if $remaining }}< / a > {{ end }}< meta itemprop = "position" content = "{{ $depth }}" > {{ if $remaining }}{{ (printf " %s " (default ">" .Site.Params.breadcrumbSeparator)) | safeHTML }}{{ 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 }}