mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-24 03:21:54 +02:00
Merge pull request #172 from nunocoracao/170-series-improvements
series improvements
This commit is contained in:
commit
02979c1fa5
3 changed files with 27 additions and 3 deletions
|
@ -77,5 +77,3 @@ The new image resizing features also provide full control over `alt` and `title`
|
||||||
## A whole lot more
|
## A whole lot more
|
||||||
|
|
||||||
There's countless other features to explore. From being able to display taxonomies on articles and list pages, to using the new `headline` author parameter to customise your homepage. There's also improved JSON-LD strucured data which further optimises SEO performance.
|
There's countless other features to explore. From being able to display taxonomies on articles and list pages, to using the new `headline` author parameter to customise your homepage. There's also improved JSON-LD strucured data which further optimises SEO performance.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
<div class="min-w-0 min-h-0 max-w-prose">
|
<div class="min-w-0 min-h-0 max-w-prose">
|
||||||
{{ partial "series.html" . }}
|
{{ partial "series.html" . }}
|
||||||
{{ .Content | emojify }}
|
{{ .Content | emojify }}
|
||||||
|
</br></br></br>
|
||||||
|
{{ partial "series-closed.html" . }}
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|
24
layouts/partials/series-closed.html
Normal file
24
layouts/partials/series-closed.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{{ 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 }} - This article is part of a series.
|
||||||
|
</summary>
|
||||||
|
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "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">
|
||||||
|
Part {{ $post.Params.series_order }}: 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}}">
|
||||||
|
Part {{ $post.Params.series_order }}: {{ $post.Params.title}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
</details>
|
||||||
|
{{end}}
|
Loading…
Add table
Reference in a new issue