1
0
Fork 0
photos/web/view/index.tmpl

56 lines
2.2 KiB
Cheetah
Raw Normal View History

2020-05-24 20:37:14 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2020-08-23 00:21:56 +08:00
<title>{{ bucketmetadatatitle .Title }}</title>
2020-05-31 21:51:09 +08:00
<link rel="stylesheet" href="{{ .Assets }}css/base.css">
<link rel="stylesheet" href="{{ .Assets }}css/gallery.css">
<link rel="stylesheet" href="{{ .Assets }}css/enlarge.css">
2020-06-01 18:07:48 +08:00
<!-- This gallery works without JavaScript! -->
<script type="module" src="{{ .Assets }}js/view.js" defer async></script>
2020-05-24 20:37:14 +08:00
</head>
<body>
<nav>
<ul>
<li><a href="#download">Download</a></li>
2020-06-01 18:07:48 +08:00
<li><a href="manage/">Manage</a></li>
2020-05-24 20:37:14 +08:00
</ul>
</nav>
<header>
2020-08-23 00:21:56 +08:00
<h1>{{ bucketmetadatatitle .Title }}</h1>
2020-05-24 20:37:14 +08:00
</header>
<main class="gallery">
2020-05-31 21:51:09 +08:00
{{ range .Photos }}
<div class="gallery-item preloaded-thumbnail" data-ar="{{ ar . }}" title="{{ photometadatatitle .Title }}" data-tags="{{ .Tags }}">
<a href="{{ photo . }}" data-enlarge="{{ photo . }}">
2020-06-01 18:07:48 +08:00
<picture style="display: none;">
2020-05-31 21:51:09 +08:00
<source srcset="{{ preview . 320 "image/webp" 70 }} 2x, {{ preview . 160 "image/webp" 70 }} 1x" type="image/webp" media="(max-width: 900px)">
<source srcset="{{ preview . 640 "image/webp" 70 }} 2x, {{ preview . 320 "image/webp" 70 }} 1x" type="image/webp">
2020-06-01 18:07:48 +08:00
<source srcset="{{ preview . 320 "image/jpeg" 70 }} 2x, {{ preview . 160 "image/jpeg" 70 }} 1x" media="(max-width: 900px)">
<source srcset="{{ preview . 640 "image/jpeg" 70 }} 2x, {{ preview . 320 "image/jpeg" 70 }} 1x">
2020-05-31 21:51:09 +08:00
<img src="{{ preview . 320 "image/jpeg" 70 }}"
2020-05-24 20:37:14 +08:00
alt=""
2020-05-31 21:51:09 +08:00
width="{{ ar . | mul 320 }}"
2020-05-24 20:37:14 +08:00
height="320"
2020-05-25 23:17:29 +08:00
loading="lazy"
2020-06-01 18:07:48 +08:00
data-enlarge-preload-for="{{ photo . }}">
2020-05-24 20:37:14 +08:00
</picture>
<picture class="preloaded-thumbnail-image">
2020-05-31 21:51:09 +08:00
<source srcset="{{ preview . 30 "image/webp" 34 }} 1x" type="image/webp" media="(max-width: 900px)">
<source srcset="{{ preview . 60 "image/webp" 34 }} 1x" type="image/webp">
2020-06-01 18:07:48 +08:00
<source srcset="{{ preview . 30 "image/jpeg" 34 }} 1x" media="(max-width: 900px)">
<source srcset="{{ preview . 60 "image/jpeg" 34 }} 1x">
2020-05-31 21:51:09 +08:00
<img src="{{ preview . 30 "image/jpeg" 34 }}"
2020-05-24 20:37:14 +08:00
alt=""
2020-05-31 21:51:09 +08:00
width="{{ ar . | mul 320 }}"
height="320">
2020-05-24 20:37:14 +08:00
</picture>
2020-05-25 23:17:29 +08:00
</a>
2020-05-24 20:37:14 +08:00
</div>
{{ end }}
</main>
</body>
</html>
<!-- vim: set ft=html: -->