Extend Theme
This commit is contained in:
parent
7239b2c45e
commit
0cf0202035
29 changed files with 802 additions and 169 deletions
|
@ -1,24 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
{{- range $index, $section := .Site.Params.sections }}
|
||||
{{ $odd := mod $index 2 }}
|
||||
{{if eq .type "slider" }}
|
||||
{{- partial "slider.html" (dict "slider" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "video" }}
|
||||
{{- partial "video.html" (dict "video" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "service" }}
|
||||
{{- partial "service.html" (dict "service" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "team" }}
|
||||
{{- partial "team.html" (dict "team" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "contact" }}
|
||||
{{- partial "contact.html" (dict "contact" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "logos" }}
|
||||
{{- partial "logos.html" (dict "logos" $section "odd" $odd) -}}
|
||||
{{end}}
|
||||
{{- end }}
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
{{ define "main" }}
|
||||
{{- range $index, $section := .Site.Params.sections }}
|
||||
{{ $odd := mod $index 2 }}
|
||||
{{ if eq .type "slider" }}
|
||||
{{- partial "slider.html" (dict "slider" $section "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{ else if eq .type "hero" }}
|
||||
{{- partial "hero.html" (dict "hero" $section "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{ else if eq .type "video" }}
|
||||
{{- partial "video.html" (dict "video" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "service" }}
|
||||
{{- partial "service.html" (dict "service" $section "content" $section.description "odd" $odd) -}}
|
||||
{{ else if eq .type "team" }}
|
||||
{{ $pages := where $.Site.RegularPages "Section" $section.id }}
|
||||
{{- partial "team.html" (dict "team" $section "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
|
||||
{{ else if eq .type "contact" }}
|
||||
{{- partial "contact.html" (dict "contact" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "logos" }}
|
||||
{{- partial "logos.html" (dict "logos" $section "odd" $odd) -}}
|
||||
{{ else if eq .type "posts" }}
|
||||
{{ $pages := where $.Site.RegularPages "Section" $section.id }}
|
||||
{{- partial "posts.html" (dict "posts" $section "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue