diff options
author | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-07-10 01:41:34 +0800 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2018-07-10 01:41:34 +0800 |
commit | 5e356c5f635d45f0241854d9f43f38b2f0bd44f9 (patch) | |
tree | 52d12fa3e71c1f843c385271c2f22b8842ddc0ba /layouts/_default/section.html | |
parent | d3a1ab071c983586b474c5e5dc0fa6afb0babce8 (diff) |
style(*): google js style & trim whitespace
Diffstat (limited to 'layouts/_default/section.html')
-rw-r--r-- | layouts/_default/section.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html index fbe80f1..2b159e4 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,6 +1,6 @@ -{{ define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end }} +{{- define "title" }}{{ T "archive" }} - {{ .Site.Title }}{{ end -}} -{{ define "content"}} +{{- define "content" }} {{- $paginator := .Paginate .Data.Pages.ByDate.Reverse .Site.Params.archivePaginate }} <section id="archive" class="archive"> {{- if and (not $paginator.HasPrev) .Site.Params.showArchiveCount }} @@ -14,7 +14,7 @@ {{- range $index, $element := $paginator.Pages -}} {{- $thisYear := $element.Date.Format "2006" }} {{- $lastElement := $index | add -1 | index $paginator.Pages }} - {{ if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }} + {{- if or (eq $index 0) ( ne ($lastElement.Date.Format "2006") $thisYear ) }} <div class="collection-title"> <h2 class="archive-year">{{ $thisYear }}</h2> </div> @@ -47,4 +47,4 @@ </a> {{- end }} </nav> -{{ end }} +{{- end }} |