Fix all tab content being changed at once

This commit is contained in:
2022-08-29 17:23:33 +01:00
parent b6ca84c7a5
commit ae2004090c
10 changed files with 90 additions and 66 deletions

View File

@@ -1,8 +1,15 @@
{% load index %}
{% load static %}
<div class="tabs is-toggle is-fullwidth is-info" id="tabs">
<link rel ="stylesheet" href="{% static 'tabs.css' %}">
<script src="{% static 'tabs.js' %}"></script>
<style>
#tab-content-{{ unique }} div {
display: none;
}
#tab-content-{{ unique }} div.is-active {
display: block;
}
</style>
<div class="tabs is-toggle is-fullwidth is-info" id="tabs-{{ unique }}">
<ul>
<li class="is-active" data-tab="1">
<a>
@@ -30,7 +37,7 @@
</li>
</ul>
</div>
<div id="tab-content">
<div id="tab-content-{{ unique }}">
<div class="is-active" data-content="1">
<h4 class="subtitle is-4">Channels for {{ nick }} on {{ net }}</h4>
{% for channel in chans %}
@@ -95,5 +102,6 @@
</a>
{% endfor %}
</div>
<script>initTabs("{{ unique }}");</script>
</div>
<script src="{% static 'tabs.js' %}"></script>