Refactor group display in home template to use articles for better structure and styling

This commit is contained in:
Edgar P. Burkhart 2025-06-13 23:58:24 +02:00
parent 6ada3290c8
commit 43ba52f31e
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 26 additions and 12 deletions

View file

@ -19,3 +19,15 @@ i.owner {
.template { .template {
display: none; display: none;
} }
a.group {
text-decoration: none;
}
.group-owner, .group i {
margin-left: .5rem;
}
.group-owner {
color: var(--pico-color-zinc-500);
}

View file

@ -7,16 +7,18 @@
{% endif %} {% endif %}
</p> </p>
{% if user.owned_group_set.exists or user.group_set.exists %} {% if user.owned_group_set.exists or user.group_set.exists %}
<ul> {% for group in user.owned_group_set.all %}
{% for group in user.owned_group_set.all %} <a class="group" href="{{ group.get_absolute_url }}">
<li> <article>
<a href="{{ group.get_absolute_url }}">{{ group.name }}</a> <i class="ri-vip-crown-fill owner"></i> {{ group.name }} <i class="ri-vip-crown-fill owner"></i>
</li> </article>
{% endfor %} </a>
{% for group in user.group_set.all %} {% endfor %}
<li> {% for group in user.group_set.all %}
<a href="{{ group.get_absolute_url }}">{{ group.name }}</a> <a class="group" href="{{ group.get_absolute_url }}">
</li> <article>
{% endfor %} {{ group.name }} <span class="group-owner">{{ group.owner }}</span>
</ul> </article>
</a>
{% endfor %}
{% endif %} {% endif %}