summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-09-23 12:52:32 +0530
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2020-09-23 12:52:32 +0530
commit016dd6e9fae2cff965753c0fe865e11a58018101 (patch)
tree8ee6d6ff897612d29d0e0756dddd80b7e6cf5c4d /layouts/_default
parent2cb5c9dad5b176fa03ebe72b04c0cd0f63100343 (diff)
(lint) remove unnecessary whitespace
created by hugo's {{ }}
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/archives.html42
-rw-r--r--layouts/_default/baseof.html7
-rw-r--r--layouts/_default/list.html31
-rw-r--r--layouts/_default/single.html34
-rw-r--r--layouts/_default/terms.html17
5 files changed, 66 insertions, 65 deletions
diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html
index d6753e9..160c3ed 100644
--- a/layouts/_default/archives.html
+++ b/layouts/_default/archives.html
@@ -1,39 +1,41 @@
-{{ define "main" }}
+{{- define "main" }}
<header class="page-header">
<h1>{{ .Title }}</h1>
</header>
-{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
-{{ range $pages.GroupByPublishDate "2006" }}
-{{ if ne .Key "0001" }}
+
+{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+{{- range $pages.GroupByPublishDate "2006" }}
+{{- if ne .Key "0001" }}
<div class="archive-year">
- <h2 class="archive-year-header">{{ replace .Key "0001" "" }}</h2>
- {{ range .Pages.GroupByDate "January" }}
+ <h2 class="archive-year-header">{{- replace .Key "0001" "" }}</h2>
+ {{- range .Pages.GroupByDate "January" }}
<div class="archive-month">
- <h3 class="archive-month-header">{{ .Key }}</h3>
+ <h3 class="archive-month-header">{{- .Key }}</h3>
<div class="archive-posts">
- {{ range .Pages }}
- {{ if eq .Kind "page" }}
+ {{- range .Pages }}
+ {{- if eq .Kind "page" }}
<div class="archive-entry">
<h3 class="archive-entry-title">
- {{ .Title | markdownify }}
+ {{- .Title | markdownify }}
</h3>
<div class="archive-meta">
- {{- if or .Params.author .Site.Params.author }}{{- .Params.author | default .Site.Params.author }} ·
- {{ end }}
- {{ if $.Site.Params.ShowReadingTime }}{{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}
- · {{ end }}
+ {{- if or .Params.author .Site.Params.author }}
+ {{- .Params.author | default .Site.Params.author }} ·
+ {{- end }}
+ {{- if $.Site.Params.ShowReadingTime }}
+ {{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}&nbsp;·&nbsp;{{ end }}
{{- .Date.Format "January 2, 2006" -}}
</div>
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
</div>
- {{ end }}
- {{ end }}
+ {{- end }}
+ {{- end }}
</div>
</div>
- {{ end }}
+ {{- end }}
</div>
-{{ end }}
-{{ end }}
+{{- end }}
+{{- end }}
-{{ end }}{{/* end main */}} \ No newline at end of file
+{{- end }}{{/* end main */}} \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7253249..6deb9a9 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -5,13 +5,12 @@
{{- partial "head.html" . }}
</head>
-<body
- class="{{ if (and (eq .Kind `page` ) (ne .Layout `archives`)) }}single{{ else }}list{{ if .IsHome }} home {{ end }}{{ end }}{{ if eq $.Site.Params.defaultTheme `dark` }} dark {{ end }}"
- id="top">
+<body class="{{ if (and (eq .Kind `page` ) (ne .Layout `archives`)) }}single{{ else }}list
+ {{- if .IsHome }} home{{ end }}{{ end }}{{- if eq $.Site.Params.defaultTheme `dark` }} dark{{ end }}" id="top">
{{- partialCached "header.html" . .Page}}
<main class="main">
{{- block "main" . }}
- {{end }}
+ {{- end }}
</main>
{{- partialCached "footer.html" . .Type }}
</body>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 89ced7a..ef31469 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,21 +1,20 @@
-{{ define "main" }}
+{{- define "main" }}
-{{ if (and .Site.Params.profileMode.enabled .IsHome) }}
+{{- if (and .Site.Params.profileMode.enabled .IsHome) }}
{{- partial "indexProfile.html" . }}
-{{else}} {{/* if not profileMode */}}
+{{- else }} {{/* if not profileMode */}}
{{- if not .IsHome | and .Title }}
<header class="page-header">
<h1>{{ .Title }}</h1>
</header>
-{{ end }}
-
+{{- end }}
-{{ $pages := .RegularPages }}
+{{- $pages := .RegularPages }}
-{{ if .IsHome }}
-{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
-{{end}}
+{{- if .IsHome }}
+{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
+{{- end}}
{{ $paginator := .Paginate $pages }}
@@ -25,29 +24,29 @@
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}}
{{- partial "homeInfo.html" . }}
-{{else}}
+{{- else}}
{{- $class = "first-entry" }}
-{{ end }}
+{{- end }}
{{- else if .Data.Term }}
{{- $class = "post-entry tag-entry" }}
{{- end }}
<article class="{{ $class }}">
- {{ if .Params.cover }}
+ {{- if .Params.cover }}
<figure class="entry-cover">
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title }}">
</figure>
- {{ end }}
+ {{- end }}
<header class="entry-header">
<h2>
{{ .Title }}
{{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{- end }}
</h2>
</header>
- {{if (ne .Site.Params.hideSummary true)}}
+ {{- if (ne .Site.Params.hideSummary true)}}
<section class="entry-content">
<p>{{ .Summary | plainify | htmlUnescape }}...</p>
</section>
- {{ end }}
+ {{- end }}
<footer class="entry-footer">
<time>{{ .Date.Format "January 2, 2006" }}</time>
{{- if $.Site.Params.ShowReadingTime }}&nbsp;.&nbsp;
@@ -72,4 +71,4 @@
</footer>
{{- end }}
{{end}}{{/* end profileMode */}}
-{{ end }}{{/* end main */}} \ No newline at end of file
+{{- end }}{{- /* end main */ -}} \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 781a05d..846690b 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,4 +1,4 @@
-{{ define "main" }}
+{{- define "main" }}
<article class="post-single">
<header class="post-header">
@@ -6,7 +6,7 @@
{{ .Title }}
{{- if .Draft }}<div class="entry-isdraft"><sup>&nbsp;&nbsp;[draft]</sup></div>{{- end }}
</h1>
- {{ if .Params.hideMeta }}{{ else }}
+ {{- if .Params.hideMeta }}{{ else }}
<div class="post-meta">
<time>{{ .Date.Format "January 2, 2006" }}</time>
{{- if $.Site.Params.ShowReadingTime -}}&nbsp;.&nbsp;
@@ -15,34 +15,34 @@
{{- if or .Params.author .Site.Params.author }}&nbsp;.&nbsp;{{- .Params.author | default .Site.Params.author }}{{ end }}
{{- if .IsTranslated -}}&nbsp;|&nbsp;
<ul class="i18n_list">
- {{ i18n "translations" | default "Translations"}}:
- {{ range .Translations }}
+ {{- i18n "translations" | default "Translations"}}:
+ {{- range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
- {{ end }}
+ {{- end }}
</ul>
- {{ end }}
+ {{- end }}
</div>
- {{end}}
+ {{- end}}
</header>
- {{ if .Params.cover }}
+ {{- if .Params.cover }}
<figure class="entry-cover">
<img src="{{ .Params.cover | absURL }}" alt="cover image for {{ .Title | plainify }}">
</figure>
- {{ end }}
- {{ if .Params.ShowToc }}
+ {{- end }}
+ {{- if .Params.ShowToc }}
<div class="toc">
<details {{if .Params.TocOpen }} open{{ end }}>
<summary>
- <div class="details">{{ i18n "toc" | default "Table of Contents" }}</div>
+ <div class="details">{{- i18n "toc" | default "Table of Contents" }}</div>
</summary>
<blockquote>
- {{ partial "toc.html" . }}
+ {{- partial "toc.html" . }}
</blockquote>
</details>
</div>
- {{ end }}
+ {{- end }}
<div class="post-content">{{ .Content }}</div>
<footer class="post-footer">
{{- if .Params.tags }}
@@ -53,9 +53,9 @@
{{- end }}
</ul>
{{- end }}
- {{ if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }}
- {{ partial "share-icons.html" . }}
- {{ end }}
+ {{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true) ) }}
+ {{- partial "share-icons.html" . }}
+ {{- end }}
</footer>
{{- if $.Site.Params.comments }}
@@ -63,4 +63,4 @@
{{- end }}
</article>
-{{ end }}{{/* end main */}} \ No newline at end of file
+{{- end }}{{/* end main */}} \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 6f47851..adbd2f5 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,21 +1,22 @@
{{ define "main" }}
+
{{- if .Title }}
<header class="page-header">
<h1>{{ .Title }}</h1>
</header>
-{{ end }}
+{{- end }}
<ul class="terms-tags">
- {{ $type := .Type }}
- {{ range $key, $value := .Data.Terms.Alphabetical }}
- {{ $name := .Name }}
- {{ $count := .Count }}
- {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
+ {{- $type := .Type }}
+ {{- range $key, $value := .Data.Terms.Alphabetical }}
+ {{- $name := .Name }}
+ {{- $count := .Count }}
+ {{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
</li>
- {{ end }}
- {{ end }}
+ {{- end }}
+ {{- end }}
</ul>
{{ end }}{{/* end main */}} \ No newline at end of file