li_list.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {{ $item := . }}
  2. {{ $microdata_type := "CreativeWork" }}
  3. {{ $icon := "fa-file-alt" }}
  4. {{ $show_authors := false }}
  5. {{ $show_buttons := false }}
  6. {{/* Dynamic view adjusts to content type. */}}
  7. {{ if eq $item.Type "post" }}
  8. {{ $microdata_type = "BlogPosting" }}
  9. {{ $icon = "fa-newspaper" }}
  10. {{ else if eq $item.Type "talk" }}
  11. {{ $microdata_type = "Event" }}
  12. {{ $icon = "fa-calendar-alt" }}
  13. {{ else if eq $item.Type "publication" }}
  14. {{ $microdata_type = "ScholarlyArticle" }}
  15. {{ $show_authors = true }}
  16. {{ $show_buttons = true }}
  17. {{ end }}
  18. <div class="view-list-item" itemscope itemtype="http://schema.org/{{$microdata_type}}">
  19. <i class="far {{$icon}} pub-icon" aria-hidden="true"></i>
  20. <a href="{{ $item.RelPermalink }}" itemprop="url"><span itemprop="name">{{ $item.Title }}</span></a>
  21. {{ if eq $item.Type "talk" }}
  22. <div class="article-metadata">
  23. <span itemprop="startDate">
  24. {{ partial "functions/get_event_dates" $item }}
  25. </span>
  26. {{ with $item.Params.location }}
  27. <span class="middot-divider"></span>
  28. <span itemprop="location">{{ . }}</span>
  29. {{ end }}
  30. </div>
  31. {{ end }}
  32. {{ if and $show_authors $item.Params.authors }}
  33. <div class="article-metadata" itemprop="author">
  34. {{ partial "page_metadata_authors" $item }}
  35. </div>
  36. {{ end }}
  37. {{ if $show_buttons }}
  38. <div class="btn-links">
  39. {{ partial "page_links" (dict "page" $item "is_list" 1) }}
  40. </div>
  41. {{ end }}
  42. </div>