pflaenz.li/pflaenzli/pflaenzli/templates/user/public.html
Jannis Portmann a2d37538dc
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build was killed
continuous-integration/drone/pr Build is failing
Fix layout
2023-09-10 11:53:20 +02:00

55 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}User {{ username }}{% endblock %}
{% block content %}
<div class="mb-3">
<h1>{{ user.username }}'s {% trans "Profile" %}</h1>
</div>
<h2 class="h3">{% trans "Wishlist" %}</h2>
<div class="mb-4">
{% if wishes %}
<ul class="list-group">
{% for wish in wishes %}<li class="list-group-item">{{ wish.title }}</li>{% endfor %}
</ul>
{% else %}
<div class="alert alert-warning" role="alert">{% trans "There are currently no wishes!" %}</div>
{% endif %}
</div>
<div class="mb-3">
<h2 class="h3">{% trans "Offers" %}</h2>
</div>
{% if offers %}
<div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 mt-3 mb-3 row-gap-5">
{% for offer in offers %}
<div class="col">
<div class="card h-100 p-0">
<a href="{% url 'offer_detail' offer.id %}">
{% if offer.image %}
<img class="card-img-top offer-img" src="{{ offer.image.url }}" />
{% else %}
<img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" />
{% endif %}
<div class="card-body">
<h5 class="h5">
{{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span>
</h5>
</div>
</a>
<div class="card-footer d-flex justify-content-between">
<a href="{% url 'user_detail' offer.user.id %}">
<i class="fas fa-user mt-3"></i> {{ offer.user.username }}
</a>
<p class="zip">
<i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipcode }}
</p>
</div>
</div>
</div>
{% endfor %}
</div>
{% else %}
<div class="alert alert-warning" role="alert">{% trans "There are currently no active offers" %}.</div>
{% endif %}
{% endblock %}