single.html 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 := .File.ContentBaseName }}
  13. {{ $items := where (where .Site.RegularPages "Type" "post") ".Params.projects" "intersect" (slice $project) }}
  14. {{ $count := len $items }}
  15. {{ if ge $count 1 }}
  16. <h2>{{ (i18n "posts") }}</h2>
  17. {{ range $items }}
  18. {{ if eq $page.Site.Params.projects.post_format 0 }}
  19. {{ partial "post_li_simple" . }}
  20. {{ else if eq $page.Site.Params.projects.post_format 1 }}
  21. {{ partial "post_li_detailed" . }}
  22. {{ else }}
  23. {{ partial "post_li_stream" . }}
  24. {{ end }}
  25. {{ end }}
  26. {{ end }}
  27. {{ $items := where (where .Site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
  28. {{ $pubs_len := len $items }}
  29. {{ if ge $pubs_len 1 }}
  30. <h2>{{ (i18n "publications") }}</h2>
  31. {{ range $items }}
  32. {{ if eq $page.Site.Params.projects.publication_format 1 }}
  33. {{ partial "publication_li_detailed" . }}
  34. {{ else if eq $page.Site.Params.projects.publication_format 2 }}
  35. {{ partial "publication_li_apa" . }}
  36. {{ else if eq $page.Site.Params.projects.publication_format 3 }}
  37. {{ partial "publication_li_mla" . }}
  38. {{ else if eq $page.Site.Params.projects.publication_format 4 }}
  39. {{ partial "publication_li_stream" . }}
  40. {{ else }}
  41. {{ partial "publication_li_simple" . }}
  42. {{ end }}
  43. {{ end }}
  44. {{ end }}
  45. {{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
  46. {{ $talks_len := len $items }}
  47. {{ if ge $talks_len 1 }}
  48. <h2>{{ (i18n "talks") }}</h2>
  49. {{ range sort $items ".Params.time_start" "desc" }}
  50. {{ if eq $page.Site.Params.projects.talk_format 1 }}
  51. {{ partial "talk_li_detailed" . }}
  52. {{ else if eq $page.Site.Params.projects.talk_format 2 }}
  53. {{ partial "talk_li_stream" . }}
  54. {{ else }}
  55. {{ partial "talk_li_simple" . }}
  56. {{ end }}
  57. {{ end }}
  58. {{ end }}
  59. </div>
  60. </article>
  61. {{ if .Site.Params.section_pager }}
  62. <div class="article-container article-widget">
  63. {{ partial "section_pager.html" . }}
  64. </div>
  65. {{ end }}
  66. {{ partial "footer_container.html" . }}
  67. {{ partial "footer.html" . }}