diff options
Diffstat (limited to 'layouts/partials')
| -rw-r--r-- | layouts/partials/docs/footer.html | 58 | ||||
| -rw-r--r-- | layouts/partials/docs/inject/content-before.html | 21 |
2 files changed, 28 insertions, 51 deletions
diff --git a/layouts/partials/docs/footer.html b/layouts/partials/docs/footer.html index 1edbcfa..e7022e1 100644 --- a/layouts/partials/docs/footer.html +++ b/layouts/partials/docs/footer.html @@ -1,31 +1,29 @@ -<!-- Previous / Next navigation --> -<!-- <div class='prev-next'> --> - <!-- <div class='prev'> --> - <!-- {{ with .NextInSection }} --> - <!-- <h3><a href="{{ .RelPermalink }}"> --> - <!-- <span>previous page: {{ .Title }}</span> --> - <!-- </a></h3> --> - <!-- {{ else }} --> - <!-- <span></span> --> - <!-- {{ end }} --> - <!-- </div> --> - <!-- <div class="next"> --> - <!-- {{ if and (eq .Kind "section") .Params.next }} --> - <!-- {{/* Use the raw URL from front matter */}} --> - <!-- <h3><a href="{{ .Params.next }}"> --> - <!-- <span>next: installation</span> --> - <!-- </a></h3> --> - <!-- {{ else }} --> - <!-- {{ with .PrevInSection }} --> - <!-- <h3><a href="{{ .RelPermalink }}"> --> - <!-- <span>next: {{ .Title }}</span> --> - <!-- </a></h3> --> - <!-- {{ end }} --> - <!-- {{ end }} --> - <!-- </div> --> -<!-- </div> --> +<div class="flex flex-wrap justify-between"> -<!-- {{ $script := resources.Get "clipboard.js" | resources.Minify }} --> -<!-- {{ with $script.Content }} --> - <!-- <script>{{ . | safeJS }}</script> --> -<!-- {{ end }} --> +{{ if and .GitInfo .Site.Params.BookLastChangeLink }} +<div> + {{- $date := partial "docs/date" (dict "Date" .Lastmod "Format" .Site.Params.BookDateFormat) -}} + <a class="flex align-center" href="{{ partial "docs/links/commit" . }}" title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date | lower }}' target="_blank" rel="noopener"> + <img src='{{ "svg/calendar.svg" | relURL }}'' class="book-icon" alt="" /> + <span>{{ $date | lower }}</span> + </a> +</div> +{{ end }} + +{{ if and .File .Site.Params.BookEditLink }} +<div> + <a class="flex align-center" href="{{ partial "docs/links/edit" . }}" target="_blank" rel="noopener edit"> + <img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" /> + <span>{{ i18n "edit this page" }}</span> + </a> +</div> +{{ end }} + +</div> + +{{ partial "docs/prev-next" . }} + +{{ $script := resources.Get "clipboard.js" | resources.Minify }} +{{ with $script.Content }} + <script>{{ . | safeJS }}</script> +{{ end }} diff --git a/layouts/partials/docs/inject/content-before.html b/layouts/partials/docs/inject/content-before.html deleted file mode 100644 index d33168e..0000000 --- a/layouts/partials/docs/inject/content-before.html +++ /dev/null @@ -1,21 +0,0 @@ -<div class="flex justify-between align-center"> -{{ if not .IsHome}} - {{ if .Title }} - <h1>{{ .Title }}</h1> - {{ else }} - <h1>{{ .Site.Title }}</h1> - {{ end }} - {{ if and .GitInfo .Site.Params.BookRepo }} - <div> - {{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} - <a class="flex align-center" href="{{ partial "docs/links/commit" . }}" title='last modified | {{ $date | lower }}' target="_blank" rel="noopener"> - <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="book-icon"> - <path d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z" fill="currentColor"/> - <path fill="none" d="M0 0h24v24H0z"/> - </svg> - <span>{{ $date | lower }}</span> - </a> - </div> - {{ end }} -{{ end }} -</div> |
