2023-05-29 10:42:17 +00:00
|
|
|
{% extends 'base.html' %}
|
2023-03-25 16:22:32 +00:00
|
|
|
{% block nav_groups %}selected{% endblock %}
|
2023-05-29 10:42:17 +00:00
|
|
|
|
2023-04-04 20:45:35 +00:00
|
|
|
{% block head %}
|
2023-04-22 11:46:20 +00:00
|
|
|
{% if images %}<meta name="theme-color" content="rgb{{ images.0.colours.0 }}"/>{% endif %}
|
2023-04-04 20:45:35 +00:00
|
|
|
{% endblock %}
|
2023-05-29 10:42:17 +00:00
|
|
|
|
|
|
|
{% block header %}
|
2023-04-04 19:36:24 +00:00
|
|
|
<div class="banner-small">
|
2023-03-09 23:31:58 +00:00
|
|
|
<div class="banner-content">
|
2023-04-07 09:18:03 +00:00
|
|
|
<h1 class="banner-header">{{ config.WEBSITE_CONF.name }}</h1>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% if groups|length == 0 %}
|
2023-04-04 19:36:24 +00:00
|
|
|
<p class="banner-info">No groups!!!!</p>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% elif groups|length == 69 %}
|
2023-04-04 19:36:24 +00:00
|
|
|
<p class="banner-info">{{ groups|length }} groups, uwu</p>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% else %}
|
2023-04-04 19:36:24 +00:00
|
|
|
<p class="banner-info">{{ groups|length }} groups</p>
|
|
|
|
{% endif %}
|
|
|
|
{% if current_user.is_authenticated %}
|
|
|
|
<div class="pill-row">
|
|
|
|
<div>
|
2023-09-24 14:42:26 +00:00
|
|
|
<button class="pill-item" onclick="groupCreatePopup()"><i class="ph ph-plus"></i></button>
|
2023-04-04 19:36:24 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% endif %}
|
2023-03-09 23:31:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-29 10:42:17 +00:00
|
|
|
{% endblock %}
|
2023-03-09 23:31:58 +00:00
|
|
|
|
2023-05-29 10:42:17 +00:00
|
|
|
{% block content %}
|
2023-03-09 23:31:58 +00:00
|
|
|
{% if groups %}
|
|
|
|
<div class="gallery-grid">
|
|
|
|
{% for group in groups %}
|
2023-05-29 10:42:17 +00:00
|
|
|
<a
|
|
|
|
class="group-item square"
|
|
|
|
id="group-{{ group.id }}"
|
|
|
|
href="{{ url_for('group.group', group_id=group.id) }}"
|
|
|
|
{% if group.images|length > 0 %} style="background-color: rgba{{ group.images.0.colours.0 }};"{% endif %}
|
|
|
|
>
|
2023-04-01 16:16:07 +00:00
|
|
|
<div class="image-filter">
|
2023-04-12 15:16:43 +00:00
|
|
|
<p class="image-subtitle">By {{ group.author.username }}</p>
|
2023-04-01 16:16:07 +00:00
|
|
|
<p class="image-title">{{ group.name }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="images size-{{ group.images|length }}">
|
|
|
|
{% if group.images|length > 0 %}
|
|
|
|
{% for image in group.images %}
|
2023-04-22 11:46:20 +00:00
|
|
|
<picture>
|
2023-08-04 17:34:08 +00:00
|
|
|
<source srcset="{{ url_for('api.media', path='uploads/' + image.filename) }}?r=thumb&e=webp">
|
|
|
|
<source srcset="{{ url_for('api.media', path='uploads/' + image.filename) }}?r=thumb&e=png">
|
2023-04-22 11:46:20 +00:00
|
|
|
<img
|
2023-08-04 17:34:08 +00:00
|
|
|
src="{{ url_for('api.media', path='uploads/' + image.filename) }}?r=thumb"
|
2023-04-22 11:46:20 +00:00
|
|
|
alt="{% if image.alt %}{{ image.alt }}{% else %}Image Thumbnail{% endif %}"
|
|
|
|
class="data-{{ loop.index }}"
|
|
|
|
onload="imgFade(this)"
|
|
|
|
style="opacity:0;"
|
|
|
|
fetchpriority="low"
|
|
|
|
/>
|
|
|
|
</picture>
|
2023-04-01 16:16:07 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
2023-04-06 21:26:40 +00:00
|
|
|
<img src="{{ url_for('static', filename='error.png') }}" class="loaded" alt="Error thumbnail"/>
|
2023-04-01 16:16:07 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</a>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="big-text">
|
2023-03-26 01:04:13 +00:00
|
|
|
<h1>*crickets chirping*</h1>
|
2023-04-03 18:04:49 +00:00
|
|
|
{% if current_user.is_authenticated %}
|
2023-03-09 23:31:58 +00:00
|
|
|
<p>You can get started by creating a new image group!</p>
|
|
|
|
{% else %}
|
2023-03-26 01:04:13 +00:00
|
|
|
<p>Login to start seeing anything here!</p>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|