{{- $backToTop := .Site.Params.backToTop -}} {{- $comment := .Scratch.Get "comment" -}} {{- if $backToTop.enable | or $comment.enable -}}
{{- /* back to top button */ -}} {{- if $backToTop.enable -}}
{{- dict "Class" "fa-solid fa-arrow-up fa-fw" | partial "plugin/icon.html" -}} 0%
{{- end -}} {{- /* comment button */ -}} {{- if $comment.enable -}}
{{- dict "Class" "fa-solid fa-comment fa-fw" | partial "plugin/icon.html" -}}
{{- end -}}
{{- end -}} {{- /* GitHub Corners */ -}} {{- $githubCorner := .Site.Params.githubCorner -}} {{- if $githubCorner.enable -}} {{- with $githubCorner -}} {{- $githubImage := `` -}} {{- $options := dict "Destination" .Permalink "Title" .Title "Content" $githubImage "Class" (cond (eq .Position "left") "left" "right" | printf "github-corner %v d-none-mobile") "Noreferrer" false -}} {{- partial "plugin/link.html" $options -}} {{- end -}} {{- end -}} {{- /* Search mask */ -}}
{{- /* Reading progress bar */ -}} {{- $readingProgress := .Site.Params.readingProgress -}} {{- if $readingProgress.enable -}} {{- with $readingProgress -}} {{- $style := printf "%v: 0;%v: 0;" (.Start | default "left") (.Position | default "top") -}} {{- if .Height | and (ne .Height "2px") -}} {{- $style = printf "%v--progress-h: %v;" $style .Height -}} {{- end -}} {{- if .Reversed -}} {{- $style = printf "%v%v" $style "width: calc(100% - var(--progress));" -}} {{- end -}} {{- if .Light -}} {{- $style = printf "%v--bg-progress: %v;" $style .Light -}} {{- end -}} {{- if .Dark -}} {{- $style = printf "%v--bg-progress-dark: %v;" $style .Dark -}} {{- end -}}
{{- end -}} {{- end -}}