mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-15 20:15:31 +00:00
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.
51 lines
1.6 KiB
HTML
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>
|