{{- $onwidths := cond (isset . "onwidths") .onwidths "area-more" }}
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
	{{- $format := partial "get-format.hugo" . }}
	{{- $outputFormat := partial "output-format.hugo" (dict "page" . "format" $format) }}
	{{- if and (eq $outputFormat "html") (or .Site.Params.editURL .Params.editURL) .File }}
		{{- $href := or .Params.editURL (printf "%s%s%s" .Site.Params.editURL (strings.TrimLeft "/" (replace .File.Dir "\\" "/")) .File.LogicalName) }}
		{{- partial "topbar/func/button.html" (dict
			"page" .
			"class" "topbar-button-edit"
			"href" $href
			"icon" "pen"
			"onwidths" $onwidths
			"onwidthm" $onwidthm
			"onwidthl" $onwidthl
			"hint" (printf "%s (CTRL+ALT+w)" (T "Edit-this-page"))
		)}}
	{{- end }}
{{- end }}