mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
parent
161c68d16c
commit
55bbfa90e4
@ -78,6 +78,12 @@
|
||||
background-color: var(--background-2);
|
||||
}
|
||||
|
||||
.post-series-position {
|
||||
position: relative;
|
||||
float: right;
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
@ -28,8 +28,13 @@
|
||||
|
||||
<div class="series-pages">
|
||||
<ul>
|
||||
{{ $i := 0 }}
|
||||
{{ $total := len .Data.Pages }}
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
<li>{{ .Render "summary/post" }}</li>
|
||||
{{ $i = add 1 $i }}
|
||||
{{ .Scratch.Set "series_position" $i }}
|
||||
{{ .Scratch.Set "series_total" $total }}
|
||||
<li>{{ .Render "summary/series_post" }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
29
layouts/_default/summary/series_post.html
Normal file
29
layouts/_default/summary/series_post.html
Normal file
@ -0,0 +1,29 @@
|
||||
<div class="post">
|
||||
<div class="post-series-position">
|
||||
{{ if .Scratch.Get "series_position" }}
|
||||
({{ .Scratch.Get "series_position" }}/{{ .Scratch.Get "series_total" }})
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<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/short.html" . }}
|
||||
|
||||
{{ with .Resources.GetMatch "feature" }}
|
||||
<div class="post-media">
|
||||
{{ partial "figure.html" (dict "src" . "border" true) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="post-description">
|
||||
{{ partial "description-or-summary.html" . }}
|
||||
</div>
|
||||
|
||||
<div class="readmore">
|
||||
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
||||
</div>
|
||||
</div>
|
@ -9,7 +9,12 @@
|
||||
|
||||
<div class="page-list">
|
||||
<ul>
|
||||
{{ $i := 0 }}
|
||||
{{ $total := len .Pages }}
|
||||
{{ range .Paginator.Pages.Reverse }}
|
||||
{{ $i = add 1 $i }}
|
||||
{{ .Scratch.Set "series_position" $i }}
|
||||
{{ .Scratch.Set "series_total" $total }}
|
||||
<li>{{ .Render "summary/post" }}</li>
|
||||
{{ else }}
|
||||
<div>
|
||||
|
Loading…
Reference in New Issue
Block a user