Trim more whitespace in template logic

This commit is contained in:
digitalcraftsman 2017-09-07 21:43:11 +02:00
parent 82832c1244
commit fe56862a53
3 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{{ define "main" -}}
<h1>404: Page not found</h1>
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.</p>
{{- end }}
{{-1 end }}

View file

@ -8,11 +8,11 @@
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
{{ if .IsHome }}
{{ if .IsHome -}}
<title>{{ .Site.Title }}</title>
{{ else }}
{{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{ end }}
{{- end }}
<!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">

View file

@ -9,9 +9,9 @@
<ul class="sidebar-nav">
<li><a href="{{ .Site.BaseURL }}">Home</a> </li>
{{ range .Site.Menus.main }}
{{ range .Site.Menus.main -}}
<li><a href="{{.URL}}"> {{ .Name }} </a></li>
{{end}}
{{- end }}
</ul>
<p>{{ with .Site.Params.copyright }}{{.}}{{ else }}&copy; {{ now.Format "2006"}}. All rights reserved. {{end}}</p>