initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "area-more" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- with .page }}
|
||||
{{- $show := .File }}
|
||||
{{- if $show }}
|
||||
{{- $show = not (partial "_relearn/pageIsSpecial.gotmpl" .) }}
|
||||
{{- end }}
|
||||
{{- if $show }}
|
||||
{{- $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 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "area-more" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- with .page }}
|
||||
{{- $format := .OutputFormats.Get "markdown" }}
|
||||
{{- $show := and $format (not (.Param "disableMarkdownButton")) }}
|
||||
{{- if $show }}
|
||||
{{- $show = not (partial "_relearn/pageIsSpecial.gotmpl" .) }}
|
||||
{{- end }}
|
||||
{{- if $show }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-markdown"
|
||||
"href" $format.RelPermalink
|
||||
"icon" "fa-fw fab fa-markdown"
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (T "Show-Markdown")
|
||||
)}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- $onempty := cond (isset . "onempty") .onempty "hide" }}
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- partial "topbar/func/area-button.html" (dict
|
||||
"page" .page
|
||||
"area" "more"
|
||||
"icon" "ellipsis-v"
|
||||
"onempty" $onempty
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (printf "%s" (T "More-action"))
|
||||
)}}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- with .page }}
|
||||
{{- $show := not (.Param "disableNextPrev") }}
|
||||
{{- if $show }}
|
||||
{{- $endarrow := "🡒" }}
|
||||
{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
|
||||
{{- $endarrow = "🡐" }}
|
||||
{{- end }}
|
||||
{{- $next := partialCached "_relearn/pageNext.gotmpl" . .Path }}
|
||||
{{- $nextTitle := partial "title.gotmpl" (dict "page" $next "outputFormat" "html") }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-next"
|
||||
"href" (partial "permalink.gotmpl" (dict "to" $next))
|
||||
"icon" "chevron-right"
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (printf "%s (%s)" $nextTitle ($endarrow | safeHTML))
|
||||
)}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- with .page }}
|
||||
{{- $show := not (.Param "disableNextPrev") }}
|
||||
{{- if $show }}
|
||||
{{- $startarrow := "🡐" }}
|
||||
{{- if eq (.Language.LanguageDirection | default (T "Reading-direction") | default "ltr") "rtl" }}
|
||||
{{- $startarrow = "🡒" }}
|
||||
{{- end }}
|
||||
{{- $prev := partialCached "_relearn/pagePrev.gotmpl" . .Path }}
|
||||
{{- $prevTitle := partial "title.gotmpl" (dict "page" $prev "outputFormat" "html") }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-prev"
|
||||
"href" (partial "permalink.gotmpl" (dict "to" $prev))
|
||||
"icon" "chevron-left"
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (printf "%s (%s)" $prevTitle ($startarrow | safeHTML))
|
||||
)}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- $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 }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-print"
|
||||
"href" $format.RelPermalink
|
||||
"icon" "print"
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (printf "%s (CTRL+ALT+p)" (T "Print-this-chapter"))
|
||||
)}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "hide" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "hide" }}
|
||||
{{- with .page }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-sidebar"
|
||||
"href" "javascript:toggleNav()"
|
||||
"icon" "bars"
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (printf "%s (CTRL+ALT+n)" (T "Navigation-toggle"))
|
||||
)}}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "area-more" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- with .page }}
|
||||
{{- $format := .OutputFormats.Get "source" }}
|
||||
{{- $show := and $format (not (.Param "disableSourceButton")) }}
|
||||
{{- if $show }}
|
||||
{{- $show = and (not (partial "_relearn/pageIsSpecial.gotmpl" .)) .File .File.Filename }}
|
||||
{{- end }}
|
||||
{{- if $show }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-source"
|
||||
"href" $format.RelPermalink
|
||||
"icon" "code"
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (T "Show-source")
|
||||
)}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- $onempty := cond (isset . "onempty") .onempty "hide" }}
|
||||
{{- $onwidths := cond (isset . "onwidths") .onwidths "show" }}
|
||||
{{- $onwidthm := cond (isset . "onwidthm") .onwidthm "show" }}
|
||||
{{- $onwidthl := cond (isset . "onwidthl") .onwidthl "show" }}
|
||||
{{- with .page }}
|
||||
{{- $show := not (.Param "disableToc") }}
|
||||
{{- if $show }}
|
||||
{{- $content := partial "toc-class.html" . }}
|
||||
{{- $hascontent := not (eq 0 (int (len (trim ($content | plainify) "\n\r\t ")))) }}
|
||||
{{- if not $hascontent }}
|
||||
{{- $content = " " }}
|
||||
{{- else }}
|
||||
{{- $content = (print "\n" $content) | safeHTML }}
|
||||
{{- end }}
|
||||
{{- partial "topbar/func/button.html" (dict
|
||||
"page" .
|
||||
"class" "topbar-button-toc"
|
||||
"href" "javascript:toggleTopbarFlyout(this)"
|
||||
"icon" "list-alt"
|
||||
"onempty" $onempty
|
||||
"onwidths" $onwidths
|
||||
"onwidthm" $onwidthm
|
||||
"onwidthl" $onwidthl
|
||||
"hint" (printf "%s (CTRL+ALT+t)" (T "Toc-toggle"))
|
||||
"content" $content
|
||||
)}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user