2019-04-09 20:59:17 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
{{ partial "header.html" . }}
|
|
|
|
<body>
|
|
|
|
<div class="container wrapper">
|
|
|
|
{{ partial "head.html" . }}
|
|
|
|
|
|
|
|
<div class="recent-posts section">
|
|
|
|
<h2 class="section-header">
|
|
|
|
Recent posts
|
|
|
|
</h2>
|
|
|
|
<div class="posts">
|
2019-04-19 18:52:50 +00:00
|
|
|
{{- $.Scratch.Set "counter" 0 -}}
|
|
|
|
{{- range .Data.Pages -}}
|
|
|
|
{{- if (in (.Site.Params.excludedTypes | default (slice "page")) .Type) -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- if lt ($.Scratch.Get "counter") (.Site.Params.RecentPostsCount | default 10) -}}
|
2019-04-09 20:59:17 +00:00
|
|
|
<div class="post">
|
|
|
|
<div class="meta">{{ dateFormat "Jan 2, 2006" .Date }}</div>
|
|
|
|
<a class="title" href="{{ .RelPermalink }}">{{.Title}}</a> —
|
|
|
|
<span class="description">
|
|
|
|
{{ if isset .Params "description" }}
|
|
|
|
{{ .Description }}
|
|
|
|
{{ else if gt (len .RawContent) 120 }}
|
|
|
|
{{ slicestr .RawContent 0 120 }}...
|
|
|
|
{{ else }}
|
|
|
|
{{ .RawContent }}
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
|
|
|
</div>
|
2019-04-19 18:52:50 +00:00
|
|
|
{{- $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
2019-04-09 20:59:17 +00:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
<a href="/posts">All articles →</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ partial "footer.html" . }}
|
2019-04-11 12:39:27 +00:00
|
|
|
{{ template "_internal/google_analytics_async.html" . }}
|
2019-04-19 18:52:50 +00:00
|
|
|
{{- with .Site.Params.Social -}}
|
|
|
|
<script>feather.replace()</script>
|
|
|
|
{{- end -}}
|
2019-04-09 20:59:17 +00:00
|
|
|
</body>
|
|
|
|
</html>
|