hugo-theme-relearn/layouts/partials/topbar/button/print.html

22 lines
736 B
HTML
Raw Normal View History

2023-09-18 20:24:49 +02:00
{{- $onwidths := cond (isset . "onwidths") .onwidths "area-more" }}
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
{{- with .page }}
{{- $format := .OutputFormats.Get "print" }}
{{- $show := and $format (not (.Param "disablePrintButton")) }}
{{- if $show }}
{{- $show = not (partial "_relearn/pageIsSpecial.gotmpl" .) }}
{{- end }}
{{- if $show }}
2023-09-18 20:24:49 +02:00
{{- partial "topbar/func/button.html" (dict
"page" .
"class" "topbar-button-print"
"href" $format.RelPermalink
2023-09-18 20:24:49 +02:00
"icon" "print"
"onwidths" $onwidths
"onwidthm" $onwidthm
"onwidthl" $onwidthl
2023-12-05 08:40:58 +01:00
"hint" (printf "%s (CTRL+ALT+p)" (T "Print-this-chapter"))
2023-09-18 20:24:49 +02:00
)}}
{{- end }}
{{- end }}