aboutsummaryrefslogtreecommitdiff
path: root/layouts/docs/list.html
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-20 22:35:52 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-20 22:35:52 +0530
commitd26ecb989f5e5b9e06b34c106a3d391fd2910524 (patch)
tree5b2f2391eb682881c90930c040f260854b3f1936 /layouts/docs/list.html
First commit
Diffstat (limited to 'layouts/docs/list.html')
-rw-r--r--layouts/docs/list.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/layouts/docs/list.html b/layouts/docs/list.html
new file mode 100644
index 0000000..f8d665a
--- /dev/null
+++ b/layouts/docs/list.html
@@ -0,0 +1,34 @@
+{{ define "main" }}
+ <div>
+ <h1 class="title" style="{{ if eq (len .Pages) 0 }}text-align: center;{{ end }}">
+ {{ if .Params.heading }}{{ .Params.heading }}{{ else }}{{ .Title }}{{ end }}
+ </h1>
+ <p>{{ .Description }}</p>
+
+ {{ .Content }}
+
+ <ul class="range">
+ {{ if ne (len .Sections) 0}}
+ {{ range .Sections }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }}
+ <ul class="range">
+ <!-- Show pages under this section (but not subsections) -->
+ {{ range (union .Sections .Pages).ByWeight }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }}
+ </li>
+ {{ end }}
+ </ul>
+ </li>
+ {{ end }}
+ {{ else }}
+ {{ range .RegularPages.ByWeight }}
+ <li>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Description }}
+ </li>
+ {{ end }}
+ {{ end }}
+ </ul>
+ </div>
+{{ end }}