Cataloguer/layouts/partials/cite.html

22 lines
737 B
HTML
Raw Normal View History

2023-10-05 18:27:13 +00:00
{{- $itemType := default "CreativeWork" .schemaType -}}
{{- $pages := where ( where .g.Site.Pages "Section" .section ) "title" .title | first 1 -}}
2023-10-05 18:27:13 +00:00
{{- with .c -}}
{{- with $pages -}}{{- range . -}}<a href="{{ .RelPermalink }}">{{- end -}}{{- end -}}
<cite
class="cite{{ with .citeStyle }} cite--{{ . }}{{ end }}"
itemscope
itemprop="citation"
itemtype="https://schema.org/{{- $itemType -}}"
{{- if $.titleTrans -}}
lang="{{- $.titleLang -}}"
title="{{- $.titleTrans -}}"
{{- end -}}>
{{- default .Title $.title -}}
</cite>
{{- with $pages -}}</a>{{- end -}}
{{- with $.edition }}<p class="edition">{{ . }}</p>{{- end -}}
2023-10-05 18:27:13 +00:00
{{- end -}}