mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-06 22:14:55 +00:00
65 lines
1.8 KiB
HTML
65 lines
1.8 KiB
HTML
{{ $item := . }}
|
|
|
|
{{/* Dynamic view adjusts to content type. */}}
|
|
{{ $has_attachments := partial "functions/has_attachments" . }}
|
|
|
|
{{/* Get summary. */}}
|
|
{{ $summary := "" }}
|
|
{{ if $item.Params.summary }}
|
|
{{ $summary = $item.Params.summary | markdownify | emojify }}
|
|
{{ else if .Params.abstract }}
|
|
{{ $summary = .Params.abstract | markdownify | emojify }}
|
|
{{ else if $item.Summary }}
|
|
{{ $summary = $item.Summary }}
|
|
{{ end }}
|
|
|
|
<div class="card-simple">
|
|
|
|
{{ if eq $item.Type "event" }}
|
|
<div class="article-metadata">
|
|
{{ if $item.Params.authors }}
|
|
<div>
|
|
{{ partial "page_metadata_authors" $item }}
|
|
</div>
|
|
{{ end }}
|
|
<span>
|
|
{{ partial "functions/get_event_dates" $item }}
|
|
</span>
|
|
{{ with $item.Params.location }}
|
|
<span class="middot-divider"></span>
|
|
<span>{{ . }}</span>
|
|
{{ end }}
|
|
</div>
|
|
{{ else }}
|
|
{{ partial "page_metadata" (dict "page" $item "is_list" 1) }}
|
|
{{ end }}
|
|
|
|
{{ $resource := ($item.Resources.ByType "image").GetMatch "*featured*" }}
|
|
{{ $anchor := $item.Params.image.focal_point | default "Smart" }}
|
|
{{ with $resource }}
|
|
{{ $image := .Fill (printf "808x455 %s" $anchor) }}
|
|
<a href="{{ $item.RelPermalink }}">
|
|
<div class="img-hover-zoom"><img src="{{ $image.RelPermalink }}" class="article-banner" alt="{{ $item.Title }}" loading="lazy"></div>
|
|
</a>
|
|
{{end}}
|
|
|
|
<div class="section-subheading article-title mb-1 mt-3">
|
|
<a href="{{ $item.RelPermalink }}">{{ $item.Title }}</a>
|
|
</div>
|
|
|
|
{{ with $summary }}
|
|
<a href="{{ $item.RelPermalink }}" class="summary-link">
|
|
<div class="article-style">
|
|
<p>{{.}}</p>
|
|
</div>
|
|
</a>
|
|
{{ end }}
|
|
|
|
{{ if $has_attachments }}
|
|
<div class="btn-links">
|
|
{{ partial "page_links" (dict "page" $item "is_list" 1) }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
</div>
|