diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 026954c7..da33f642 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -75,13 +75,13 @@
- {{ partial "series.html" . }} + {{ partial "series/series.html" . }}
{{ .Content | emojify }}
- {{ partial "series-closed.html" . }} + {{ partial "series/series-closed.html" . }} {{ partial "sharing-links.html" . }} {{ partial "related.html" . }}
diff --git a/layouts/partials/series.html b/layouts/partials/series.html deleted file mode 100644 index f42b93ed..00000000 --- a/layouts/partials/series.html +++ /dev/null @@ -1,27 +0,0 @@ -{{ if .Params.series }} -
- - {{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }} - - {{ $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 }} -
- {{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ i18n "article.this_article" }} -
- {{ else }} -
- - {{ i18n "article.part" }} {{ $post.Params.series_order }}: {{ $post.Params.title}} - -
- {{end}} - {{end}} - -
-{{end}} diff --git a/layouts/partials/series/series-closed.html b/layouts/partials/series/series-closed.html new file mode 100644 index 00000000..ecab0ccb --- /dev/null +++ b/layouts/partials/series/series-closed.html @@ -0,0 +1,5 @@ +{{ if .Params.series }} +
+ {{ partial "series/series_base.html" . }} +
+{{end}} \ No newline at end of file diff --git a/layouts/partials/series/series.html b/layouts/partials/series/series.html new file mode 100644 index 00000000..8d7f7044 --- /dev/null +++ b/layouts/partials/series/series.html @@ -0,0 +1,6 @@ +{{ if .Params.series }} +
+ {{ partial "series/series_base.html" . }} +
+{{end}} diff --git a/layouts/partials/series-closed.html b/layouts/partials/series/series_base.html similarity index 82% rename from layouts/partials/series-closed.html rename to layouts/partials/series/series_base.html index d96f55b2..91a3d8ce 100644 --- a/layouts/partials/series-closed.html +++ b/layouts/partials/series/series_base.html @@ -1,12 +1,10 @@ {{ if .Params.series }} -
{{ index .Params.series 0 }} - {{ i18n "article.part_of_series" }} {{ $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 }}
@@ -21,6 +19,4 @@
{{end}} {{end}} - -
{{end}}