vault page

This commit is contained in:
Yuri Zamyatin 2024-12-07 16:06:52 +00:00
parent 16cae0ddcb
commit f91c80ddaf
3 changed files with 11 additions and 6 deletions
archetypes
layouts/_default

View File

@ -15,6 +15,7 @@ sections:
link: # /<section>/ link: # /<section>/
icon: # localpath from assets/icons/ w/o ext icon: # localpath from assets/icons/ w/o ext
# ... # ...
vaultPageLink: # /<somename.md>/
notice: notice:
# generator settings, no need to edit # generator settings, no need to edit

View File

@ -1,7 +1,6 @@
{{ $hook_ctx := . }}
{{ with .Page.Resources.Get .Destination | resources.Copy (replaceRE "([^/]*)$" "_$1" (path.Join .Page.Path .Destination)) | fingerprint }} {{ with .Page.Resources.Get .Destination | resources.Copy (replaceRE "([^/]*)$" "_$1" (path.Join .Page.Path .Destination)) | fingerprint }}
<figure> <figure>
<a href="{{ .RelPermalink }}"><img src="{{ .RelPermalink }}"></a> <a href="{{ .RelPermalink }}"><img src="{{ .RelPermalink }}"></a>
{{- with $hook_ctx.Text }}<figcaption>{{ . }}</figcaption>{{ end -}} {{- with $.Text }}<figcaption>{{ . }}</figcaption>{{ end -}}
</figure> </figure>
{{ end }} {{ end }}

View File

@ -4,10 +4,12 @@
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }} {{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ if .Description }}<p>{{ .Description }}</p>{{ end }} {{ if .Description }}<p>{{ .Description }}</p>{{ end }}
{{ partial "taxo_of_single.html" . }} {{ partial "taxo_of_single.html" . }}
{{ if .Lastmod }}
<div class="pub-date"> <div class="pub-date">
mtime={{ .Lastmod.Format .Site.Params.dateFormat }} mtime={{ .Lastmod.Format .Site.Params.dateFormat }}
archived={{ default false .Params.archived }} archived={{ default false .Params.archived }}
</div> </div>
{{ end }}
</div> </div>
{{- end -}} {{- end -}}
@ -30,8 +32,11 @@
{{- end -}} {{- end -}}
{{- define "footer" -}} {{- define "footer" -}}
<!--div class="content post"> <div class="content post">
<a href="">download</a> | {{ with .Site.GetPage .Site.Home.Params.vaultPageLink}}
<a href="{{ relURL "/verification/" }}">verify</a> {{ if not (.Eq $.Page) }}
</div--> <a href="{{ .RelPermalink }}">save or verify</a>
{{ end }}
{{ end }}
</div>
{{- end -}} {{- end -}}