summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/_default/baseof.html3
-rw-r--r--layouts/_default/list.html11
-rw-r--r--static/style.css9
3 files changed, 17 insertions, 6 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index c9da4c0..c91cd5a 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -65,6 +65,9 @@
{{ end }}
{{ block "main" . }}
{{ end }}
+
+ {{ block "pagination" . }}
+ {{ end }}
{{ block "FOOTER" . }}
</main>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index b709bd7..8ad2c03 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,17 +1,16 @@
{{ define "main" }}
-{{- range where .Site.RegularPages "Params.category" "!=" "pages"}}
+{{ $paginator := (.Paginator.Pages) }}.
+{{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }}
+{{ range $paginator.Pages }}
<article class="list">
<a href="{{ .Page.Permalink }}">
<h2>{{ .Page.Title }}</h2>
</a>
({{ .PublishDate.Format "January 2nd, 2006" }})
<div>
- {{ .Page.Summary }}
+ {{ .Page.Content }}
</div>
- {{- if .Page.Truncated }}
- <a href="{{ .Page.Permalink }}">More</a>
- </div>
- {{ end }}
</article>
{{ end }}
+ {{ template "_internal/pagination.html" . }}
{{ end }}
diff --git a/static/style.css b/static/style.css
index b239d08..d32990a 100644
--- a/static/style.css
+++ b/static/style.css
@@ -120,3 +120,12 @@
.next-link {
float: right;
}
+ code {
+ overflow-x: scroll;
+ }
+ .pagination {
+ text-align: center
+ }
+ .pagination li {
+ display: inline-block
+ }