CHANGE image handling, ADD partials to reuse structure, REFACTOR
This commit is contained in:
parent
1265491dee
commit
01dcf04b8a
36 changed files with 1181 additions and 864 deletions
|
@ -1,27 +1,24 @@
|
|||
{{ define "main" }}
|
||||
{{ with .Params.image }}
|
||||
{{ if .url }}
|
||||
<img class="coverimage" src="{{ .url }}" alt="{{ .alt }}" />
|
||||
{{- partial "components/image.html" (dict "style" "coverimage" "url" .url "alt" .alt) -}}
|
||||
{{ else }}
|
||||
<img class="coverimage" src="{{ . }}" />
|
||||
{{- partial "components/image.html" (dict "style" "coverimage" "url" .) -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
<div class="content">
|
||||
{{ with .Title }}
|
||||
<div class="title">
|
||||
<h1 class="content-title">{{ . }}</h1>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
{{ partial "components/title.html" . }}
|
||||
{{ end }}
|
||||
{{.Content}}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ else if .Params.header.enabled }}
|
||||
<div class="header-blocker"></div>
|
||||
{{ end }}
|
||||
{{- range $index, $page := .Pages }}
|
||||
{{ $odd := mod $index 2 }}
|
||||
{{ $id := .Params.id | default $page.File.ContentBaseName }}
|
||||
{{ $id := .Params.id | default $page.Name }}
|
||||
{{ if eq .Params.type "slider" }}
|
||||
{{- partial "slider.html" (dict "id" $id "slider" .Params "color" $.Site.Params.color "odd" $odd) -}}
|
||||
{{ else if eq .Params.type "hero" }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue