Commit 433a5096 authored by YASUTAKE Kiyoshi's avatar YASUTAKE Kiyoshi
Browse files

Merge pull request #7 from key-amb/develop

Add new template - Index page of documents
parents 5218061a e73366a5
......@@ -4,15 +4,19 @@
<div class="col-sm-8 doc-main">
<main role="main">
<div class="doc-list-header">
<h1>{{ .Title }}</h1>
<h3>Pages in {{ .Title }}</h3>
</div>
<div class="doc-list-entry">
<ul>
{{ range .Data.Pages }}
<a class="doc-entry" href="{{ .RelPermalink }}">
<h3 class="doc-entry-title">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</h3>
<p class="doc-entry-meta"><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></p>
</a>
<li><a class="doc-entry" href="{{ .RelPermalink }}">
<span class="doc-entry-title">{{ .Title }}{{ if .Draft }} #Draft{{ end }}</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 }}
</ul>
</div>
</main>
</div> <!-- /.doc-main -->
......
{{ $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
......@@ -49,6 +49,9 @@ h2, .h2 {
/* List items */
.doc-list-header {
padding-bottom: 0px;
margin-bottom: 15px;
border-bottom: 1px solid #eee;
}
.doc-entry {
color: #666;
......@@ -61,6 +64,9 @@ h2, .h2 {
text-align: right;
color: #999;
}
.doc-entry-meta.in-list {
font-size: 80%;
}
/* Sidebar modules for boxing content */
.sidebar-module {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment