diff options
Diffstat (limited to 'documentation/themes/beastie/layouts/articles/list.html')
-rw-r--r-- | documentation/themes/beastie/layouts/articles/list.html | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/documentation/themes/beastie/layouts/articles/list.html b/documentation/themes/beastie/layouts/articles/list.html index d79f13bb32..deecb60507 100644 --- a/documentation/themes/beastie/layouts/articles/list.html +++ b/documentation/themes/beastie/layouts/articles/list.html @@ -2,19 +2,18 @@ <main class="main-wrapper-article"> <div class="article"> <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.subtitle }} <h3 class="subtitle">{{ .Params.subtitle }}</h3> {{ end }} - <div> - {{ $releaseInfo := split .Params.releaseinfo " " }} - - {{if gt (len $releaseInfo) 3}} - {{ i18n "revision" }}: - <a href="https://cgit.freebsd.org/doc/commit/?id="> - <span class="gitref">{{ index $releaseInfo 2 }}</span> - </a> - {{ end }} - </div> {{ if .Params.copyright }} <div class="copyright"> Copyright © {{ .Params.copyright }} @@ -23,17 +22,17 @@ {{ if isset .Params "trademarks" }} {{ partial "trademarks" .Params.trademarks }} {{ end }} - <div> - {{if gt (len $releaseInfo) 5}} - {{ $hour := replace (index $releaseInfo 4) "Z" "" }} - {{ i18n "last-modified" }} {{ index $releaseInfo 3 }} {{ $hour }} {{ i18n "by" }} {{ index $releaseInfo 5 }}. - {{ end }} - </div> <div class="toc-mobile"> <h3>{{ i18n "toc" }}</h3> {{ .TableOfContents }} </div> {{ .Content }} + {{ if .GitInfo }} + <hr /> + <div class="last-modified"> + <p><strong>{{ i18n "last-modified" }}</strong>: {{ .GitInfo.AuthorDate | time.Format ":date_long" }} {{ i18n "by" }} <a href="https://cgit.freebsd.org/doc/commit/?id={{ .GitInfo.AbbreviatedHash }}" target="_blank">{{ .GitInfo.AuthorName }}</a></p> + </div> + {{ end }} </div> <aside class="toc"> <div class="toc-content"> @@ -43,9 +42,12 @@ <div class="resources"> <h3>{{ i18n "resources" }}</h3> <ul class="contents"> - <!--<li><a href="#"><i class="fa fa-file-pdf-o" aria-hidden="true"></i>{{ i18n "download-pdf" }}</a></li>--> + {{ $pathSections := split .Page.File "/" }} + {{ $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" title="{{ i18n "download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li> {{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }} - <li><a href="{{ $editUrl }}" target="_blank"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>{{ i18n "edit-page" }}</a></li> + <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> |