aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/archives/single.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/archives/single.html')
-rw-r--r--layouts/archives/single.html92
1 files changed, 35 insertions, 57 deletions
diff --git a/layouts/archives/single.html b/layouts/archives/single.html
index dc089ff..83436ac 100644
--- a/layouts/archives/single.html
+++ b/layouts/archives/single.html
@@ -1,66 +1,44 @@
{{ define "main" }}
<header>
-<a href="{{ "" | relURL }}" class="title">
- <p class="site-title">{{ .Site.Title }}</p>
-</a>
-<nav>{{- partial "nav.html" . -}}</nav>
+ <a href={{ "" | relURL }} class=title><p class=site-title>{{ .Site.Title }}</p></a>
+ <nav>{{ partial "nav.html" . }}</nav>
</header>
+<main>
+ {{ if .Data.Singular }}
+ <h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
+ <small><a href={{ "blog" | relURL }}>Remove filter</a></small>
+ {{ end }}
-<content>
- {{ if .Data.Singular }}
- <h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
- <small>
- <a href="{{ "blog" | relURL }}">Remove filter</a>
- </small>
- {{ end }}
-
- {{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }}
- {{ $excludePosts := where $allPosts "Params.categories" "intersect" (slice "1") }}
- {{ $postPages := ($allPosts | complement $excludePosts) }}
-
- {{ if .Site.Params.showPostCount }}
- <p id="post-count">There {{ if le (len $postPages) 1 }} is {{ len $postPages }} piece. {{ else }} are {{ len $postPages }} pieces. {{ end }}</p>
- {{ end }}
+ {{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }}
+ {{ $excludePosts := where $allPosts "Params.categories" "intersect" (slice "1") }}
+ {{ $postPages := ($allPosts | complement $excludePosts) }}
- <ul class="blog-posts">
- {{ $currentYear := 0 }}
- {{ range $postPages }}
- {{ if .Site.Params.groupByYear }}
- {{ $year := .Date.Year }}
- {{ if ne $year $currentYear }}
- <h3>{{ $year }}</h3>
- {{ $currentYear = $year }}
+ <ul class=blog-posts>
+ {{ $currentYear := 0 }}
+ {{ range $postPages }}
+ {{ $year := .Date.Year }}
+ {{ if ne $year $currentYear }}
+ <h3>{{ $year }}</h3>
+ {{ $currentYear = $year }}
+ {{ end }}
+ <li>
+ <time datetime={{ .Date.Format "2006-01-02" }} pubdate>{{ .Date.Format "2006-01-02" }}</time>
+ <a href={{ .Permalink }}>{{ .Title }}</a>
+ </li>
+ {{ else }}
+ <li>No posts yet</li>
{{ end }}
- {{ end }}
- <li>
- <span class="{{ if .Site.Params.groupByYear }} grouped {{ else }} ungrouped {{ end }}">
- <i>
- <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
- {{ if .Site.Params.groupByYear }}
- {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
- {{ else }}
- {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
- {{ end }}
- </time>
- </i>
- </span>
- <a style="border: none;" href="{{ .Permalink }}">{{ .Title }}</a>
- </li>
- {{ else }}
- <li>No posts yet</li>
- {{ end }}
- </ul>
+ </ul>
- {{ if .Data.Singular }}
- {{ else }}
- <small>
- <div>
- {{ range .Site.Taxonomies.tags }}
- <a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
- {{ end }}
- </div>
- </small>
- {{ end }}
-</content>
+ {{ if not .Data.Singular }}
+ <footer>
+ <nav class=tags>
+ {{ range .Site.Taxonomies.tags }}
+ <a href={{ .Page.Permalink }}>#{{ .Page.Title }}</a>
+ {{ end }}
+ </nav>
+ </footer>
+ {{ end }}
+</main>
{{ end }}