index for sub pages

This commit is contained in:
lvuch
2018-07-12 15:05:21 -07:00
parent fbc790e1ba
commit 2f666cf1c9
6 changed files with 54 additions and 64 deletions
+10 -58
View File
@@ -18,68 +18,20 @@
{{ with .Params.Title }}
<h1 class="m-t-0">{{ . }}</h1>
<hr/>
{{end}}
{{ with .Params.Description }}
<p>{{ . }}</p>
{{end}}
<hr/>
<div class="main-content">
<!-- this is a test -->
<!-- {{ partial "page-nav.html" . }} -->
<!-- end test -->
{{ .Content }}
</div>
{{ .Content }}
<!-- index of sub pages -->
{{ partial "page-nav.html" . }}
<!-- end index of sub pages -->
{{ range (.Paginator 5).Pages }}
<div class="box m-b-md">
<div class="p-a-sm">
<h3><a href="{{.URL}}">{{.Title}}</a></h3>
{{ if .Params.Image }}
<div class="thumbnail"><img src="{{ .Params.Image }}" alt="{{ .Params.Title }}"></div>
{{end}}
<p>{{ .Summary | safeHTML }}</p>
{{ if .Truncated }}
<div>
<a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
</div>
<div class="bg-default">
<div class="row">
{{ with .Params.Author }}
<div class="p-h-sm p-v-xs"><i class="material-icons">person_outline</i> By: {{ . }}</div>
{{end}}
{{ if eq .Section "events" }}
{{ with .Params.EventDate }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ . }}</div>
{{end}}
{{ else }}
{{ with .Params.Date }}
<div class="p-h-sm p-v-xs"><i class="material-icons">event</i> {{ .Format "January 2, 2006" }}</div>
{{end}}
{{end}}
{{ if eq .Section "blog" }}
<div class="p-h-sm p-v-xs"><i class="material-icons">timer</i> Read Time: {{.ReadingTime}} minutes</div>
{{end}}
{{ with .Params.Location }}
<div class="p-h-sm p-v-xs"><i class="material-icons">location_on</i> {{ . }}</div>
{{end}}
</div>
</div>
</div>
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
<div class="p-v-xs">{{ partial "page-edit.html" . }}</div>
<div class="p-v-xs">{{ partial "page-edit.html" . }}</div>
</article>
<!-- {{ with .TableOfContents }}