🐛 Series does not show any list

This commit is contained in:
Nuno Coração 2024-03-20 21:52:38 +00:00
parent ac6dc9275b
commit 29625b34b6
5 changed files with 14 additions and 34 deletions

View file

@ -75,13 +75,13 @@
<div class="min-w-0 min-h-0 max-w-fit">
{{ partial "series.html" . }}
{{ partial "series/series.html" . }}
<div class="article-content max-w-prose mb-20">
{{ .Content | emojify }}
</div>
{{ partial "series-closed.html" . }}
{{ partial "series/series-closed.html" . }}
{{ partial "sharing-links.html" . }}
{{ partial "related.html" . }}
</div>

View file

@ -1,27 +0,0 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{
if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
{{ $seriesNameURL := strings.Replace $seriesName " " "-" }}
{{ range $post := sort (index .Site.Taxonomies.series $seriesNameURL) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }}
</div>
{{ else }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="{{$post.Permalink}}">
{{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}}
</a>
</div>
{{end}}
{{end}}
</details>
{{end}}

View file

@ -0,0 +1,5 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5">
{{ partial "series/series_base.html" . }}
</details>
{{end}}

View file

@ -0,0 +1,6 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5" {{
if .Params.seriesOpened | default (.Site.Params.article.seriesOpened | default false) }} open {{ end }}>
{{ partial "series/series_base.html" . }}
</details>
{{end}}

View file

@ -1,12 +1,10 @@
{{ if .Params.series }}
<details style="margin-left:0px" class="mt-2 mb-5 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5">
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }}
</summary>
{{ $seriesName := strings.ToLower (index .Params.series 0) }}
{{ $seriesNameURL := strings.Replace $seriesName " " "-" }}
{{ range $post := sort (index .Site.Taxonomies.series $seriesNameURL) "Params.series_order" }}
{{ range $post := sort (index .Site.Taxonomies.series $seriesName) "Params.series_order" }}
{{ if eq $post.Permalink $.Page.Permalink }}
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
@ -21,6 +19,4 @@
</div>
{{end}}
{{end}}
</details>
{{end}}