Files
HugoBlox-kit/modules/blox-tailwind/layouts/_partials/views/citation.html
T
George Cushen 0e60ce6608 refactor(events): namespace front matter to avoid conflict with Hugo's date
BREAKING CHANGE:

Standardize event metadata by introducing event_start, event_end, event_all_day, and event_name, keep Hugo’s built-in date for publication, and update all layouts/partials/JSON-LD/views to read the new names; demo event content now reflects the renamed params so event listings show their true schedule instead of the page creation date.
2026-01-02 18:51:10 +00:00

51 lines
1.6 KiB
HTML

{{ $item := .item }}
{{ $year_value := $item.Params.event_start | default $item.Date }}
{{ $year := (time $year_value).Format "2006" }}
{{ $has_attachments := partial "functions/has_attachments" $item }}
<div class="pub-list-item view-citation" style="margin-bottom: 1rem">
<i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
{{/* APA Style */}}
{{ if eq (site.Params.hugoblox.content.citations.style | default "apa") "apa" }}
<span class="article-metadata li-cite-author">
{{ partial "page_metadata_authors" $item }}
</span>
({{- $year -}}).
<a href="{{ $item.RelPermalink }}" class="underline">{{ $item.Title }}</a>.
{{ if $item.Params.publication_short }}
{{- $item.Params.publication_short | markdownify -}}.
{{ else if $item.Params.publication }}
{{- $item.Params.publication | markdownify -}}.
{{ end }}
{{ if $has_attachments }}
<div class="flex flex-wrap space-x-3">
{{ partial "page_links" (dict "page" $item "is_list" 1) }}
</div>
{{ end }}
{{/* MLA Style */}}
{{ else }}
<span class="article-metadata li-cite-author">
{{ partial "page_metadata_authors" $item }}.
</span>
<a href="{{ $item.RelPermalink }}">{{ $item.Title }}</a>.
{{ if $item.Params.publication_short }}
{{- $item.Params.publication_short | markdownify -}},
{{ else if $item.Params.publication }}
{{- $item.Params.publication | markdownify -}},
{{ end }}
{{- $year -}}.
{{ if $has_attachments }}
<div class="flex flex-wrap space-x-3">
{{ partial "page_links" (dict "page" $item "is_list" 1) }}
</div>
{{ end }}
{{ end }}
</div>