aboutsummaryrefslogtreecommitdiffstats
path: root/templates/gallery.html
blob: 2950d8eb1593320eacd901beb6cfaf78b5efa7ad (plain)
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
<!doctype html>
<html>
    <head>
        <title>Drive Photo Gallery</title>
        <style>
            img {
                max-width: 200px;
                margin: 10px;
                display: block;
            }
            .gallery {
                display: flex;
                flex-wrap: wrap;
            }
            .gallery-item {
                margin: 10px;
                text-align: center;
            }
        </style>
    </head>
    <body>
        {% for date in dates %}
        <h2>{{ date }}</h2>
        <div class="gallery">
            {% for f in grouped[date] %}
            <div class="gallery-item">
                <a
                    href="https://drive.google.com/file/d/{{ f.id }}/view"
                    target="_blank"
                >
                    <img
                        src="{{ url_for('serve_thumbnail', filename=f.thumbnail.split('/')[-1]) }}"
                        alt="{{ f.name }}"
                    />
                </a>
                {% if f.description %}
                <p>{{ f.description }}</p>
                {% endif %}
            </div>
            {% endfor %}
        </div>
        {% endfor %}
    </body>
</html>