aboutsummaryrefslogtreecommitdiff
path: root/documentation/themes/beastie/layouts/articles/single.html
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/themes/beastie/layouts/articles/single.html')
-rw-r--r--documentation/themes/beastie/layouts/articles/single.html108
1 files changed, 48 insertions, 60 deletions
diff --git a/documentation/themes/beastie/layouts/articles/single.html b/documentation/themes/beastie/layouts/articles/single.html
index 4fd884f9b5..deecb60507 100644
--- a/documentation/themes/beastie/layouts/articles/single.html
+++ b/documentation/themes/beastie/layouts/articles/single.html
@@ -1,68 +1,56 @@
{{ define "main" }}
-<div class="article">
- <h1 class="title">{{ .Title }}</h1>
- {{ if .Params.subtitle }}
- <h3 class="subtitle">{{ .Params.subtitle }}</h3>
- {{ end }}
- <div class="authorgroup">
- {{ range .Params.authors }}
- {{ if .author }}
- <div class="author">
- <h3 class="author">{{ .author }}</h3>
- </div>
- {{ end }}
- {{ if .email }}
- <div class="email">
- <p>
- <code class="email">
- <span></span><<a class="email" href="mailto:{{ .email }}">{{ .email }}</a>><span></span>
- </code>
- </p>
- </div>
- {{ end }}
- {{ if .webpage }}
- <div class="otheraddr">
- <span><a class="otheraddr" href="{{ .webpage }}">{{ .webpage }}</a></span>
- </div>
- {{ end }}
- {{ end }}
-
- {{ range .Params.organizations }}
- <div class="affiliation">
- <span class="orgname">
- {{ if .webpage }}
- <a class="link" href="{{.webpage}}">{{ .organization }}</a>
- {{ else }}
- {{ .organization }}
- {{ end }}
- </span>
+<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 }}
- </div>
- <div>
- {{ $releaseInfo := split .Params.releaseinfo " " }}
-
- {{if gt (len $releaseInfo) 3}}
- Revision:
- <a href="https://cgit.freebsd.org/doc/commit/?id=">
- <span class="gitref">{{ index $releaseInfo 2 }}</span>
- </a>
+ {{ if .Params.subtitle }}
+ <h3 class="subtitle">{{ .Params.subtitle }}</h3>
{{ end }}
- </div>
- {{ if .Params.copyright }}
- <div class="copyright">
- Copyright © {{ .Params.copyright }}
+ {{ if .Params.copyright }}
+ <div class="copyright">
+ Copyright © {{ .Params.copyright }}
+ </div>
+ {{ end}}
+ {{ if isset .Params "trademarks" }}
+ {{ partial "trademarks" .Params.trademarks }}
+ {{ end }}
+ <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}}
- {{ 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>
- {{ .Content }}
-</div>
+ <aside class="toc">
+ <div class="toc-content">
+ <h3>{{ i18n "toc" }}</h3>
+ {{ .TableOfContents }}
+ <hr />
+ <div class="resources">
+ <h3>{{ i18n "resources" }}</h3>
+ <ul class="contents">
+ {{ $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><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>
+ </aside>
+</main>
{{ end }}