12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- {{ $item := .item }}
- {{/* Dynamic view adjusts to content type. */}}
- {{ $icon_pack := "far" }}
- {{ $icon := "fa-file-alt" }}
- {{ $show_authors := false }}
- {{ $link := $item.RelPermalink }}
- {{ $target := "" }}
- {{ if $item.Params.external_link }}
- {{ $link = $item.Params.external_link }}
- {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
- {{ end }}
- {{ if eq $item.Type "post" }}
- {{ $icon = "fa-newspaper" }}
- {{ else if eq $item.Type "event" }}
- {{ $icon = "fa-calendar-alt" }}
- {{ else if eq $item.Type "publication" }}
- {{ $show_authors = true }}
- {{ else if eq $item.Type "project" }}
- {{ $icon_pack = "fas" }}
- {{ $icon = "fa-project-diagram" }}
- {{ $show_authors = true }}
- {{ end }}
- {{ $has_attachments := partial "functions/has_attachments" . }}
- <div class="view-list view-list-item">
- <i class="{{$icon_pack}} {{$icon}} pub-icon" aria-hidden="true"></i>
- <a href="{{$link}}" {{ $target | safeHTMLAttr }}>{{ $item.Title }}</a>
- {{ if eq $item.Type "event" }}
- <div class="article-metadata">
- <span>
- {{ partial "functions/get_event_dates" $item }}
- </span>
- {{ with $item.Params.location }}
- <span class="middot-divider"></span>
- <span>{{ . }}</span>
- {{ end }}
- </div>
- {{ end }}
- {{ if and $show_authors $item.Params.authors }}
- <div class="article-metadata">
- {{ partial "page_metadata_authors" $item }}
- </div>
- {{ end }}
- {{ if $has_attachments }}
- <div class="btn-links">
- {{ partial "page_links" (dict "page" $item "is_list" 1) }}
- </div>
- {{ end }}
- </div>
|