layout initialization

This commit is contained in:
Spedon
2023-03-09 12:01:06 +08:00
parent 4a58950a44
commit 4ee452f78e
4 changed files with 23 additions and 11 deletions

View File

@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
{{- partial "head.html" . -}}
<title>{{ .Title }}</title>
</head>
<body>
<header>
{{- partial "header.html" . -}}
</header>
<div id="main">
{{ $sourcePath := "images" }}
{{ $gallery := site.GetPage $sourcePath }}
{{ with $gallery.Resources.ByType "image" }}
{{ range . }}
<img class="image" src="{{ .RelPermalink }}" alt="x"/>
{{ end }}
{{ end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>