-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.html
More file actions
62 lines (54 loc) · 2.25 KB
/
gallery.html
File metadata and controls
62 lines (54 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>天宁的相册</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<script type="text/javascript">
async function loadPhotos() {
let photoCount = 13;
let result = "";
for (let i = 1; i <= photoCount; i++) {
result +=
"<div class='col'>" +
" <a href='./photos/" + i + ".JPG'>" +
" <img src='./thumbnails/" + i + ".JPG' class='w-100 shadow-1-strong rounded mb-4'>" +
" </a>" +
"</div>";
}
document.getElementById("album").innerHTML = result;
await init("gallery")
}
</script>
<link href="./css/common.css" rel="stylesheet">
</head>
<body onload="loadPhotos()">
<!-- navbar -->
<nav class="navbar sticky-top navbar-dark bg-dark">
<div class="navbar-brand" id="brand">
相册
</div>
<div class="justify-content-end" onclick="changeLanguage('gallery')" id="languageSelector"
style="color: white;"><a id="en">En</a> / <a id="zh-Hans">中</a></div>
</nav>
<div id="album" class="row row-cols-1 row-cols-lg-2 row-cols-xl-3 g-3" style="margin: 1vw;">
<!-- An image example -->
<div class="col">
<a href="./photos/1.JPG">
<img src="./thumbnails/1.JPG" class="w-100 shadow-1-strong rounded mb-4">
</a>
</div>
</div>
<!-- 尾注 -->
<div id="footer">
Ⓒ2025 Tianning Digital
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js"
integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI"
crossorigin="anonymous"></script>
<script src="./src/js/main.js" crossorigin="anonymous"></script>
</body>
</html>