Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/progrhyme/hugo-theme-bootie-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkey-amb <yasutake.kiyoshi@gmail.com>2016-05-04 19:34:05 +0300
committerkey-amb <yasutake.kiyoshi@gmail.com>2016-05-04 19:34:05 +0300
commite73366a54a9ad9f21f0a527584bc5820e8b4e5da (patch)
tree7df2fd3ca007f00c7d7012b054747468bdef5633 /layouts
parenteeea8eee3669e37d722b849ade16b1b23c1876a0 (diff)
Add document index template
Diffstat (limited to 'layouts')
-rw-r--r--layouts/section/index.html43
1 files changed, 43 insertions, 0 deletions
diff --git a/layouts/section/index.html b/layouts/section/index.html
new file mode 100644
index 0000000..ee44931
--- /dev/null
+++ b/layouts/section/index.html
@@ -0,0 +1,43 @@
+{{ $baseUrl := .Site.BaseURL }}
+{{ partial "header.html" . }}
+
+<div class="row">
+ <div class="col-sm-8 doc-main">
+ <main role="main">
+ <div class="doc-list-header">
+ <h3>Index</h3>
+ </div>
+
+ <div class="doc-list-entry">
+ <ul>
+ {{ range .Site.Sections }}
+ {{ range first 1 .Pages }}
+ {{ if and (ne .Section "") (ne .Section "index") }}
+ <li><a class="doc-entry" href="{{ $baseUrl }}/{{ .Section }}">{{ .Section | title }}/</a><ul>
+ {{ end }}
+ {{ end }}
+ {{ range .Pages }}
+ {{ if eq (substr .Title 0 1) "_" }}
+ {{ else }}
+ <li><a class="doc-entry" href="{{ .RelPermalink }}">
+ <span class="doc-entry-title">{{ .Title }}</span>
+ <span class="doc-entry-meta in-list">
+ (<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time>)
+ </span>
+ </a></li>
+ {{ end }}
+ {{ end }}
+ {{ range first 1 .Pages }}
+ {{ if and (ne .Section "") (ne .Section "index") }}</ul></li>{{ end }}
+ {{ end }}
+ {{ end }}
+ </ul>
+ </div>
+
+ </main>
+ </div> <!-- /.doc-main -->
+
+ {{ partial "sidebar-list.html" . }}
+</div> <!-- /.row -->
+
+{{ partial "footer.html" . }} \ No newline at end of file