{% extends 'layout.html' %}

{% block nav_profile %}selected{% endblock %}
{% block content %}
    <div class="banner-small">
        <div class="banner-content">
            <h1 class="banner-header">{{ user.username }}</h1>
            <p class="banner-info">Member since <span class="time">{{ user.joined_at }}</span></p>
        </div>
    </div>
    {% if images %}
        <div class="gallery-grid">
            {% for image in images %}
                <a id="image-{{ image.id }}" class="gallery-item" href="{{ url_for('image.image', image_id=image.id) }}" style="background-color: rgb({{ image.colours.0.0 }}, {{ image.colours.0.1 }}, {{ image.colours.0.2 }})">
                    <div class="image-filter">
                        <p class="image-subtitle"></p>
                        <p class="image-title"><span class="time">{{ image.created_at }}</span></p>
                    </div>
                    <img fetchpriority="low" alt="{{ image.alt }}" data-src="{{ url_for('api.file', file_name=image.filename) }}?r=thumb" onload="this.classList.add('loaded');" id="lazy-load"/>
                </a>
            {% endfor %}
        </div>
    {% else %}
        <div class="big-text">
            <h1>*crickets chirping*</h1>
            <p>There are no images here yet, upload some!</p>
        </div>
    {% endif %}
{% endblock %}

