Add tags for number of users and channels

This commit is contained in:
2022-07-21 13:51:48 +01:00
parent eb039af9f2
commit f0c548db6f
6 changed files with 79 additions and 7 deletions

View File

@@ -1,3 +1,5 @@
{% load index %}
<script>
var modal = document.querySelector('.modal'); // assuming you have only 1
var html = document.querySelector('html');
@@ -67,6 +69,11 @@
<i class="fa-solid fa-hashtag" aria-hidden="true"></i>
</span>
{{ channel }}
{% if nick in num_chans %}
<span class="tag">
{{ num_users|index:channel }}
</span>
{% endif %}
</a>
{% endfor %}
</div>
@@ -78,6 +85,11 @@
<i class="fa-solid fa-user" aria-hidden="true"></i>
</span>
{{ user }}
{% if channel in num_users %}
<span class="tag">
{{ num_chans|index:user }}
</span>
{% endif %}
</a>
{% endfor %}
</div>