Skip to content

Commit 426b6f2

Browse files
committed
Improve format of pages in subsection index files
Signed-off-by: Pedro Ielpi <pielpi@opennebula.io>
1 parent f7efe73 commit 426b6f2

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

layouts/partials/section-index.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{{/* Template modified from the original Docsy theme template, to list section ToC in cards */}}
2+
{{/* If section = list child sections & subsections; if subsection = list child pages */}}
13
<div class="section-index">
24
{{ $page := .Page -}}
35
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight -}}
@@ -20,7 +22,7 @@
2022
{{ end -}}
2123
</ul>
2224
{{ else -}}
23-
{{/* Otherwise we show a nice formatted list of subpages with page descriptions */}}
25+
{{/* Otherwise show cards with list of subpages with page descriptions */}}
2426
<hr class="panel-line">
2527
{{ range $pages -}}
2628
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) -}}
@@ -51,17 +53,19 @@
5153
<div class="td-card card border me-4">
5254
<div class="card-header">
5355
In this section:
54-
</div>
56+
</div>
5557
<p></p>
5658
{{ range .Pages -}}
5759
{{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) -}}
5860
<div class="td-content">
59-
<ol>
61+
<inl>
6062
<a href="{{ $manualLink }}"{{ with .Params.manualLinkTitle }} title="{{ . }}"{{ end }}{{ with .Params.manualLinkTarget }} target="{{ . }}"{{ if eq . "_blank" }} rel="noopener"{{ end }}{{ end }}>{{- .Title -}}</a>
61-
</ol>
63+
</inl>
6264
{{ if .Description -}}
6365
<p>{{ .Description | markdownify -}}</p>
6466
{{ end -}}
65-
</div>
66-
{{ end -}}
67+
{{ end -}}
68+
<p></p>
69+
</div>
70+
</div>
6771
{{ end -}}

0 commit comments

Comments
 (0)