mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -06:00
Add a .Render view for subsection summary too
This commit is contained in:
parent
f77c61b561
commit
e1e211a42a
@ -14,20 +14,7 @@
|
|||||||
{{ with .Sections }}
|
{{ with .Sections }}
|
||||||
<div class="sections">
|
<div class="sections">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
|
{{ .Render "summary/section" }}
|
||||||
<a class="section-anchor" href="{{ .Permalink }}">
|
|
||||||
<div class="section">
|
|
||||||
<h2 class="section-title">
|
|
||||||
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
|
||||||
{{ .Title | markdownify }}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<div class="section-description">
|
|
||||||
{{ partial "description-or-summary.html" . }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -45,10 +32,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ if gt .Paginator.TotalPages 1 }}
|
{{ partial "pagination.html" . }}
|
||||||
<div class="pagination">
|
|
||||||
{{ template "_internal/pagination.html" . }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
12
layouts/_default/summary/section.html
Normal file
12
layouts/_default/summary/section.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<a class="section-anchor" href="{{ .Permalink }}">
|
||||||
|
<div class="section">
|
||||||
|
<h2 class="section-title">
|
||||||
|
{{ with .Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
||||||
|
{{ .Title | markdownify }}
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="section-description">
|
||||||
|
{{ partial "description-or-summary.html" . }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
Loading…
Reference in New Issue
Block a user