single.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. <article class="article article-project" itemscope itemtype="http://schema.org/Article">
  4. {{ partial "page_header.html" . }}
  5. <div class="article-container">
  6. <div class="article-style" itemprop="articleBody">
  7. {{ .Content }}
  8. </div>
  9. {{ partial "tags.html" . }}
  10. {{ partial "page_author.html" . }}
  11. {{ $page := . }}
  12. {{ $project := .Slug }}
  13. {{ if not $project }}{{/* If user did not explicitly set `slug` in front matter. */}}
  14. {{ $project = .File.TranslationBaseName }}
  15. {{ end }}
  16. {{ if eq $project "index" }}{{/* Check if using dir-based page bundles. */}}
  17. {{ $project = delimit (last 1 (split (substr .Dir 0 -1) "/")) "" }}
  18. {{ end }}
  19. {{ $project_path := .RelPermalink }}
  20. {{ if (.Site.Params.projects.list_children | default true) }}
  21. {{ $items := where (where .Site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
  22. {{ $items := $items | union (where (where .Site.RegularPages "Type" "publication") ".Params.url_project" $project_path) }}
  23. {{ $pubs_len := len $items }}
  24. {{ if ge $pubs_len 1 }}
  25. <h2>{{ (i18n "publications") }}</h2>
  26. {{ range $items }}
  27. {{ if eq $page.Site.Params.projects.publication_format 1 }}
  28. {{ partial "publication_li_detailed" . }}
  29. {{ else if eq $page.Site.Params.projects.publication_format 2 }}
  30. {{ partial "publication_li_apa" . }}
  31. {{ else if eq $page.Site.Params.projects.publication_format 3 }}
  32. {{ partial "publication_li_mla" . }}
  33. {{ else if eq $page.Site.Params.projects.publication_format 4 }}
  34. {{ partial "publication_li_stream" . }}
  35. {{ else }}
  36. {{ partial "publication_li_simple" . }}
  37. {{ end }}
  38. {{ end }}
  39. {{ end }}
  40. {{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
  41. {{ $items := $items | union (where (where .Site.RegularPages "Type" "talk") ".Params.url_project" $project_path) }}
  42. {{ $talks_len := len $items }}
  43. {{ if ge $talks_len 1 }}
  44. <h2>{{ (i18n "talks") }}</h2>
  45. {{ range sort $items ".Params.time_start" "desc" }}
  46. {{ if eq $page.Site.Params.projects.talk_format 1 }}
  47. {{ partial "talk_li_detailed" . }}
  48. {{ else if eq $page.Site.Params.projects.talk_format 2 }}
  49. {{ partial "talk_li_stream" . }}
  50. {{ else }}
  51. {{ partial "talk_li_simple" . }}
  52. {{ end }}
  53. {{ end }}
  54. {{ end }}
  55. {{ end }}
  56. </div>
  57. </article>
  58. {{ if .Site.Params.section_pager }}
  59. <div class="article-container article-widget">
  60. {{ partial "section_pager.html" . }}
  61. </div>
  62. {{ end }}
  63. {{ partial "footer_container.html" . }}
  64. {{ partial "footer.html" . }}