1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- {{ $item := .item }}
- {{/* Dynamic view adjusts to content type. */}}
- {{ $has_attachments := partial "functions/has_attachments" . }}
- {{ $link := $item.RelPermalink }}
- {{ $target := "" }}
- {{ if $item.Params.external_link }}
- {{ $link = $item.Params.external_link }}
- {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
- {{ end }}
- {{/* 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 view-card">
- {{ 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 webp %s" $anchor) }}
- <a href="{{ $link }}" {{ $target | safeHTMLAttr }}>
- <div class="img-hover-zoom">
- <img src="{{ $image.RelPermalink }}" height="{{ $image.Height }}" width="{{ $image.Width }}"
- class="article-banner" alt="{{ $item.Title }}" loading="lazy">
- </div>
- </a>
- {{end}}
- <div class="section-subheading article-title mb-1 mt-3">
- <a href="{{ $link }}" {{ $target | safeHTMLAttr }}>{{ $item.Title }}</a>
- </div>
- {{ with $summary }}
- <a href="{{ $link }}" {{ $target | safeHTMLAttr }} 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>
|