Move the rest of the _default templates from the theme
This commit is contained in:
parent
512c8ec2da
commit
8c4dd830b9
3 changed files with 123 additions and 0 deletions
34
layouts/_default/list.html
Normal file
34
layouts/_default/list.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<!-- Main Title -->
|
||||
{{ if .Title }}
|
||||
<h1 class="main-title">{{ .Title }}</h1>
|
||||
{{ end }}
|
||||
|
||||
<!-- $pages -->
|
||||
{{ $pages := union .RegularPages .Sections }}
|
||||
<!---->{{ if .IsHome }} {{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Articles -->
|
||||
{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages }}
|
||||
<article class="post-entry">
|
||||
<h2>{{ .Title }}</h2>
|
||||
<time>{{ .Date | time.Format ":date_medium" }}</time>
|
||||
<a href="{{ .Permalink }}"></a>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
<!-- Main Nav -->
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<nav class="main-nav">
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
|
||||
{{ end }}<!---->
|
||||
{{ if $paginator.HasNext }}
|
||||
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} →</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}<!---->
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue