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" -}} {{ define "main" -}}
<h1>404: Page not found</h1> <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> <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--> <!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
{{ if .IsHome }} {{ if .IsHome -}}
<title>{{ .Site.Title }}</title> <title>{{ .Site.Title }}</title>
{{ else }} {{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title> <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{ end }} {{- end }}
<!-- CSS --> <!-- CSS -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">

View File

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