mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-03 20:22:41 +00:00
90 lines
3.8 KiB
HTML
90 lines
3.8 KiB
HTML
{{- $params := .Scratch.Get "params" -}}
|
|
{{- $gitRepo := (strings.TrimSuffix "/" .Site.Params.gitRepo) -}}
|
|
|
|
<div class="post-footer" id="post-footer">
|
|
<div class="post-info">
|
|
<div class="post-info-line">
|
|
<div class="post-info-mod">
|
|
<span title={{ "2006-01-02 15:04:05" | .Lastmod.Format }}>
|
|
{{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}}
|
|
{{- dict "Date" . | T "updatedOnDate" -}}
|
|
{{- if $gitRepo -}}
|
|
{{- with $.GitInfo -}}
|
|
<a class="git-hash" href="{{ printf `%v/commit/%v` $gitRepo .Hash }}" rel="external nofollow noopener noreferrer" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
|
|
{{- dict "Class" "fa-solid fa-hashtag fa-fw" | partial "plugin/icon.html" -}}
|
|
{{- .AbbreviatedHash -}}
|
|
</a>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</span>
|
|
</div>
|
|
{{- with $params.license | string -}}
|
|
<div class="post-info-license{{ with $params.password }} d-none{{ end }}">
|
|
<span>{{- . | safeHTML -}} </span>
|
|
</div>
|
|
{{- end -}}
|
|
</div>
|
|
<div class="post-info-line{{ with $params.password }} d-none{{ end }}">
|
|
<div class="post-info-md">
|
|
{{- if $params.linktomarkdown -}}
|
|
{{- with .OutputFormats.Get "markdown" -}}
|
|
<span>
|
|
{{- $options := dict "Class" "link-to-markdown" "Destination" .RelPermalink "Title" (T "readMarkdown") "Content" (T "readMarkdown") "externalIcon" false -}}
|
|
{{- partial "plugin/link.html" $options -}}
|
|
</span>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- with $params.edit -}}
|
|
{{- if .Enable -}}
|
|
<span>
|
|
{{- $editUrl := printf "%v/%v" (strings.TrimSuffix "/" .Url) $.File.Path -}}
|
|
{{- if not (hasPrefix $editUrl "http") -}}
|
|
{{- $editUrl = printf "%v/%v" $gitRepo (strings.TrimPrefix "/" $editUrl) -}}
|
|
{{- end -}}
|
|
{{- $options := dict "Class" "link-to-edit" "Destination" $editUrl "Title" (T "editThisPage") "Content" (T "editThisPage") "externalIcon" false -}}
|
|
{{- partial "plugin/link.html" $options -}}
|
|
</span>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</div>
|
|
<div class="post-info-share">
|
|
<span>
|
|
{{- partial "plugin/share.html" . -}}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="post-info-more">
|
|
<section class="post-tags">
|
|
{{- with .Params.tags -}}
|
|
{{- dict "Class" "fa-solid fa-tags fa-fw" | partial "plugin/icon.html" -}}
|
|
{{- range $index, $value := . -}}
|
|
{{- if gt $index 0 }}, {{ end -}}
|
|
{{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}}
|
|
<a href="{{ $tag.RelPermalink }}">{{ $tag.Title }}</a>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</section>
|
|
<section>
|
|
<span><a href="javascript:void(0);" onclick="window.history.back();">{{ T "back" }}</a></span> | <span><a href="{{ .Site.Home.RelPermalink }}">{{ T "home" }}</a></span>
|
|
</section>
|
|
</div>
|
|
|
|
<div class="post-nav">
|
|
{{- if .PrevInSection -}}
|
|
<a href="{{ .PrevInSection.RelPermalink }}" class="prev" rel="prev" title="{{ .PrevInSection.Title }}">
|
|
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
|
|
{{- .PrevInSection.Title -}}
|
|
</a>
|
|
{{- end -}}
|
|
{{ if .NextInSection }}
|
|
<a href="{{ .NextInSection.RelPermalink }}" class="next" rel="next" title="{{ .NextInSection.Title }}">
|
|
{{- .NextInSection.Title -}}
|
|
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
|
|
</a>
|
|
{{- end -}}
|
|
</div>
|
|
</div>
|