diff options
Diffstat (limited to 'documentation/themes/beastie/layouts/books/single.html')
-rw-r--r-- | documentation/themes/beastie/layouts/books/single.html | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/documentation/themes/beastie/layouts/books/single.html b/documentation/themes/beastie/layouts/books/single.html index a9fcae0cbc..332b00d4d7 100644 --- a/documentation/themes/beastie/layouts/books/single.html +++ b/documentation/themes/beastie/layouts/books/single.html @@ -2,10 +2,9 @@ <input type="checkbox" class="hidden toggle" id="menu-control"> <main class="main-wrapper-book"> <a id="top"></a> - {{ if eq .Params.showBookMenu true }} + {{ if or (eq (string .Params.showBookMenu) "true") (eq .Params.showBookMenu true) }} <aside class="book-menu"> <div class="book-menu-content"> - <h3>{{ i18n "book-chapters" }}</h3> <input id="search-book" type="text" placeholder="{{ i18n "search" }}" aria-label="{{ i18n "search" }}" maxlength="128" /> <nav id="MenuContents"> {{ partial "menu" . }} @@ -14,17 +13,26 @@ </aside> {{ end }} <div class="book"> - {{ if eq .Params.showBookMenu true }} + {{ if or (eq (string .Params.showBookMenu) "true") (eq .Params.showBookMenu true) }} <div class="book-menu-mobile"> <label for="menu-control"> <span class="menu-control-button"> - <i class="fa fa-list" aria-hidden="true"></i> + <i class="fa fa-list" aria-hidden="true" title="{{ i18n "book-menu" }}"></i> {{ i18n "book-menu" }} </span> </label> </div> {{ end }} <h1 class="title">{{ .Title }}</h1> + {{ $siteLanguage := string $.Site.Language }} + {{ if ne $siteLanguage "en" }} + <div class="admonitionblock note"> + <p> + <i class="fa fa-exclamation-circle" aria-hidden="true"></i> + {{ i18n "stale-warning-message" }} <a href="https://translate-dev.freebsd.org/" target="_blank">{{ i18n "translation-instance" }}</a>. + </p> + </div> + {{ end }} {{ if .Params.copyright }} <div class="copyright"> Copyright © {{ .Params.copyright }} @@ -61,7 +69,7 @@ <div class="buttons"> {{ if .Params.prev }} <div class="prev"> - <i class="fa fa-angle-left" aria-hidden="true"></i> + <i class="fa fa-angle-left" aria-hidden="true" title="{{ i18n "prev" }}"></i> <div class="container"> {{ if $.Site.Params.isOnline }} <a href={{ .Params.Prev | absLangURL }} class="direction">{{ i18n "prev" }}</a> @@ -80,7 +88,7 @@ </div> {{ end }} <div class="home"> - <i class="fa fa-home" aria-hidden="true"></i> + <i class="fa fa-home" aria-hidden="true" title="{{ i18n "home" }}"></i> <div class="container"> {{ if $.Site.Params.isOnline }} <a href="../" class="direction">{{ i18n "home" }}</a> @@ -107,7 +115,7 @@ {{ end }} {{ end }} </div> - <i class="fa fa-angle-right" aria-hidden="true"></i> + <i class="fa fa-angle-right" aria-hidden="true" title="{{ i18n "next" }}"></i> </div> {{ end }} </div> @@ -121,16 +129,16 @@ <div class="resources"> <h3>{{ i18n "resources" }}</h3> <ul class="contents"> - {{ $pathSections := split .Page.File "/" }} - {{ if $.Site.Params.isOnline }} - {{ $singlePagePath := printf "%s/%s/book/" (index $pathSections 0) (index $pathSections 1) }} - <li><i class="fa fa fa-book" aria-hidden="true"></i><a href={{ $singlePagePath | absLangURL }}>{{ i18n "single-html" }}</a></li> - {{ end }} - {{ $path := printf "%s/%s/%s_%s.pdf" (index $pathSections 0) (index $pathSections 1) (index $pathSections 1) $.Site.Home.Language }} - {{ $pdfUrl := printf "%s%s/%s" $.Site.Params.downloadBaseUrl $.Site.Home.Language $path }} - <li><i class="fa fa-file-pdf-o" aria-hidden="true"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li> - {{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }} - <li><i class="fa fa-pencil-square-o" aria-hidden="true"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li> + {{ $pathSections := split .Page.Path "/" }} + {{ $docLang := $.Site.Home.Language.Lang }} + {{ $docType := index $pathSections 1 }} + {{ $docName := index $pathSections 2 }} + {{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }} + {{ $adocFileName := printf "%s.adoc" $.Page.File }} + {{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }} + <li><i class="fa fa-file-pdf-o" aria-hidden="true" title="{{ i18n "download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li> + {{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }} + <li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li> </ul> </div> </div> |