Layout cleanup: factor out common title (#463)

No change in generated site.
This commit is contained in:
Patrice Chalin 2020-10-17 10:05:10 -04:00 committed by GitHub
parent 8e37c7214d
commit adb67b27be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 24 deletions

View File

@ -4,7 +4,11 @@
{{ partial "google-analytics.html" . }} {{ partial "google-analytics.html" . }}
{{ partial "meta.html" . }} {{ partial "meta.html" . }}
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title> <title>
{{- block "title" . -}}
{{ .Title }} &ndash; {{ site.Title -}}
{{ end -}}
</title>
{{ partial "favicons.html" . }} {{ partial "favicons.html" . }}
{{ partial "css.html" . }} {{ partial "css.html" . }}
@ -13,8 +17,7 @@
<main class="is-main"> <main class="is-main">
{{ partial "navbar.html" . }} {{ partial "navbar.html" . }}
{{ partial "banner.html" -}} {{ partial "banner.html" -}}
{{ block "main" . }} {{ block "main" . }}{{ end }}
{{ end }}
</main> </main>
{{ partial "footer.html" . }} {{ partial "footer.html" . }}
{{ partial "javascript.html" . }} {{ partial "javascript.html" . }}

View File

@ -1,7 +1,3 @@
{{ define "title" -}}
{{ .Title }} &ndash; {{ site.Title -}}
{{ end -}}
{{ define "main" -}} {{ define "main" -}}
{{ partial "hero.html" . -}} {{ partial "hero.html" . -}}

View File

@ -1,7 +1,3 @@
{{ define "title" -}}
{{ .Title }} &ndash; {{ site.Title -}}
{{ end -}}
{{ define "main" -}} {{ define "main" -}}
{{ partial "blog/list-hero.html" . }} {{ partial "blog/list-hero.html" . }}
{{ partial "blog/posts.html" . -}} {{ partial "blog/posts.html" . -}}

View File

@ -1,7 +1,3 @@
{{ define "title" -}}
{{ .Title }} &ndash; {{ site.Title -}}
{{ end -}}
{{ define "main" -}} {{ define "main" -}}
{{ partial "blog/hero.html" . }} {{ partial "blog/hero.html" . }}
{{ partial "blog/article.html" . -}} {{ partial "blog/article.html" . -}}

View File

@ -1,7 +1,3 @@
{{ define "title" -}}
{{ .Title }} &ndash; {{ site.Title -}}
{{ end -}}
{{ define "main" -}} {{ define "main" -}}
{{ partial "docs/article.html" . -}} {{ partial "docs/article.html" . -}}
{{ end -}} {{ end -}}

View File

@ -1,7 +1,3 @@
{{ define "title" -}}
{{ .Title }} &ndash; {{ site.Title -}}
{{ end -}}
{{ define "main" -}} {{ define "main" -}}
{{ partial "docs/article.html" . -}} {{ partial "docs/article.html" . -}}
{{ end -}} {{ end -}}

View File

@ -1,4 +1,4 @@
{{ $size := .size | default "normal" -}} {{ $size := .size | default "normal" -}}
<div class="content is-{{ $size }} has-bottom-padding is-constrained"> <div class="content is-{{ $size }} has-bottom-padding is-constrained">
{{ .content }} {{ .content }}
</div> </div>