single.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. {{ partial "page_author.html" . }}
  14. {{ $page := . }}
  15. {{ $project := .Slug }}
  16. {{ if not $project }}{{/* If user did not explicitly set `slug` in front matter. */}}
  17. {{ $project = .File.TranslationBaseName }}
  18. {{ end }}
  19. {{ if eq $project "index" }}{{/* Check if using dir-based page bundles. */}}
  20. {{ $project = delimit (last 1 (split (substr .Dir 0 -1) "/")) "" }}
  21. {{ end }}
  22. {{ $project_path := .RelPermalink }}
  23. {{ if (.Site.Params.projects.list_children | default true) }}
  24. {{ $items := where (where .Site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
  25. {{ $items := $items | union (where (where .Site.RegularPages "Type" "publication") ".Params.url_project" $project_path) }}
  26. {{ $pubs_len := len $items }}
  27. {{ if ge $pubs_len 1 }}
  28. <h2>{{ (i18n "publications") }}</h2>
  29. {{ range $items }}
  30. {{ if eq $page.Site.Params.projects.publication_format 1 }}
  31. {{ partial "publication_li_detailed" . }}
  32. {{ else if eq $page.Site.Params.projects.publication_format 2 }}
  33. {{ partial "publication_li_apa" . }}
  34. {{ else if eq $page.Site.Params.projects.publication_format 3 }}
  35. {{ partial "publication_li_mla" . }}
  36. {{ else if eq $page.Site.Params.projects.publication_format 4 }}
  37. {{ partial "publication_li_stream" . }}
  38. {{ else }}
  39. {{ partial "publication_li_simple" . }}
  40. {{ end }}
  41. {{ end }}
  42. {{ end }}
  43. {{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
  44. {{ $items := $items | union (where (where .Site.RegularPages "Type" "talk") ".Params.url_project" $project_path) }}
  45. {{ $talks_len := len $items }}
  46. {{ if ge $talks_len 1 }}
  47. <h2>{{ (i18n "talks") }}</h2>
  48. {{ range sort $items ".Params.time_start" "desc" }}
  49. {{ if eq $page.Site.Params.projects.talk_format 1 }}
  50. {{ partial "talk_li_detailed" . }}
  51. {{ else if eq $page.Site.Params.projects.talk_format 2 }}
  52. {{ partial "talk_li_stream" . }}
  53. {{ else }}
  54. {{ partial "talk_li_simple" . }}
  55. {{ end }}
  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" . }}