2023-05-29 10:42:17 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% from 'macros/image.html' import gallery_item %}
|
|
|
|
{% block nav_profile %}{% if user.id == current_user.id %}selected{% endif %}{% endblock %}
|
|
|
|
|
2023-04-20 20:47:04 +00:00
|
|
|
{% block head %}
|
|
|
|
{% if user.picture %}
|
2023-08-04 17:34:08 +00:00
|
|
|
<meta property="og:image" content="{{ url_for('api.media', path='pfp/' + user.picture) }}"/>
|
|
|
|
<meta name="twitter:image" content="{{ url_for('api.media', path='pfp/' + user.picture) }}">
|
2023-04-20 20:47:04 +00:00
|
|
|
{% endif %}
|
2023-04-22 11:46:20 +00:00
|
|
|
{% if user.colour %}<meta name="theme-color" content="rgb{{ user.colour }}"/>{% endif %}
|
2023-04-22 09:02:05 +00:00
|
|
|
<meta name="twitter:card" content="summary">
|
2023-04-20 20:47:04 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2023-04-21 16:22:31 +00:00
|
|
|
function moreInfo() {
|
2023-09-24 14:42:26 +00:00
|
|
|
popupShow('{{ user.username }}',
|
2023-04-21 16:22:31 +00:00
|
|
|
'<p>Joined: {{ user.joined_at }}</p><br>' +
|
|
|
|
'<p>Images: {{ images|length }}</p><br>' +
|
|
|
|
'<p>Groups: {{ groups|length }}</p>');
|
|
|
|
}
|
2023-04-20 20:47:04 +00:00
|
|
|
</script>
|
2023-01-10 12:39:29 +00:00
|
|
|
|
2023-04-20 20:47:04 +00:00
|
|
|
<style>
|
|
|
|
.banner-picture {
|
2023-04-22 11:46:20 +00:00
|
|
|
background-color: rgb{{ user.colour }} !important;
|
2023-04-20 20:47:04 +00:00
|
|
|
}
|
|
|
|
</style>
|
|
|
|
{% endblock %}
|
2023-05-29 10:42:17 +00:00
|
|
|
|
|
|
|
{% block header %}
|
2023-04-20 13:58:40 +00:00
|
|
|
<div class="banner">
|
|
|
|
{% if user.banner %}
|
|
|
|
<img src="{{ url_for('static', filename='icon.png') }}" alt="Profile Banner" onload="imgFade(this)" style="opacity:0;"/>
|
|
|
|
{% else %}
|
|
|
|
<img src="{{ url_for('static', filename='banner.png') }}" alt="Profile Banner" onload="imgFade(this)" style="opacity:0;"/>
|
|
|
|
{% endif %}
|
|
|
|
<span class="banner-filter"></span>
|
2023-03-08 13:36:35 +00:00
|
|
|
<div class="banner-content">
|
2023-04-20 13:58:40 +00:00
|
|
|
{% if user.picture %}
|
2023-04-22 11:46:20 +00:00
|
|
|
<picture class="banner-picture">
|
2023-08-04 17:34:08 +00:00
|
|
|
<source srcset="{{ url_for('api.media', path='pfp/' + user.picture) }}?r=pfp&e=webp">
|
|
|
|
<source srcset="{{ url_for('api.media', path='pfp/' + user.picture) }}?r=pfp&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='pfp/' + user.picture) }}?r=pfp"
|
2023-04-22 11:46:20 +00:00
|
|
|
alt="Profile picture"
|
|
|
|
onload="imgFade(this)"
|
|
|
|
style="opacity:0;"
|
|
|
|
/>
|
|
|
|
</picture>
|
2023-04-20 13:58:40 +00:00
|
|
|
{% else %}
|
2023-04-21 16:22:31 +00:00
|
|
|
<img
|
|
|
|
class="banner-picture"
|
|
|
|
src="{{ url_for('static', filename='icon.png') }}"
|
|
|
|
alt="Profile picture"
|
|
|
|
onload="imgFade(this)"
|
|
|
|
style="opacity:0;"
|
|
|
|
/>
|
2023-04-20 13:58:40 +00:00
|
|
|
{% endif %}
|
2023-04-04 19:36:24 +00:00
|
|
|
<h1 class="banner-header">{{ user.username }}</h1>
|
2023-04-20 13:58:40 +00:00
|
|
|
<p class="banner-subtitle">{{ images|length }} Images · {{ groups|length }} Groups</p>
|
|
|
|
<div class="pill-row">
|
|
|
|
<div>
|
2023-04-22 13:48:06 +00:00
|
|
|
<button class="pill-item" onclick="copyToClipboard(window.location.href)"><i class="ph ph-export"></i></button>
|
2023-04-20 16:15:51 +00:00
|
|
|
<button class="pill-item" onclick="moreInfo()"><i class="ph ph-info"></i></button>
|
2023-04-20 13:58:40 +00:00
|
|
|
</div>
|
2023-04-21 16:22:31 +00:00
|
|
|
{% if user.id == current_user.id %}
|
|
|
|
<div>
|
|
|
|
<a href="{{ url_for('settings.general') }}#profileSettings" class="pill-item pill__critical"><i class="ph ph-user-circle-gear"></i></a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-04-20 13:58:40 +00:00
|
|
|
</div>
|
2023-03-08 13:36:35 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-29 10:42:17 +00:00
|
|
|
{% endblock %}
|
2023-04-20 13:58:40 +00:00
|
|
|
|
2023-05-29 10:42:17 +00:00
|
|
|
{% block content %}
|
2023-04-04 14:55:32 +00:00
|
|
|
{% if images %}
|
2023-04-20 13:58:40 +00:00
|
|
|
<h1 class="gallery-header">Images</h1>
|
2023-04-04 14:55:32 +00:00
|
|
|
<div class="gallery-grid">
|
2023-05-29 10:42:17 +00:00
|
|
|
{% for image in images %}{{ gallery_item(image) }}{% endfor %}
|
2023-04-04 14:55:32 +00:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="big-text">
|
|
|
|
<h1>*crickets chirping*</h1>
|
2023-04-20 16:15:51 +00:00
|
|
|
<p>There are no images here yet, oopsie!</p>
|
2023-04-04 14:55:32 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-01-10 12:39:29 +00:00
|
|
|
{% endblock %}
|