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 {
|
.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);
|
||||||
|
}
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue