CHANGE from config to md files for index page
This commit is contained in:
parent
80feba5acc
commit
db7ec5795f
12 changed files with 37 additions and 54 deletions
|
@ -14,20 +14,27 @@
|
|||
{{ end }}
|
||||
{{- range $index, $page := .Pages }}
|
||||
{{ $odd := mod $index 2 }}
|
||||
{{ $id := .Params.id | default $page.File.ContentBaseName }}
|
||||
{{ if eq .Params.type "slider" }}
|
||||
{{- partial "slider.html" (dict "id" $page.File.ContentBaseName "slider" .Params "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{- partial "slider.html" (dict "id" $id "slider" .Params "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "hero" }}
|
||||
{{- partial "hero.html" (dict "id" $page.File.ContentBaseName "hero" .Params "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{- partial "hero.html" (dict "id" $id "hero" .Params "content" .Content "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "video" }}
|
||||
{{- partial "video.html" (dict "id" $page.File.ContentBaseName "video" .Params "odd" $odd) -}}
|
||||
{{- partial "video.html" (dict "id" $id "video" .Params "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "service" }}
|
||||
{{- partial "service.html" (dict "id" $page.File.ContentBaseName "service" .Params "content" .Content "odd" $odd) -}}
|
||||
{{- partial "service.html" (dict "id" $id "service" .Params "content" .Content "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "team" }}
|
||||
{{ $pages := where $.Site.RegularPages "Section" $id }}
|
||||
{{- partial "team.html" (dict "id" $id "team" .Params "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "contact" }}
|
||||
{{- partial "contact.html" (dict "id" $page.File.ContentBaseName "contact" .Params "odd" $odd) -}}
|
||||
{{- partial "contact.html" (dict "id" $id "contact" .Params "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "logos" }}
|
||||
{{- partial "logos.html" (dict "id" $page.File.ContentBaseName "logos" .Params "odd" $odd) -}}
|
||||
{{- partial "logos.html" (dict "id" $id "logos" .Params "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "links" }}
|
||||
{{- partial "links.html" (dict "id" $page.File.ContentBaseName "links" .Params "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
|
||||
{{- partial "links.html" (dict "id" $id "links" .Params "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "posts" }}
|
||||
{{ $pages := where $.Site.RegularPages "Section" $id }}
|
||||
{{- partial "posts.html" (dict "id" $id "posts" .Params "pages" $pages "defaultimage" $.Site.Params.defaultimage "odd" $odd) -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue