diff options
| author | Ryan Schanzenbacher <ryan@rschanz.org> | 2021-12-26 00:30:09 -0500 |
|---|---|---|
| committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2021-12-26 00:30:09 -0500 |
| commit | 98a21b966410c127e74b16e7a2817882ee16560f (patch) | |
| tree | ee646c86e3d3f0fa1cd952294d49feeeb700d60f /themes/hugo-coder/layouts/partials/posts/series.html | |
| parent | e6eec31b71ab728f6610f4e764b2e206fb95f940 (diff) | |
convert theme from submodule to regular files
Diffstat (limited to 'themes/hugo-coder/layouts/partials/posts/series.html')
| m--------- | themes/hugo-coder | 0 | ||||
| -rw-r--r-- | themes/hugo-coder/layouts/partials/posts/series.html | 29 |
2 files changed, 29 insertions, 0 deletions
diff --git a/themes/hugo-coder b/themes/hugo-coder deleted file mode 160000 | |||
| Subproject 55b2a150f990bc56364dba347bc9acc6aab07be | |||
diff --git a/themes/hugo-coder/layouts/partials/posts/series.html b/themes/hugo-coder/layouts/partials/posts/series.html new file mode 100644 index 0000000..d08a83d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/series.html | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | {{ $currentPageUrl := .RelPermalink }} | ||
| 2 | {{ if .Params.series }} | ||
| 3 | <section class="see-also"> | ||
| 4 | {{ range .Params.series }} | ||
| 5 | {{ $name := . | urlize }} | ||
| 6 | {{ $series := index $.Site.Taxonomies.series $name }} | ||
| 7 | {{ if gt (len $series.Pages) 1 }} | ||
| 8 | <h3 id="{{ i18n "see_also" | default "See also in" | anchorize }}-{{ anchorize . | safeURL }}"> | ||
| 9 | {{ i18n "see_also" | default "See also in" }} {{ . }} | ||
| 10 | <a class="heading-link" href="#{{ i18n "see_also" | default "See also in" | anchorize }}-{{ anchorize . | safeURL }}"> | ||
| 11 | <i class="fa fa-link" aria-hidden="true"></i> | ||
| 12 | </a> | ||
| 13 | </h3> | ||
| 14 | <nav> | ||
| 15 | <ul> | ||
| 16 | {{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }} | ||
| 17 | {{ range first (add $maxItems 1) $series.Pages }} | ||
| 18 | {{ if ne .RelPermalink $currentPageUrl }} | ||
| 19 | <li> | ||
| 20 | <a href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a> | ||
| 21 | </li> | ||
| 22 | {{ end }} | ||
| 23 | {{ end }} | ||
| 24 | </ul> | ||
| 25 | </nav> | ||
| 26 | {{ end }} | ||
| 27 | {{ end }} | ||
| 28 | </section> | ||
| 29 | {{ end }} | ||
