Reimplement display of series
This commit is contained in:
parent
e056229575
commit
c3621e7017
|
@ -188,3 +188,6 @@ h6, .content h6
|
|||
|
||||
ul
|
||||
@extend .menu-list
|
||||
|
||||
#current
|
||||
font-weight: bold
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
<time>{{ .Date.Format .Site.Params.DateFormat }}</time>
|
||||
<div class="page-date">
|
||||
<strong>Date:</strong>
|
||||
<time>{{ .Date.Format .Site.Params.DateFormat }}</time>
|
||||
</div>
|
||||
{{ partial "series.html" .Params.series }}
|
||||
{{ partial "tags.html" .Params.tags }}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
{{ partial "status" . }}
|
||||
</div>
|
||||
<div class="column is-8">
|
||||
{{ partial "series-items" . }}
|
||||
{{ partial "toc" . }}
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{{ $page := . }}
|
||||
{{ with .Params.series }}
|
||||
{{ $series := (site.GetPage "/series").GetPage . }}
|
||||
<div class="card mb-5">
|
||||
<header class="card-header has-background-primary has-text-white">
|
||||
<p class="card-header-title has-text-white">
|
||||
Series
|
||||
</p>
|
||||
</header>
|
||||
<div class="card-content content is-size-7">
|
||||
{{ with $series.Params.on }}
|
||||
<p>This post is part of <a href="{{ $series.RelPermalink }}">a series on {{.}}</a>.</p>
|
||||
{{ else }}
|
||||
<p>This post is part of the series <a href="{{ $series.RelPermalink }}" class="has-text-white">{{ $series.Title }}</a></p>
|
||||
{{ end }}
|
||||
<ul>
|
||||
{{ range $series.Pages }}
|
||||
<li>
|
||||
{{ if ne . $page }}<a href="{{ .RelPermalink }}">{{ else }}<span id="current">> {{ end }}
|
||||
{{ .Title }}
|
||||
{{ if ne . $page }}</a>{{ else }} <</span>{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -0,0 +1,7 @@
|
|||
{{ with . }}
|
||||
{{ $series := (site.GetPage "/series").GetPage . }}
|
||||
<div>
|
||||
<strong>Series:</strong>
|
||||
<a href="{{ $series.RelPermalink }}">{{ $series.Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,10 +1,4 @@
|
|||
<li>
|
||||
<a href="{{ .RelPermalink }}">
|
||||
{{- with index .Site.Data.series .Data.Term }}
|
||||
{{ .title }}
|
||||
{{ else }}
|
||||
{{ .Title }}
|
||||
{{ end -}}
|
||||
({{ .Data.series | len }} posts)</a>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }} ({{ .Data.series | len }} posts)</a>
|
||||
{{- with .Params.summary }}: {{.}}{{ end }}
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue