You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hugo-theme-mini/layouts/index.html

45 lines
1.4 KiB
HTML

{{ define "main" }}
{{ partial "profile.html" . }}
<div id="list-page">
{{ $pages := .Site.RegularPages }}
{{ $paginator := .Paginate ($pages) }}
{{ range $paginator.Pages }}
{{ $title := .Title }}
{{ $summary := .Summary }}
{{ $date := dateFormat "Jan 2, 2006" .Date }}
<section class="item">
<div>
<h1 class="title"><a href='{{ .RelPermalink }}'>{{ $title }}</a></h1>
<div class="date">{{ $date }}</div>
</div>
<div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
</section>
{{ end }}
{{ if or ($paginator.HasPrev) ($paginator.HasNext) }}
<div class="pagination">
{{ if $paginator.HasPrev }}
<span class="prev">
<a href="{{.Paginator.Prev.URL}}">
<span class="arrow"></span> {{ with .Site.Params.newerPosts }}{{ . }}{{ else }}Newer Posts{{ end }}
</a>
</span>
{{ end }}
{{ if $paginator.HasNext }}
<span class="next">
<a href="{{.Paginator.Next.URL}}">
{{ with .Site.Params.olderPosts }}{{ . }}{{ else }}Older Posts{{ end }} <span class="arrow"></span>
</a>
</span>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}