summaryrefslogtreecommitdiff
path: root/layouts/_partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_partials')
-rw-r--r--layouts/_partials/head.html20
-rw-r--r--layouts/_partials/header.html4
-rw-r--r--layouts/_partials/pageinfo.html44
3 files changed, 34 insertions, 34 deletions
diff --git a/layouts/_partials/head.html b/layouts/_partials/head.html
index 0c5a796..8487d06 100644
--- a/layouts/_partials/head.html
+++ b/layouts/_partials/head.html
@@ -2,24 +2,24 @@
<meta charset="utf-8">
<meta name="theme-color" content="#000">
<meta name="viewport" content="width=device-width, initial-scale=1">
- {{- if $.Site.Params.description }}
+ {{ if $.Site.Params.description }}
<meta name="description" content="{{ $.Site.Params.description }}">
- {{- end -}}
+ {{ end }}
{{ if $.Site.Params.keywords }}
<meta name="keywords" content="{{ $.Site.Params.keywords }}">
- {{- end -}}
+ {{ end }}
{{ range .Site.Params.custom_css | default (slice "static/css/style.css") }}
- {{- with resources.Get . }}
+ {{ with resources.Get . }}
<link rel="stylesheet" type="text/css" href="{{ (. | minify | fingerprint).RelPermalink }}">
- {{- else }}
- {{- errorf "stylesheet %q listed in params.custom_css was not found in the assets directory" . }}
- {{- end }}
- {{- end -}}
+ {{ else }}
+ {{ errorf "stylesheet %q listed in params.custom_css was not found in the assets directory" . }}
+ {{ end }}
+ {{ end }}
{{ with .OutputFormats.Get "Atom" }}
<link rel="alternate" type="application/atom+xml" href="{{ .RelPermalink }}" title="{{ $.Site.Title }}">
- {{- end -}}
+ {{ end }}
{{ if (not (fileExists "static/favicon.ico")) }}
<link rel="icon" href="data:,">
- {{- end }}
+ {{ end }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title>
</head> \ No newline at end of file
diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html
index 0c2d87e..4e330aa 100644
--- a/layouts/_partials/header.html
+++ b/layouts/_partials/header.html
@@ -1,7 +1,7 @@
-{{ if fileExists "templates/logo.txt" -}}
+{{ if fileExists "templates/logo.txt" }}
<header class="logo">
<pre class="logo__text">
{{ chomp (readFile "templates/logo.txt") }}
</pre>
</header>
-{{- end -}}
+{{ end }}
diff --git a/layouts/_partials/pageinfo.html b/layouts/_partials/pageinfo.html
index 47f1194..b9a8d63 100644
--- a/layouts/_partials/pageinfo.html
+++ b/layouts/_partials/pageinfo.html
@@ -1,28 +1,28 @@
-{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" -}}
+{{ $dateFormat := .Site.Params.dateFormat | default ":date_long" }}
-{{/* user-overridable parameter $dateFormat is escaped pre-insertion so that HTML entities can be inserted */ -}}
-{{ $nonBreakingPublishDate := .Page.PublishDate | time.Format $dateFormat | htmlEscape -}}
-{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate " " "&nbsp;" -}}
-{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate "-" "&#8209;" -}}
+{{/* user-overridable parameter $dateFormat is escaped pre-insertion so that HTML entities can be inserted */}}
+{{ $nonBreakingPublishDate := .Page.PublishDate | time.Format $dateFormat | htmlEscape }}
+{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate " " "&nbsp;" }}
+{{ $nonBreakingPublishDate = replace $nonBreakingPublishDate "-" "&#8209;" }}
-{{/* user-overridable parameter $readingTime is escaped pre-insertion so that HTML entities can be inserted */ -}}
-{{ $nonBreakingReadingTime := i18n "readingTime" .ReadingTime | htmlEscape -}}
-{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime " " "&nbsp;" -}}
-{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime "-" "&#8209;" -}}
+{{/* user-overridable parameter $readingTime is escaped pre-insertion so that HTML entities can be inserted */}}
+{{ $nonBreakingReadingTime := i18n "readingTime" .ReadingTime | htmlEscape }}
+{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime " " "&nbsp;" }}
+{{ $nonBreakingReadingTime = replace $nonBreakingReadingTime "-" "&#8209;" }}
-{{ $breakingTags := .Param (lower (i18n "tags")) -}}
-{{ $nonBreakingTags := slice -}}
-{{ range $breakingTags -}}
- {{/* user-defined tags are escaped pre-insertion so that HTML entities can be inserted */ -}}
- {{ $nonBreakingTag := htmlEscape . -}}
- {{ $nonBreakingTag = replace $nonBreakingTag " " "&nbsp;" -}}
- {{ $nonBreakingTag = replace $nonBreakingTag "-" "&#8209;" -}}
- {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag -}}
-{{ end -}}
+{{ $breakingTags := .Param (lower (i18n "tags")) }}
+{{ $nonBreakingTags := slice }}
+{{ range $breakingTags }}
+ {{/* user-defined tags are escaped pre-insertion so that HTML entities can be inserted */}}
+ {{ $nonBreakingTag := htmlEscape . }}
+ {{ $nonBreakingTag = replace $nonBreakingTag " " "&nbsp;" }}
+ {{ $nonBreakingTag = replace $nonBreakingTag "-" "&#8209;" }}
+ {{ $nonBreakingTags = $nonBreakingTags | append $nonBreakingTag }}
+{{ end }}
-{{/* user-overridable parameter $audioAvailable is escaped pre-insertion so that HTML entities can be inserted */ -}}
-{{ $nonBreakingAudioAvailable := i18n "audioAvailable" .Title | htmlEscape -}}
-{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable " " "&nbsp;" -}}
-{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable "-" "&#8209;" -}}
+{{/* user-overridable parameter $audioAvailable is escaped pre-insertion so that HTML entities can be inserted */}}
+{{ $nonBreakingAudioAvailable := i18n "audioAvailable" .Title | htmlEscape }}
+{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable " " "&nbsp;" }}
+{{ $nonBreakingAudioAvailable = replace $nonBreakingAudioAvailable "-" "&#8209;" }}
<span class="meta-item">{{ emojify ":calendar:" }}&nbsp;<time {{ printf "datetime=%q" (.Page.PublishDate | time.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>{{ $nonBreakingPublishDate | safeHTML }}</time></span><span class="meta-item">{{ emojify ":stopwatch:" }}&nbsp;<time datetime="PT{{ .ReadingTime }}M">{{ $nonBreakingReadingTime | safeHTML }}</time></span>{{ if where .Resources "MediaType.MainType" "audio" }}<span class="meta-item">{{ emojify ":headphones:" }}&nbsp;{{ $nonBreakingAudioAvailable | safeHTML }}</span>{{ end }}{{ if $nonBreakingTags }}<span class="meta-item">{{ emojify ":label:" }}&nbsp;{{ range $key, $val := $nonBreakingTags }}{{ if $key }} {{ end }}<a class="link link--internal" href='{{ relLangURL (lower (i18n "tags")) }}/{{ index $breakingTags $key | urlize }}/' rel="noreferrer">{{ $val | safeHTML }}</a>{{ end }}</span>{{ end }}