|
@@ -1,9 +1,16 @@
|
|
|
{{ $item := . }}
|
|
|
|
|
|
{{ $microdata_type := "CreativeWork" }}
|
|
|
+{{ $icon_pack := "far" }}
|
|
|
{{ $icon := "fa-file-alt" }}
|
|
|
{{ $show_authors := false }}
|
|
|
{{ $show_buttons := false }}
|
|
|
+{{ $link := $item.RelPermalink }}
|
|
|
+{{ $target := "" }}
|
|
|
+{{ if $item.Params.external_link }}
|
|
|
+ {{ $link = $item.Params.external_link }}
|
|
|
+ {{ $target = "target=\"_blank\" rel=\"noopener\"" }}
|
|
|
+{{ end }}
|
|
|
|
|
|
{{/* Dynamic view adjusts to content type. */}}
|
|
|
{{ if eq $item.Type "post" }}
|
|
@@ -16,11 +23,17 @@
|
|
|
{{ $microdata_type = "ScholarlyArticle" }}
|
|
|
{{ $show_authors = true }}
|
|
|
{{ $show_buttons = true }}
|
|
|
+{{ else if eq $item.Type "project" }}
|
|
|
+ {{ $microdata_type = "CreativeWork" }}
|
|
|
+ {{ $icon_pack = "fas" }}
|
|
|
+ {{ $icon = "fa-project-diagram" }}
|
|
|
+ {{ $show_authors = true }}
|
|
|
+ {{ $show_buttons = true }}
|
|
|
{{ end }}
|
|
|
|
|
|
<div class="view-list-item" itemscope itemtype="http://schema.org/{{$microdata_type}}">
|
|
|
- <i class="far {{$icon}} pub-icon" aria-hidden="true"></i>
|
|
|
- <a href="{{ $item.RelPermalink }}" itemprop="url"><span itemprop="name">{{ $item.Title }}</span></a>
|
|
|
+ <i class="{{$icon_pack}} {{$icon}} pub-icon" aria-hidden="true"></i>
|
|
|
+ <a href="{{$link}}" {{ $target | safeHTMLAttr }} itemprop="url"><span itemprop="name">{{ $item.Title }}</span></a>
|
|
|
|
|
|
{{ if eq $item.Type "talk" }}
|
|
|
<div class="article-metadata">
|