single.html 2.9 KB

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