2023-03-09 23:31:58 +00:00
|
|
|
{% extends 'layout.html' %}
|
2023-03-25 16:22:32 +00:00
|
|
|
{% block nav_groups %}selected{% endblock %}
|
2023-03-09 23:31:58 +00:00
|
|
|
{% block content %}
|
2023-03-25 20:24:38 +00:00
|
|
|
<div class="banner small">
|
2023-03-09 23:31:58 +00:00
|
|
|
<div class="banner-content">
|
2023-03-25 20:24:38 +00:00
|
|
|
<h1>{{ config.WEBSITE.name }}</h1>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% if groups|length == 0 %}
|
2023-03-25 20:24:38 +00:00
|
|
|
<p>0 groups :<</p>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% elif groups|length == 69 %}
|
2023-03-25 20:24:38 +00:00
|
|
|
<p>{{ groups|length }} groups, uwu</p>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% else %}
|
2023-03-25 20:24:38 +00:00
|
|
|
<p>{{ groups|length }} groups</p>
|
2023-03-23 15:47:35 +00:00
|
|
|
{% endif %}
|
2023-03-09 23:31:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<form action="/api/group/create" method="post" enctype="multipart/form-data">
|
2023-03-23 22:22:52 +00:00
|
|
|
<input class="input-block black" type="text" name="name" placeholder="name">
|
|
|
|
<input class="input-block black" type="text" name="description" placeholder="description">
|
|
|
|
<button class="btn-block black" type="submit">Submit</button>
|
2023-03-09 23:31:58 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if groups %}
|
|
|
|
<div class="gallery-grid">
|
|
|
|
{% for group in groups %}
|
2023-04-01 16:16:07 +00:00
|
|
|
<a id="group-{{ group.id }}" class="group-item" href="{{ url_for('group.group', group_id=group.id) }}">
|
|
|
|
<div class="image-filter">
|
|
|
|
<p class="image-subtitle">By {{ group.author_username }}</p>
|
|
|
|
<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-04 14:21:16 +00:00
|
|
|
<img data-src="{{ url_for('api.file', file_name=image.file_name) }}?r=thumb" onload="this.classList.add('loaded');" id="lazy-load" class="data-{{ loop.index }}"/>
|
2023-04-01 16:16:07 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
|
|
|
<img src="{{ url_for('static', filename='error.png') }}" class="loaded"/>
|
|
|
|
{% 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 %}
|