mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 18:19:29 -07:00
49 lines
1.5 KiB
HTML
49 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
{{ partial "head.html" . }}
|
|
<title>{{ .Title }}</title>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
{{ partial "header.html" . }}
|
|
</header>
|
|
{{ partial "overlay.html" . }}
|
|
<div id="main">
|
|
{{ $sourcePath := "images" }}
|
|
{{ $gallery := site.GetPage $sourcePath }}
|
|
{{ with $gallery.Resources.ByType "image" }}
|
|
{{ $index := len . }}
|
|
{{ $.Scratch.Add "img" slice }}
|
|
{{ range . }}
|
|
{{ $index = sub $index 1}}
|
|
{{ $colors := .Colors }}
|
|
{{ $pColor := index $colors 0 }}
|
|
{{ $sColor := "#ccc" }}
|
|
{{ if gt (len $colors) 1 }}
|
|
{{ $sColor = index $colors 1 }}
|
|
{{ end }}
|
|
{{ $.Scratch.Add "img" (dict
|
|
"index" (string $index)
|
|
"url" (string .RelPermalink)
|
|
"imgH" (string .Height)
|
|
"imgW" (string .Width)
|
|
"pColor" (string $pColor)
|
|
"sColor" (string $sColor)) }}
|
|
{{ end }}
|
|
<script id="images_array" type="application/json">{{ $.Scratch.Get "img" | jsonify | safeJS }}</script>
|
|
{{ end }}
|
|
<div class="image_container" id="layer5" data-status="null"></div>
|
|
<div class="image_container" id="layer4" data-status="null"></div>
|
|
<div class="image_container" id="layer3" data-status="null"></div>
|
|
<div class="image_container" id="layer2" data-status="null"></div>
|
|
<div class="image_container" id="layer1" data-status="null"></div>
|
|
</div>
|
|
<footer>
|
|
{{ partial "footer.html" . }}
|
|
</footer>
|
|
</body>
|
|
</html>
|