|
|
|
@ -2,40 +2,43 @@
|
|
|
|
|
{{ partial "profile.html" . }}
|
|
|
|
|
|
|
|
|
|
<div id="list-page">
|
|
|
|
|
{{ $pages := where .Site.RegularPages "Params.hidden" "ne" "true" }}
|
|
|
|
|
{{ $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.Format "Jan 2" }}</div>
|
|
|
|
|
<div class="date">{{ $date }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="summary">{{ $summary | plainify | htmlUnescape }}</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ with .Resources.ByType "image" }}
|
|
|
|
|
{{ $image := index . 1 }}
|
|
|
|
|
{{ range . }}
|
|
|
|
|
{{ if eq .Name "images/cover.png" }}
|
|
|
|
|
{{ $image = . }}
|
|
|
|
|
{{ else if eq .Name "images/cover.jpg" }}
|
|
|
|
|
{{ $image = . }}
|
|
|
|
|
{{ else if eq .Name "images/cover.jpeg" }}
|
|
|
|
|
{{ $image = . }}
|
|
|
|
|
</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 }}
|
|
|
|
|
|
|
|
|
|
<div class="cover">
|
|
|
|
|
<img src="{{ $image.RelPermalink }}" alt="{{ $title }}">
|
|
|
|
|
{{ 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 }}
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|