Skip to content

Commit

Permalink
revert to original single.html
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGriffiths committed Apr 8, 2019
1 parent 124ce7e commit 7aa27a5
Showing 1 changed file with 39 additions and 53 deletions.
92 changes: 39 additions & 53 deletions layouts/project/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,49 @@
{{ $page := . }}
{{ $project := .File.ContentBaseName }}

{{ if (.Site.Params.projects.list_children | default true) }}

{{ $items := where (where .Site.RegularPages "Type" "post") ".Params.projects" "intersect" (slice $project) }}
{{ $count := len $items }}
{{ if ge $count 1 }}
<h2>{{ (i18n "posts") }}</h2>
{{ range $items }}
{{ if eq $page.Site.Params.projects.post_format 0 }}
{{ partial "post_li_simple" . }}
{{ else if eq $page.Site.Params.projects.post_format 1 }}
{{ partial "post_li_detailed" . }}
{{ else }}
{{ partial "post_li_stream" . }}
{{ end }}
{{ $items := where (where .Site.RegularPages "Type" "post") ".Params.projects" "intersect" (slice $project) }}
{{ $count := len $items }}
{{ if ge $count 1 }}
<h2>{{ (i18n "posts") }}</h2>
{{ range $items }}
{{ if eq $page.Site.Params.projects.post_view 1 }}
{{ partial "li_list" . }}
{{ else if eq $page.Site.Params.projects.post_view 3 }}
{{ partial "li_card" . }}
{{ else }}
{{ partial "li_compact" . }}
{{ end }}
{{ end }}
{{ end }}

{{ $items := where (where .Site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
{{ $pubs_len := len $items }}
{{ if ge $pubs_len 1 }}
<h2>{{ (i18n "publications") }}</h2>
{{ range $items }}
{{ if eq $page.Site.Params.projects.publication_format 1 }}
{{ partial "publication_li_detailed" . }}
{{ else if eq $page.Site.Params.projects.publication_format 2 }}
{{ partial "publication_li_apa" . }}
{{ else if eq $page.Site.Params.projects.publication_format 3 }}
{{ partial "publication_li_mla" . }}
{{ else if eq $page.Site.Params.projects.publication_format 4 }}
{{ partial "publication_li_stream" . }}
{{ else }}
{{ partial "publication_li_simple" . }}
{{ end }}
{{ $items := where (where .Site.RegularPages "Type" "publication") ".Params.projects" "intersect" (slice $project) }}
{{ $pubs_len := len $items }}
{{ if ge $pubs_len 1 }}
<h2>{{ (i18n "publications") }}</h2>
{{ range $items }}
{{ if eq $page.Site.Params.projects.publication_view 1 }}
{{ partial "li_list" . }}
{{ else if eq $page.Site.Params.projects.publication_view 3 }}
{{ partial "li_card" . }}
{{ else if eq $page.Site.Params.projects.publication_view 4 }}
{{ partial "li_citation" . }}
{{ else }}
{{ partial "li_compact" . }}
{{ end }}
{{ end }}
{{ end }}

{{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
{{ $talks_len := len $items }}
{{ if ge $talks_len 1 }}
<h2>{{ (i18n "talks") }}</h2>
{{ range sort $items ".Params.time_start" "desc" }}
{{ if eq $page.Site.Params.projects.talk_format 1 }}
{{ partial "talk_li_detailed" . }}
{{ else if eq $page.Site.Params.projects.talk_format 2 }}
{{ partial "talk_li_stream" . }}
{{ else }}
{{ partial "talk_li_simple" . }}
{{ end }}
{{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
{{ $talks_len := len $items }}
{{ if ge $talks_len 1 }}
<h2>{{ (i18n "talks") }}</h2>
{{ range $items }}
{{ if eq $page.Site.Params.projects.talk_view 1 }}
{{ partial "li_list" . }}
{{ else if eq $page.Site.Params.projects.talk_view 3 }}
{{ partial "li_card" . }}
{{ else }}
{{ partial "li_compact" . }}
{{ end }}
{{ end }}
{{ end }}
Expand All @@ -78,14 +73,5 @@ <h2>{{ (i18n "talks") }}</h2>
</div>
{{ end }}








{{ if eq .Params.showFooter true }}
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}
{{ end }}
{{ partial "footer_container.html" . }}
{{ partial "footer.html" . }}

0 comments on commit 7aa27a5

Please sign in to comment.