github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/partials/header.html (about) 1 <!DOCTYPE html> 2 {{- $format := partial "get-format.hugo" . }} 3 {{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }} 4 {{- $basename := "index" }} 5 {{- if eq $outputFormat "searchpage" }} 6 {{- $basename = partial "BaseName.hugo" $format.RelPermalink }} 7 {{- end }} 8 {{- if eq . .Site.Sites.First.Home }} 9 {{- $hugoVersion := "0.121.0" }} 10 {{- if lt hugo.Version $hugoVersion }} 11 {{- errorf "The Relearn theme requires Hugo %s or later" $hugoVersion }} 12 {{- end }} 13 {{- end }} 14 <html lang="{{ .Page.Language.LanguageCode | default "en" }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}"> 15 <head> 16 {{- partial "meta.html" . }} 17 {{- $page := . }} 18 {{- $link := "<link href=\"%s\" rel=\"%s\" type=\"%s\" title=\"%s\">" }} 19 {{- $title := partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true "format" $format "outputFormat" $outputFormat) }} 20 <title>{{ $title }}</title> 21 22 {{- if .IsTranslated -}} 23 {{- range $index, $trans := .AllTranslations }} 24 {{- if eq $index 0 }} 25 <link href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true "basename" $basename) }}" rel="alternate" hreflang="x-default"> 26 {{- end }} 27 <link href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true "basename" $basename) }}" rel="alternate" hreflang="{{ .Language.LanguageCode }}"> 28 {{- end }} 29 {{- end }} 30 31 {{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }} 32 {{- else }} 33 {{- range .AlternativeOutputFormats }} 34 {{- if eq .Rel "canonical" }} 35 {{ (printf $link (partial "relLangPrettyUglyURL.hugo" (dict "to" . "abs" true "basename" $basename)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }} 36 {{- else if eq $outputFormat "searchpage" }} 37 {{- else if eq .Name "searchpage" }} 38 {{- else if and (ne .Name "json") (ne .Name "search") }} 39 {{ (printf $link (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }} 40 {{- end }} 41 {{- end }} 42 {{- end }} 43 44 {{- if and (ne .Site.Params.disableSeoHiddenPages true) (ne .Site.Params.disableSearchHiddenPages true) }} 45 {{- range .AlternativeOutputFormats }} 46 {{- if eq .Name "searchpage" }} 47 {{- else if eq .Name "json" }} 48 {{ (printf $link (.Permalink | relURL) .Rel .MediaType.Type ($title | htmlEscape)) | safeHTML }} 49 {{- end }} 50 {{- end }} 51 {{- end }} 52 53 {{- partialCached "favicon.html" . }} 54 {{- partial "stylesheet.html" (dict "page" . "outputFormat" $outputFormat) }} 55 {{- partial "dependencies.html" (dict "page" . "location" "header" "outputFormat" $outputFormat) }} 56 {{- partial "custom-header.html" . }} 57 </head> 58 <body class="mobile-support {{ $outputFormat }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}{{- if .Site.Params.disableHoverBlockCopyToClipBoard }} disableHoverBlockCopyToClipBoard{{ end }}" data-url="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}"> 59 <div id="R-body" class="default-animation"> 60 <div id="R-body-overlay"></div> 61 <nav id="R-topbar"> 62 <div class="topbar-wrapper"> 63 <div class="topbar-sidebar-divider"></div> 64 <div class="topbar-area topbar-area-start" data-area="start"> 65 {{- partial "topbar/area/start.html" . }} 66 </div> 67 {{- $showBreadcrumb := (and (not .Params.disableBreadcrumb) (not .Site.Params.disableBreadcrumb)) }} 68 {{- if $showBreadcrumb }} 69 <ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList"> 70 {{- partial "breadcrumbs.html" (dict "page" .) }} 71 </ol> 72 {{- else }} 73 <span class="topbar-breadcrumbs highlightable"> 74 {{ .Title }} 75 </span> 76 {{- end }} 77 <div class="topbar-area topbar-area-end" data-area="end"> 78 {{- partial "topbar/area/end.html" . }} 79 </div> 80 </div> 81 </nav> 82 {{- $hook := "styleclass" }} 83 <div id="R-main-overlay"></div> 84 <main id="R-body-inner" class="highlightable {{ partialCached "archetype.hugo" (dict "hook" $hook "page" . "parameter" . "outputFormat" $outputFormat) .RelPermalink $outputFormat $hook }}" tabindex="-1"> 85 <div class="flex-block-wrapper">