diff options
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..edfc24e --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,33 @@ +{{ partial "header.html" . }} + +<main> + <div class="catalogue"> + {{ range (.Paginate (where .Pages "Type" "post")).Pages }} + <a href="{{ .Permalink }}" class="catalogue-item"> + <div> + <time datetime="{{ .PublishDate }}" class="catalogue-time">{{ .PublishDate.Format "January 2, 2006" }}</time> + <h1 class="catalogue-title">{{ .Title }}</h1> + <div class="catalogue-line"></div> + + <p> + {{ .Summary }} + </p> + + </div> + </a> + {{ end }} + </div> + + <div class="pagination"> + {{ if .Paginator.HasPrev }} + <a href="{{ .Paginator.Prev.URL }}" class="left arrow">←</a> + {{ end }} + {{ if .Paginator.HasNext }} + <a href="{{ .Paginator.Next.URL }}" class="right arrow">→</a> + {{ end }} + + <span>{{ .Paginator.PageNumber }}</span> + </div> +</main> + +{{ partial "footer.html" . }}
\ No newline at end of file |