mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-07-17 03:51:56 +00:00
update
This commit is contained in:
parent
2af5500678
commit
5e0bad32e0
@ -1,25 +1,15 @@
|
||||
<div class="flex flex-wrap justify-between">
|
||||
|
||||
{{ if and .GitInfo .Site.Params.BookRepo }}
|
||||
{{ if .Params.date }} <!-- Check if the date is specified in the page's front matter -->
|
||||
<div>
|
||||
{{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}}
|
||||
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}}
|
||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}" title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date }}' target="_blank" rel="noopener">
|
||||
{{- $date := .Params.date.Format .Site.Params.BookDateFormat }} <!-- Format the date based on your site's parameters -->
|
||||
<a class="flex align-center" title='{{ i18n "Page dated" }} | {{ $date }}'>
|
||||
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="Calendar" />
|
||||
<span>{{ $date }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
|
||||
<div>
|
||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default "content" }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="Edit" />
|
||||
<span>{{ i18n "Edit this page" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ $script := resources.Get "clipboard.js" | resources.Minify }}
|
||||
|
BIN
static/favicon copy.png
Normal file
BIN
static/favicon copy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 B |
Binary file not shown.
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 27 KiB |
Loading…
Reference in New Issue
Block a user