WIP: start page with header
This commit is contained in:
parent
9d834470a6
commit
06b0b4d643
18 changed files with 1683 additions and 9 deletions
|
@ -1,11 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
{{ define "main" }}
|
||||
{{ if .Content }}
|
||||
<!-- TODO -->
|
||||
<div class="content">
|
||||
{{ with .Title }}
|
||||
<div class="title">
|
||||
<h1 class="content-title">{{ . }}</h1>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{.Content}}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="header-blocker"></div>
|
||||
{{ end }}
|
||||
{{- range $index, $page := .Pages }}
|
||||
{{ $odd := mod $index 2 }}
|
||||
{{ $id := .Params.id | default $page.File.ContentBaseName }}
|
||||
{{ if eq .Params.type "hero" }}
|
||||
{{- partial "hero.html" (dict "id" $id "hero" .Params "content" .Content "odd" $odd) -}}
|
||||
{{ end}}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" }}
|
||||
{{ with .Params.image }}
|
||||
{{ if .url }}
|
||||
<img class="coverimage" src="{{ .url }}" alt="{{ .alt }}" />
|
||||
{{ else }}
|
||||
<img class="coverimage" src="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="content">
|
||||
{{ with .Title }}
|
||||
<div class="title">
|
||||
<h1 class="content-title">{{ . }}</h1>
|
||||
<div class="divider"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- <h6>{{ .Date.Format "Mon, Jan 2, 2006" }}</h6> -->
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue