diff options
author | Alan Pearce | 2018-06-17 19:39:43 +0200 |
---|---|---|
committer | Alan Pearce | 2018-06-17 19:39:43 +0200 |
commit | 6f7b8a114d998778a2cf7772a29feb3bff6cba81 (patch) | |
tree | 3a47cd07ca5e70665bf653c94c302b74e221f654 | |
parent | 743253f995d352f51fc7b7681948b20c79609060 (diff) | |
download | hyde-6f7b8a114d998778a2cf7772a29feb3bff6cba81.tar.lz hyde-6f7b8a114d998778a2cf7772a29feb3bff6cba81.tar.zst hyde-6f7b8a114d998778a2cf7772a29feb3bff6cba81.zip |
Tweak whitespace
-rw-r--r-- | layouts/_default/baseof.html | 8 | ||||
-rw-r--r-- | layouts/_default/list.html | 20 | ||||
-rw-r--r-- | layouts/_default/single.html | 68 | ||||
-rw-r--r-- | layouts/partials/head.html | 30 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 56 |
5 files changed, 90 insertions, 92 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0c87c3f..8b6c324 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,9 +1,9 @@ {{ partial "head.html" . }} <body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}"> - {{ partial "sidebar.html" . }} - <div class="content container"> - {{ block "main" . -}}{{- end }} - </div> +{{ partial "sidebar.html" . }} + <div class="content container"> +{{ block "main" . -}}{{- end }} + </div> {{ template "_internal/google_analytics_async.html" . }} </body> diff --git a/layouts/_default/list.html b/layouts/_default/list.html index cae4c08..5b51eba 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,11 +1,11 @@ -{{ define "main" -}} -<h1 class="page-title">{{ .Title }}</h1> -<ul class="posts"> -{{ range .Data.Pages -}} - <li> - <a class="post-title u-url" href="{{ .RelPermalink }}">{{ .Title }}</a> - <time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time> - </li> -{{- end }} -</ul> +{{ define "main" }} + <h1 class="page-title">{{ .Title }}</h1> + <ul class="posts"> + {{ range .Data.Pages -}} + <li> + <a class="post-title u-url" href="{{ .RelPermalink }}">{{ .Title }}</a> + <time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time> + </li> + {{ end -}} + </ul> {{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fb048a2..d5d1774 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,37 +1,35 @@ {{ define "main" -}} -<article class="post h-entry"> - <header> - <a class="u-url" href="{{ .Permalink | replaceRE "/$" "" }}"> - <h1 class="post-title p-name">{{ .Title }}</h1> - </a> - <time class="post-date dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time> - </header> - <main class="post-content e-content"> - {{ .Content }} - </main> - <footer class="footer"> - {{ if .Params.categories }} - <span> - Category: - {{ range .Params.categories }} - <a class="p-category" href="/categories/{{ . | lower | urlize }}/">{{ . }}</a> - {{ end }} - </span> - {{ end }} - {{ if .Params.tags }} - <p> - Tags: - {{ range .Params.tags }} - <a class="p-category" href="/tags/{{ . | urlize }}/">{{ . }}</a> - {{ end }} - - </p> - {{ end }} - </footer> -</article> - -{{ if .Site.DisqusShortname -}} -<h2>Comments</h2> -{{ template "_internal/disqus.html" . }} -{{- end }} + <article class="post h-entry"> + <header> + <a class="u-url" href="{{ .Permalink | replaceRE "/$" "" }}"> + <h1 class="post-title p-name">{{ .Title }}</h1> + </a> + <time class="post-date dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}">{{ .Date.Format "Monday, 2 January 2006" }}</time> + </header> + <main class="post-content e-content"> + {{ .Content }} + </main> + <footer class="footer"> + {{- if .Params.categories }} + <span> + Category: + {{- range .Params.categories }} + <a class="p-category" href="/categories/{{ . | lower | urlize }}/">{{ . }}</a> + {{- end }} + </span> + {{- end }} + {{- if .Params.tags }} + <p> + Tags: + {{- range .Params.tags }} + <a class="p-category" href="/tags/{{ . | urlize }}/">{{ . }}</a> + {{- end }} + </p> + {{- end }} + </footer> + </article> + {{- if .Site.DisqusShortname }} + <h2>Comments</h2> + {{ template "_internal/disqus.html" . }} + {{- end }} {{- end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c92ea95..49a7659 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,19 +1,19 @@ <!DOCTYPE html> <html lang="en-GB"> - <head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width,initial-scale=1"> + <head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1"> - {{ if .IsHome -}} - <title>{{ .Site.Title }}</title> - {{- else -}} - <title>{{ .Title }} · {{ .Site.Title }}</title> - {{- end }} + {{- if .IsHome }} + <title>{{ .Site.Title }}</title> + {{ else }} + <title>{{ .Title }} · {{ .Site.Title }}</title> + {{ end -}} - <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print"> - <link rel="stylesheet" href="/css/poole.css"> - <link rel="stylesheet" href="/css/syntax.css"> - <link rel="stylesheet" href="/css/hyde.css"> - <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"> - {{ partial "hook_head_end.html" . }} - </head> + <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print"> + <link rel="stylesheet" href="/css/poole.css"> + <link rel="stylesheet" href="/css/syntax.css"> + <link rel="stylesheet" href="/css/hyde.css"> + <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"> + {{ partial "hook_head_end.html" . }} + </head> \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index e6aadac..c89cc6f 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -1,32 +1,32 @@ - <aside class="sidebar container"> - <header class="sidebar-about h-card vcard p-author"> - {{ if (isset .Site.Author "image") -}} - <a class="u-url u-uid" rel="me" href="{{ .Site.BaseURL }}"> - <img class="u-photo" src="{{ .Site.Author.image }}" width=128 height=128 /> - </a> - {{ end -}} + <aside class="sidebar container"> + <header class="sidebar-about h-card vcard p-author"> + {{ if (isset .Site.Author "image") -}} + <a class="u-url u-uid" rel="me" href="{{ .Site.BaseURL }}"> + <img class="u-photo" src="{{ .Site.Author.image }}" width=128 height=128 /> + </a> + {{ end -}} - {{ if eq .Title .Site.Title -}} - <h1 class="site-title u-name fn">{{ .Site.Title }}</h1> - {{ else -}} - <span class="site-title u-name fn">{{ .Site.Title }}</span> - {{ end -}} + {{ if eq .Title .Site.Title -}} + <h1 class="site-title u-name fn">{{ .Site.Title }}</h1> + {{ else -}} + <span class="site-title u-name fn">{{ .Site.Title }}</span> + {{ end -}} - <p class="lead p-note"> - {{ with .Site.Params.Description }} {{.}} {{ else }}An elegant open source and mobile first theme for <a href="http://hugo.spf13.com">hugo</a> made by <a href="http://twitter.com/mdo">@mdo</a>. Originally made for Jekyll.{{end}} - </p> - </header> + <p class="lead p-note"> + {{ with .Site.Params.Description }} {{.}} {{ else }}An elegant open source and mobile first theme for <a href="http://hugo.spf13.com">hugo</a> made by <a href="http://twitter.com/mdo">@mdo</a>. Originally made for Jekyll.{{end}} + </p> + </header> - <nav> - <ul class="sidebar-nav"> - <li><a href="{{ .Site.BaseURL }}">Home</a></li> - {{ range .Site.Menus.main }} - <li><a href="{{.URL}}"> {{ .Name }} </a></li> - {{end}} - </ul> - </nav> + <nav> + <ul class="sidebar-nav"> + <li><a href="{{ .Site.BaseURL }}">Home</a></li> + {{- range .Site.Menus.main }} + <li><a href="{{.URL}}">{{ .Name }}</a></li> + {{- end }} + </ul> + </nav> - <footer> - Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. - </footer> - </aside> + <footer> + Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>. + </footer> + </aside> |