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-26 01:04:13 +00:00
|
|
|
{% block head %}
|
|
|
|
<style>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% if images %}
|
2023-04-02 21:15:51 +00:00
|
|
|
.banner::after {
|
|
|
|
box-shadow: 0 calc(var(--rad) * -1) 0 0 rgb({{ images.0.image_colours.0.0 }}, {{ images.0.image_colours.0.1 }}, {{ images.0.image_colours.0.2 }});
|
|
|
|
}
|
2023-03-26 01:04:13 +00:00
|
|
|
.banner-content p {
|
|
|
|
color: {{ text_colour }} !important;
|
|
|
|
}
|
|
|
|
.banner-content h1 {
|
|
|
|
color: {{ text_colour }} !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.banner-filter {
|
2023-04-01 16:16:07 +00:00
|
|
|
background: linear-gradient(90deg, rgb({{ images.0.image_colours.0.0 }}, {{ images.0.image_colours.0.1 }}, {{ images.0.image_colours.0.2 }}), rgba({{ images.0.image_colours.0.0 }}, {{ images.0.image_colours.0.1 }}, {{ images.0.image_colours.0.2 }}, 0.3)) !important;
|
2023-03-26 01:04:13 +00:00
|
|
|
}
|
|
|
|
@media (max-width: 800px) {
|
|
|
|
.banner-filter {
|
2023-04-01 16:16:07 +00:00
|
|
|
background: linear-gradient(180deg, rgba({{ images.0.image_colours.0.0 }}, {{ images.0.image_colours.0.1 }}, {{ images.0.image_colours.0.2 }}, 0.8), rgba({{ images.0.image_colours.0.0 }}, {{ images.0.image_colours.0.1 }}, {{ images.0.image_colours.0.2 }}, 0.5)) !important;
|
2023-03-26 01:04:13 +00:00
|
|
|
}
|
|
|
|
}
|
2023-04-02 21:15:51 +00:00
|
|
|
|
|
|
|
.navigation {
|
|
|
|
background-color: rgb({{ images.0.image_colours.0.0 }}, {{ images.0.image_colours.0.1 }}, {{ images.0.image_colours.0.2 }}) !important;
|
|
|
|
}
|
|
|
|
.navigation-item > svg {
|
|
|
|
fill: {{ text_colour }} !important;
|
|
|
|
color: {{ text_colour }} !important;
|
|
|
|
}
|
|
|
|
.navigation-item.selected::before {
|
|
|
|
background-color: {{ text_colour }} !important;
|
|
|
|
}
|
2023-03-26 01:04:13 +00:00
|
|
|
{% endif %}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="banner {% if not images %}small{% endif %}">
|
|
|
|
{% if not images %}
|
2023-03-10 17:38:24 +00:00
|
|
|
<div class="banner-content">
|
2023-03-26 01:04:13 +00:00
|
|
|
<h1>{{ group.name }}</h1>
|
|
|
|
<p>By {{ group.author_username }}</p>
|
2023-03-10 17:38:24 +00:00
|
|
|
</div>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% else %}
|
2023-04-01 16:16:07 +00:00
|
|
|
<img src="{{ url_for('api.file', file_name=images.0.file_name ) }}?r=prev" onload="imgFade(this)" style="opacity:0;"/>
|
|
|
|
<span class="banner-filter"></span>
|
2023-03-10 17:38:24 +00:00
|
|
|
<div class="banner-content">
|
2023-03-11 22:14:03 +00:00
|
|
|
<p>By {{ group.author_username }} - {{ images|length }} Images</p>
|
2023-03-26 01:04:13 +00:00
|
|
|
<h1>{{ group.name }}</h1>
|
|
|
|
<p>{{ group.description }}</p>
|
2023-03-10 17:38:24 +00:00
|
|
|
</div>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2023-04-03 03:17:34 +00:00
|
|
|
<form id="modifyGroup" action="/api/group/modify" method="post">
|
2023-03-10 17:38:24 +00:00
|
|
|
<input type="text" name="group" placeholder="group id" value="{{ group.id }}">
|
|
|
|
<input type="text" name="image" placeholder="image id">
|
2023-03-09 23:31:58 +00:00
|
|
|
<input type="text" name="action" placeholder="add/remove" value="add">
|
|
|
|
<button type="submit">Submit</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% if images %}
|
|
|
|
<div class="gallery-grid">
|
|
|
|
{% for image in images %}
|
|
|
|
<a id="image-{{ image.id }}" class="gallery-item" href="{{ url_for('group.group_post', group_id=group.id, image_id=image.id) }}" style="background-color: rgb({{ image.image_colours.0.0 }}, {{ image.image_colours.0.1 }}, {{ image.image_colours.0.2 }})">
|
2023-03-11 22:14:03 +00:00
|
|
|
<div class="image-filter">
|
|
|
|
<p class="image-subtitle"></p>
|
|
|
|
<p class="image-title"><span class="time">{{ image.created_at }}</span></p>
|
|
|
|
</div>
|
2023-04-04 14:21:16 +00:00
|
|
|
<img alt="{{ image.post_alt }}" data-src="{{ url_for('api.file', file_name=image.file_name) }}?r=thumb" onload="this.classList.add('loaded');" id="lazy-load"/>
|
2023-03-09 23:31:58 +00:00
|
|
|
</a>
|
|
|
|
{% 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-26 01:04:13 +00:00
|
|
|
<p>Add some images to the group!</p>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% else %}
|
2023-03-26 01:04:13 +00:00
|
|
|
<p>Login to start managing this image group!</p>
|
2023-03-09 23:31:58 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|