Refactor group display in home template to use articles for better structure and styling
This commit is contained in:
parent
6ada3290c8
commit
43ba52f31e
2 changed files with 26 additions and 12 deletions
|
@ -19,3 +19,15 @@ i.owner {
|
|||
.template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.group {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.group-owner, .group i {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
|
||||
.group-owner {
|
||||
color: var(--pico-color-zinc-500);
|
||||
}
|
||||
|
|
|
@ -7,16 +7,18 @@
|
|||
{% endif %}
|
||||
</p>
|
||||
{% if user.owned_group_set.exists or user.group_set.exists %}
|
||||
<ul>
|
||||
{% for group in user.owned_group_set.all %}
|
||||
<li>
|
||||
<a href="{{ group.get_absolute_url }}">{{ group.name }}</a> <i class="ri-vip-crown-fill owner"></i>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for group in user.group_set.all %}
|
||||
<li>
|
||||
<a href="{{ group.get_absolute_url }}">{{ group.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% for group in user.owned_group_set.all %}
|
||||
<a class="group" href="{{ group.get_absolute_url }}">
|
||||
<article>
|
||||
{{ group.name }} <i class="ri-vip-crown-fill owner"></i>
|
||||
</article>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% for group in user.group_set.all %}
|
||||
<a class="group" href="{{ group.get_absolute_url }}">
|
||||
<article>
|
||||
{{ group.name }} <span class="group-owner">{{ group.owner }}</span>
|
||||
</article>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue