mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-20 02:16:40 +00:00
projects: Fix list of talks (#548)
- Sort list of talks by `time_start` rather than `date` (consistent with home page widget) - Fix bug that made publications duplicate in talks list when there was no talk in a project
This commit is contained in:
1 parent
c42f4a8cf2
commit
2bc968b9c5
1 file changed
+2
-2
@@ -49,11 +49,11 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
|
{{ $items := where (where .Site.RegularPages "Type" "talk") ".Params.projects" "intersect" (slice $project) }}
|
||||||
{{ $items := $items | union (where (where .Site.RegularPages "Type" "publication") ".Params.url_project" $project_path) }}
|
{{ $items := $items | union (where (where .Site.RegularPages "Type" "talk") ".Params.url_project" $project_path) }}
|
||||||
{{ $talks_len := len $items }}
|
{{ $talks_len := len $items }}
|
||||||
{{ if ge $talks_len 1 }}
|
{{ if ge $talks_len 1 }}
|
||||||
<h2>{{ (i18n "talks") }}</h2>
|
<h2>{{ (i18n "talks") }}</h2>
|
||||||
{{ range $items }}
|
{{ range sort $items ".Params.time_start" "desc" }}
|
||||||
{{ partial "talk_li_simple" . }}
|
{{ partial "talk_li_simple" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in new issue
Block a user