added commit info

This commit is contained in:
aethrvmn 2024-10-04 13:25:33 +02:00
parent 492d87d365
commit 26b996f07f

View file

@ -1,37 +1,37 @@
<div class="flex flex-wrap justify-between"> <div class="flex flex-wrap justify-between">
<div class="info-container">
<div class="left-section">
<div class="disclaimer">
<span>docs partially generated using gen ai</span>
</div>
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }} <div class="theme">
<div> <span>
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default "content" }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener"> site theme based on <a href="https://github.com/alex-shpak/hugo-book" target="_blank">hugo-book</a>
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" /> </span>
<span>{{ i18n "Edit this page" }}</span> </div>
</a>
</div> </div>
{{ end }}
<div class="commit-info">
<span>Last edited on {{ .GitInfo.CommitDate.Format "02/01/2006" }}</span>
{{ if and .GitInfo .Site.Params.BookRepo }} <br/>
<div class="commit-info"> <span>
{{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} title: {{ .GitInfo.Subject }}
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} </span>
<br/>
<span>Last edited</span> <span>
<br /> commit: <a href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookCommitPath }}/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash }}</a>
<span> </span>
commit <a href="{{ .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.Hash }}</a> <br/>
</span> <span>
<br /> author: {{ .GitInfo.AuthorName }}
<span> </span>
author: {{ .GitInfo.AuthorName }} &lt;{{ .GitInfo.AuthorEmail }}&gt; <br/>
</span> <span>
<br /> &lt;{{ .GitInfo.AuthorEmail }}&gt;
<span> </div>
date: {{ $date }}
</span>
</div>
{{ end }}
</div> </div>