mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 09:47:29 -05:00
Organize summary template files
Also a small CSS patch to fix margin around post-title
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
{{ with .Pages }}
|
||||
{{ range . }}
|
||||
<article class="series-taxonomy">
|
||||
{{ .Render "summary/series" }}
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
|
24
layouts/series/summary.html
Normal file
24
layouts/series/summary.html
Normal file
@ -0,0 +1,24 @@
|
||||
<h2 class="post-title">
|
||||
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||
{{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}
|
||||
</h2>
|
||||
|
||||
{{ partial "post-metadata/series.html" . }}
|
||||
|
||||
<div class="post-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
|
||||
<div class="series-page-list">
|
||||
{{ $i := 0 }}
|
||||
{{ $total := len .Data.Pages }}
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
{{ $i = add 1 $i }}
|
||||
{{ .Scratch.Set "series_position" $i }}
|
||||
{{ .Scratch.Set "series_total" $total }}
|
||||
<article class="post">
|
||||
{{ .Render "summary" }}
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
Reference in New Issue
Block a user