2023-09-18 18:24:49 +00:00
|
|
|
{{- $onwidths := cond (isset . "onwidths") .onwidths "area-more" }}
|
|
|
|
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
|
|
|
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
|
|
|
{{- with .page }}
|
2024-08-27 13:34:36 +00:00
|
|
|
{{- $show := .File }}
|
|
|
|
{{- if $show }}
|
|
|
|
{{- $show = not (partial "pageHelper/isRelearnSpecialPage.html" .) }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if $show }}
|
2024-01-27 11:06:39 +00:00
|
|
|
{{- $filePath := printf "%s%s" (strings.TrimLeft "/" (replace .File.Dir "\\" "/")) .File.LogicalName }}
|
|
|
|
{{- $href := "" }}
|
|
|
|
{{- if .Site.Params.editURL }}
|
|
|
|
{{- $href = .Site.Params.editURL }}
|
|
|
|
{{- if not (strings.Contains $href "${FilePath}") }}
|
|
|
|
{{ $href = printf "%s%s" $href "${FilePath}" }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if isset .Params "editurl" }}
|
|
|
|
{{- $href = .Params.editURL }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $href = strings.Replace $href "${FilePath}" $filePath }}
|
|
|
|
{{- if $href }}
|
|
|
|
{{- 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 }}
|
2023-09-18 18:24:49 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|