forked from rleh/static-photogallery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gallery_page.html.jinja2
91 lines (80 loc) · 1.99 KB
/
gallery_page.html.jinja2
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ page_title_prefix }} | {{ page_title }}</title>
<link rel="stylesheet" href="{{ static_path }}/lightboxgallery-min.css">
<link rel="stylesheet" href="{{ static_path }}/style.css">
<link href="{{ static_path }}/fa/css/fontawesome.min.css" rel="stylesheet">
<link href="{{ static_path }}/fa/css/solid.min.css" rel="stylesheet">
<style>
body {
background-color: #111;
color: #CCC;
}
.lightboxgallery-gallery {
max-width: 100%;
}
a:link {
color: #CCC;
}
a:visited, a:hover, a:active {
color: #EEE;
}
.cards {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
flex-direction: row;
max-height: 100vh;
}
.cards .dir {
margin: 10px;
width: 10vw;
text-align: center;
align-content: center;
word-wrap: break-word;
font-size: 90%;
}
</style>
</head>
<body>
{% if dirs %}
<br>
<div class="cards">
{% for dir in dirs %}
<div class="dir"><a href="{{ dir }}/index.html"><i class="fas fa-folder-open fa-4x"></i><br>{{ dir }}</a></div>
{% endfor %}
</div>
{% if items %}
<hr />
{% endif %}
{% endif %}
<div class="lightboxgallery-gallery clearfix">
{% for item in items %}
<a class="lightboxgallery-gallery-item" target="_blank" href="{{ item.thumbnail_large }}" data-title="<a href='{{ original_path }}{{ item.path }}'>Original image: {{ item.name }}</a>">
<div>
<img src="{{ item.thumbnail_small }}" title="{{ item.name }}" alt="{{ item.name }}">
<div class="lightboxgallery-gallery-item-content">
<span class="lightboxgallery-gallery-item-title">{{ item.name }}</span>
</div>
</div>
</a>
{% endfor %}
</div>
<script src="{{ static_path }}/jquery-3.4.1.min.js"></script>
<script src="{{ static_path }}/lightboxgallery-min.js"></script>
<script type="text/javascript">
jQuery(function($) {
$(document).on('click', '.lightboxgallery-gallery-item', function(event) {
event.preventDefault();
$(this).lightboxgallery({
showCounter: true,
showTitle: true,
showDescription: true
});
});
});
</script>
</body>
</html>