mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Add series-summary.html and use .Render in taxonomy
This commit is contained in:
parent
ef8559d923
commit
8f36ba7368
40
layouts/_default/series-summary.html
Normal file
40
layouts/_default/series-summary.html
Normal file
@ -0,0 +1,40 @@
|
||||
<div class="post">
|
||||
<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>
|
||||
|
||||
<div class="post-metadata">
|
||||
{{ partial "translations-meta-item.html" . }}
|
||||
|
||||
{{ if ne .Site.Params.readingtime false }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "clock" }}
|
||||
{{ $readingtime := 0 }}
|
||||
{{ range .Data.Pages }}
|
||||
{{ $readingtime = (add $readingtime .ReadingTime) }}
|
||||
{{ end }}
|
||||
{{ i18n "readingtime" $readingtime }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "viewsource-meta-item.html" . }}
|
||||
</div>
|
||||
|
||||
<div class="post-description">
|
||||
{{ with .Description }}
|
||||
<p>
|
||||
{{ . | markdownify }}
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="series-pages">
|
||||
<ul>
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
<li>{{ .Render "summary" }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
@ -28,45 +28,7 @@
|
||||
<div class="series-taxonomy">
|
||||
<ul>
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<div class="post">
|
||||
<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>
|
||||
<div class="post-metadata">
|
||||
{{ partial "translations-meta-item.html" . }}
|
||||
|
||||
{{ if ne .Site.Params.readingtime false }}
|
||||
<span class="post-meta-item">
|
||||
{{ partial "icon.html" "clock" }}
|
||||
{{ $readingtime := 0 }}
|
||||
{{ range .Data.Pages }}
|
||||
{{ $readingtime = (add $readingtime .ReadingTime) }}
|
||||
{{ end }}
|
||||
{{ i18n "readingtime" $readingtime }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "viewsource-meta-item.html" . }}
|
||||
</div>
|
||||
|
||||
{{ with .Description }}
|
||||
<div class="post-description">
|
||||
<p>{{ . | markdownify }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div class="series-pages">
|
||||
<ul>
|
||||
{{ range .Data.Pages.Reverse }}
|
||||
<li>{{ .Render "summary" }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>{{ .Render "series-summary" }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user