{{- define "partials/header.html" -}} {{ if site.Params.navigation.breadcrumb }}{{ partial "assets/breadcrumb.html" . }}{{ end -}} {{ if in (slice "docs" "minimal") .Layout }} {{ with .Title }}

{{ . }}

{{ end }} {{ partial "assets/sharing.html" . }}

{{ .Description }}

{{ else }} {{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}} {{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}} {{ with .Title }}

{{ . }}

{{ end }} {{ $datestr | i18n "postedOnDate" -}} {{ if ne $datestr $lastmodstr -}} ({{ $lastmodstr | i18n "lastModified" }}){{ end }} • {{ .ReadingTime | lang.FormatNumber 0 }} {{ i18n "minutesShort" }} {{ i18n "read" }} • {{ .WordCount | lang.FormatNumber 0 }} {{ i18n "words" }} {{- if gt (len (.GetTerms "tags")) 0 -}}
{{ range (.GetTerms "tags") -}} {{- $url := (path.Join .Page.RelPermalink) | relLangURL -}} {{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "light" "size" "sm") }} {{ end -}}
{{ range (.GetTerms "tags") -}} {{- $url := (path.Join .Page.RelPermalink) | relLangURL -}} {{ partial "assets/button.html" (dict "href" $url "title" .LinkTitle "color" "primary" "size" "sm" "outline" "true") }} {{ end -}}
{{- end -}} {{ partial "assets/sharing.html" . }}

{{ .Description }}

{{ end }} {{ end -}} {{ define "partials/body.html" -}} {{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}}
{{ partial "assets/toc-dropdown.html" . }}
{{- end -}} {{ if not (in (slice "docs" "minimal") .Layout) }} {{- $thumbnail := "" -}} {{- $credits := "" -}} {{- if reflect.IsMap .Params.Thumbnail -}} {{- $thumbnail = .Params.Thumbnail.url -}} {{- $author := "" -}} {{- if and .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author }} {{- $author = partial "utilities/link" (dict "destination" .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author) -}} {{- else if .Params.Thumbnail.author }} {{- $author = .Params.Thumbnail.author -}} {{- end -}} {{- $origin := "" -}} {{- if and .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin }} {{- $origin = partial "utilities/link" (dict "destination" .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin) -}} {{- else if .Params.Thumbnail.origin }} {{- $origin = .Params.Thumbnail.origin -}} {{- end }} {{- if and $author $origin }} {{ $credits = printf (T "photoFull") $author $origin }} {{ else if $author }} {{ $credits = T "photoShort" $author }} {{ end }} {{ else }} {{- $thumbnail = .Params.Thumbnail -}} {{ if or .Params.photoCredits .Params.photoSource }} {{ warnf "DEPRECATED: frontmatter variables `photoCredits` and `photoSource` have been deprecated in release v0.18: %s" .RelPermalink }} {{ end }} {{- if and .Params.photoCredits .Params.PhotoSource }}{{ $credits = printf (T "photoFull") .Params.photoCredits .Params.PhotoSource }}{{ end -}} {{- end -}} {{ if $thumbnail -}} {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}} {{ end -}} {{ end }} {{ partial "utilities/ProcessContent" (dict "page" .Page "raw" .RawContent) }} {{ end -}} {{ define "partials/footer.html" -}} {{ if eq .Layout "docs" }}
{{ partial "utilities/git.html" . }}
{{ else if ne .Layout "minimal" }}
{{ with .NextInSection -}} {{ $next := . -}} {{ with .OutputFormats.Get "html" -}} {{- end -}} {{ end -}}
{{ with .PrevInSection -}} {{ $prev := . -}} {{ with .OutputFormats.Get "html" -}} {{- end -}} {{ end -}}
{{ end }} {{- if and .Site.Params.comments.enabled .Params.showComments | default true -}}
{{ partial "assets/comments.html" . }} {{ end -}} {{ end -}} {{ define "main" -}} {{- $menu := .Scratch.Get "sidebar" -}} {{- $version := .Scratch.Get "version" -}} {{- $sidebar := .Site.Params.navigation.sidebar | default true -}} {{ if and $menu $sidebar -}}
{{ strings.FirstUpper .Section }}
{{ partial "assets/sidebar" (dict "page" . "menu" $menu "version" $version) }}
{{ partial "partials/header.html" . }} {{ partial "partials/body.html" . }} {{ partial "partials/footer.html" . }}
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}} {{ partial "assets/toc.html" . -}} {{ end -}}
{{ else }}
{{ partial "partials/header.html" . }} {{ partial "partials/body.html" . }} {{ partial "partials/footer.html" . }}
{{- if and .Site.Params.navigation.toc .Params.includeToc | default true -}} {{ partial "assets/toc.html" . -}} {{ end -}}
{{ end -}} {{ end -}}