mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-17 11:39:29 -07:00
feat(container.ts): create container module to handle scrollable behavior and add/remove disableScroll class fix(customCursor.ts): update append target for cursor element to use container instead of main fix(stage.ts): update append target for stage element to use container instead of main fix(stageNav.ts): update append target for navOverlay element to use container instead of main feat(main.ts): initialize container module and conditionally initialize stage and stageNav modules based on device type fix(nav.ts): update references to state module functions to use state.get() instead of getState()
43 lines
1.3 KiB
HTML
43 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
{{ 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" }}
|
|
{{ $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 }}
|
|
{{ $resize := .Resize "x2000 webp Lanczos q70" }}
|
|
{{ $.Scratch.Add "img" (dict
|
|
"index" (int $index)
|
|
"url" (string .RelPermalink)
|
|
"imgH" (int .Height)
|
|
"imgW" (int .Width)
|
|
"pColor" (string $pColor)
|
|
"sColor" (string $sColor))
|
|
}}
|
|
{{ end }}
|
|
<script id="imagesSource" type="application/json">{{ $.Scratch.Get "img" | jsonify | safeJS }}</script>
|
|
{{ end }}
|
|
</div>
|
|
<div class="container">{{ partial "nav.html" . }}</div>
|
|
</body>
|
|
</html>
|