refactor templates layout
@see https://gohugo.io/templates/new-templatesystem-overview/
This commit is contained in:
parent
a83f339dc8
commit
230c46411b
102 changed files with 2 additions and 2 deletions
|
@ -1,54 +0,0 @@
|
|||
{{ define "title" }}
|
||||
{{- partialCached "head/title.html" ( slice ( .Page.Title | plainify ) .Site.Title ) .Site.Title .Page.Title -}}
|
||||
{{ end }}
|
||||
|
||||
{{ define "head-description" }}{{ .Summary | plainify }}{{ end }}
|
||||
|
||||
{{ define "main-class" }}--single layouts-default-single{{ end }}
|
||||
|
||||
{{ define "header-scripts" }}
|
||||
{{ with .Params.locations }}
|
||||
<script
|
||||
id="Map-script"
|
||||
src="/js/leaflet/leaflet.js"
|
||||
></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "header-styles" }}
|
||||
{{ with .Params.styles }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{ ( $.Page.Resources.GetMatch "style").RelPermalink }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ with .Params.locations }}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="/css/leaflet/leaflet.css"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "footer-scripts" }}
|
||||
{{- partialCached "single/footer-scripts.html" ( dict "pc" . "sc" $ ) . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-header" }}
|
||||
{{ partial "single/main-header.html" ( dict "pc" . "sc" $ ) }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-body" }}
|
||||
<section class="site-content__body">
|
||||
{{- if ( or .Params.internal_links .Params.external_links ) -}}
|
||||
{{- partial "single/main-body/links.html" ( dict "pc" . "sc" $ ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "single/main-body/content.html" ( dict "pc" . "sc" $ ) -}}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ define "main-footer" }}
|
||||
{{ partial "single/post-meta.html" ( dict "pc" . "sc" $ ) }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue