citation.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {{ $item := .item }}
  2. {{ $has_attachments := partial "functions/has_attachments" $item }}
  3. <div class="pub-list-item view-citation" style="margin-bottom: 1rem">
  4. <i class="far fa-file-alt pub-icon" aria-hidden="true"></i>
  5. {{/* APA Style */}}
  6. {{ if eq (site.Params.publications.citation_style | default "apa") "apa" }}
  7. <span class="article-metadata li-cite-author">
  8. {{ partial "page_metadata_authors" $item }}
  9. </span>
  10. ({{- $item.Date.Format "2006" -}}).
  11. <a href="{{ $item.RelPermalink }}">{{ $item.Title }}</a>.
  12. {{ if $item.Params.publication_short }}
  13. {{- $item.Params.publication_short | markdownify -}}.
  14. {{ else if $item.Params.publication }}
  15. {{- $item.Params.publication | markdownify -}}.
  16. {{ end }}
  17. <p>{{ partial "page_links" (dict "page" $item "is_list" 1) }}</p>
  18. {{/* MLA Style */}}
  19. {{ else }}
  20. <span class="article-metadata li-cite-author">
  21. {{ partial "page_metadata_authors" $item }}.
  22. </span>
  23. <a href="{{ $item.RelPermalink }}">{{ $item.Title }}</a>.
  24. {{ if $item.Params.publication_short }}
  25. {{- $item.Params.publication_short | markdownify -}},
  26. {{ else if $item.Params.publication }}
  27. {{- $item.Params.publication | markdownify -}},
  28. {{ end }}
  29. {{- $item.Date.Format "2006" -}}.
  30. {{ if $has_attachments }}
  31. <div class="btn-links">
  32. {{ partial "page_links" (dict "page" $item "is_list" 1) }}
  33. </div>
  34. {{ end }}
  35. {{ end }}
  36. </div>