diff --git a/layouts/_default/home.html b/layouts/_default/home.html index 4461906..535931a 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -1,14 +1,19 @@ -{{ define "main" }} {{ .Content }} {{ $pages := .Paginate (where -.Site.RegularPages "Type" "ne" "page") }} {{ range $pages.Pages }} - -
- {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ - $dateHuman := .Date | time.Format "2006-01-02" }} - +{{ define "main" }} + {{ .Content }} + {{ $pages := .Paginate (where + .Site.RegularPages "Type" "ne" "page") + }} + {{ range $pages.Pages }} + +
+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format "2006-01-02" }} + -

{{ .Title }}

+

{{ .Title }}

-

{{ .Description }}

-
-
-{{ end }} {{ end }} +

{{ .Description }}

+
+ + {{ end }} +{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index fc5a025..28e9dc2 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,13 +1,16 @@ -{{ define "main" }} {{ .Content }} {{ range .Pages }} - -
- {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ - $dateHuman := .Date | time.Format "2006-01-02" }} - +{{ define "main" }} + {{ .Content }} + {{ range .Pages }} + +
+ {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format "2006-01-02" }} + -

{{ .Title }}

+

{{ .Title }}

-

{{ .Description }}

-
-
-{{ end }} {{ end }} +

{{ .Description }}

+
+ + {{ end }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5a75550..f388f71 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,14 +1,15 @@ {{ define "main" }} -
- {{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }} {{ - $dateHuman := .Lastmod | time.Format "2006-01-02" }} - -
+
+ {{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Lastmod | time.Format "2006-01-02" }} + +
-

{{ .Title }}

+

{{ .Title }}

-

{{ .Description }}

+

{{ .Description }}

- {{ .Content }} -
-{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ end }} + {{ .Content }} +
+ {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ee7fdf7..c63f8ea 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -5,10 +5,18 @@ - {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s – %s" .Title - site.Title }}{{ end }} + {{ if .IsHome }} + {{ site.Title }} + {{ else }} + {{ printf "%s – %s" .Title + site.Title + }} + {{ end }} -{{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} {{ -partial "head/analytics.html" . }} {{ with .OutputFormats.Get "rss" -}} {{ -printf `` .Rel .MediaType.Type -.Permalink site.Title | safeHTML }} {{ end }} +{{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} +{{ partial "head/analytics.html" . }} +{{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type + .Permalink site.Title | safeHTML + }} +{{ end }} diff --git a/layouts/partials/head/analytics.html b/layouts/partials/head/analytics.html index 487d31f..cc44d3a 100644 --- a/layouts/partials/head/analytics.html +++ b/layouts/partials/head/analytics.html @@ -1,7 +1,7 @@ {{ if hugo.IsProduction }} - + {{ end }} diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index 36cbbb4..4c1c0a1 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -1,11 +1,16 @@ -{{- with resources.Get "css/main.css" }} {{- if eq hugo.Environment -"development" }} - -{{- else }} {{- with . | minify | fingerprint }} - -{{- end }} {{- end }} {{- end }} +{{- with resources.Get "css/main.css" }} + {{- if eq hugo.Environment + "development" + }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 14ef07b..cf3c3c1 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -1,11 +1,18 @@ -{{- with resources.Get "js/main.js" }} {{- if eq hugo.Environment "development" -}} {{- with . | js.Build }} - -{{- end }} {{- else }} {{- $opts := dict "minify" true }} {{- with . | js.Build -$opts | fingerprint }} - -{{- end }} {{- end }} {{- end }} +{{- with resources.Get "js/main.js" }} + {{- if eq hugo.Environment "development" }} + {{- with . | js.Build }} + + {{- end }} + {{- else }} + {{- $opts := dict "minify" true }} + {{- with . | js.Build + $opts | fingerprint + }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html index 7183180..c23f626 100644 --- a/layouts/partials/menu.html +++ b/layouts/partials/menu.html @@ -1,12 +1,12 @@ {{- /* -Renders a menu for the given menu ID. + Renders a menu for the given menu ID. -@context {page} page The current page. -@context {string} menuID The menu ID. + @context {page} page The current page. + @context {string} menuID The menu ID. -@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} + @example: {{ partial "menu.html" (dict "menuID" "main" "page" .) +}} */}} - {{- $page := .page }} {{- $menuID := .menuID }} @@ -24,7 +24,7 @@ Renders a menu for the given menu ID. {{- $attrs := dict "href" .URL }} {{- if $page.IsMenuCurrent .Menu . }} {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} - {{- else if $page.HasMenuCurrent .Menu .}} + {{- else if $page.HasMenuCurrent .Menu . }} {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} {{- end }} {{- $name := .Name }} @@ -40,7 +40,8 @@ Renders a menu for the given menu ID. {{- printf " %s=%q" $k $v | safeHTMLAttr }} {{- end }} {{- end -}} - >{{ $name }} + >{{ $name }} {{- with .Children }}