Updates to accordion

This commit is contained in:
hiromipaw 2018-01-22 16:13:52 +01:00
parent a59c4e184a
commit 3c4877bdfd
10 changed files with 68 additions and 75 deletions

View File

@ -1,20 +1,20 @@
<div class="item">
<div id="censorship" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#censorship" data-target="#censorship" role="button" aria-expanded="true" aria-controls="censorship">
Censorship
</a>
</h3>
<div id="censorship" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="censorshipAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#censorship" role="button" aria-expanded="true" aria-controls="censorship">
Censorship
</a>
</h3>
{% set censorshipbag = 'censorship+' + this.alt %}
{% for id, item in bag(censorshipbag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#censorshipAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" href="{{ item.id }}" data-target="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#censorshipAccordion">
{{ item.description|safe }}
</div>
</div>

View File

@ -1,20 +1,20 @@
<div class="item">
<div id="connecting-to-tor" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#connecting-to-tor" data-target="#connecting-to-tor" role="button" aria-expanded="true" aria-controls="connecting-to-tor">
Connecting To Tor
</a>
</h3>
<div id="connecting-to-tor" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="connecting-to-torAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#connecting-to-tor" role="button" aria-expanded="true" aria-controls="connecting-to-tor">
Connecting To Tor
</a>
</h3>
{% set connbag = 'connecting+' + this.alt %}
{% for id, item in bag(connbag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#connecting-to-torAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" href="{{ item.id }}" data-target="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#connecting-to-torAccordion">
{{ item.description|safe }}
</div>
</div>

View File

@ -1,20 +1,20 @@
<div class="item">
<div id="faq" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#faq" role="button" data-target="#faq" aria-expanded="true" aria-controls="faq">
Most Frequently Asked Questions
</a>
</h3>
<div id="faq" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="faqAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#faq" role="button" aria-expanded="true" aria-controls="faq">
Most Frequently Asked Questions
</a>
</h3>
{% set faqbag = 'faq+' + this.alt %}
{% for id, item in bag(faqbag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#faqAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" href="{{ item.id }}" data-target="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#faqAccordion">
{{ item.description|safe }}
</div>
</div>

View File

@ -9,13 +9,7 @@
$(document).ready(function(){
var hideAll = function() {
$('.collapse').collapse();
};
$.when( hideAll() ).done( function() {
$('#faq').addClass('show');
} );
$('.collapse').collapse();
});
</script>

View File

@ -1,21 +1,20 @@
<div class="item">
<div id="gettor" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#gettor" role="button" data-target="#gettor" aria-expanded="true" aria-controls="gettor">
GetTor
</a>
</h3>
<div id="gettor" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="gettorAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#gettor" role="button" aria-expanded="true" aria-controls="gettor">
GetTor
</a>
</h3>
{% set gettorbag = 'gettor+' + this.alt %}
{% for id, item in bag(gettorbag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#gettorAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" href="{{ item.id }}" data-target="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#gettorAccordion">
{{ item.description|safe }}
</div>
</div>

View File

@ -1,20 +1,20 @@
<div class="item">
<div id="https" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#https" role="button" data-target="#https" aria-expanded="true" aria-controls="https">
Https
</a>
</h3>
<div id="https" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="httpsAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#https" role="button" aria-expanded="true" aria-controls="https">
Https
</a>
</h3>
{% set httpsbag = 'https+' + this.alt %}
{% for id, item in bag(httpsbag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#httpsAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" href="{{ item.id }}" data-target="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#httpsAccordion">
{{ item.description|safe }}
</div>
</div>

View File

@ -1,20 +1,20 @@
<div class="item">
<div id="tor-messenger" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#tor-messenger" role="button" data-target="#tor-messenger" aria-expanded="true" aria-controls="tor-messenger">
Tor Messenger
</a>
</h3>
<div id="tor-messenger" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="tor-messengerAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#tor-messenger" role="button" aria-expanded="true" aria-controls="tor-messenger">
Tor Messenger
</a>
</h3>
{% set msgbag = 'tormessenger+' + this.alt %}
{% for id, item in bag(msgbag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#tor-messengerAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" data-target="{{ item.id }}" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#tor-messengerAccordion">
{{ item.description|safe }}
</div>
</div>

View File

@ -4,7 +4,7 @@
{% set topicbag = 'topics+' + this.alt %}
{% for id, item in bag(topicbag).items() %}
<li{% if this.is_child_of(item.path) %} class="toc-entry toc-h2 active" {% else %} class="toc-entry toc-h2"{% endif %}>
<a data-toggle="collapse" role="button" aria-controls="{{ item.control }}" class="nav-link" href="{{ item.path }}">{{ item.label }}</a>
<a data-toggle="collapse" role="button" data-target="{{ item.path }}" aria-controls="{{ item.control }}" class="nav-link" href="{{ item.path }}">{{ item.label }}</a>
</li>
{% endfor %}

View File

@ -1,25 +1,25 @@
<div class="item">
<div id="tor-browser" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#tor-browser" role="button" data-target="#tor-browser" aria-expanded="true" aria-controls="tor-browser">
Tor Browser
</a>
</h3>
<div id="tor-browser" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="tor-browserAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#tor-browser" role="button" aria-expanded="true" aria-controls="tor-browser">
Tor Browser
</a>
</h3>
{% set tbbbag = 'tbb+' + this.alt %}
{% for id, item in bag(tbbbag).items() %}
<div class="question">
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#tor-browserAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" href="{{ item.id }}" data-target="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" data-parent="#tor-browserAccordion" class="collapse show" role="tabpanel">
{{ item.description|safe }}
</div>
</div>
{% endfor %}
{% endfor %}
</div>

View File

@ -1,20 +1,20 @@
<div class="item">
<div id="tor-mobile" class="collapse show" role="tabpanel">
<h3 class="text-primary">
<a data-toggle="collapse" href="#tor-mobile" data-target="#tor-mobile" role="button" aria-expanded="true" aria-controls="tor-mobile">
Tor Mobile
</a>
</h3>
<div id="tor-mobile" class="collapse show" role="tabpanel" data-parent="#topics">
<div id="tor-mobileAccordion" data-children=".question">
<h3 class="text-primary">
<a data-toggle="collapse" data-parent="#topics" href="#tor-mobile" role="button" aria-expanded="true" aria-controls="tor-mobile">
Tor Mobile
</a>
</h3>
{% set tormobilebag = 'tormobile+' + this.alt %}
{% for id, item in bag(tormobilebag).items() %}
<div class="question">
<h4 class="text-primary">
<a data-toggle="collapse" data-parent="#tor-mobileAccordion" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
<a data-toggle="collapse" data-target="{{ item.id }}" href="{{ item.id }}" role="button" aria-expanded="true" aria-controls="{{ item.control }}">
{{ item.title }}
</a>
</h4>
<div id="{{ item.control }}" class="collapse show" role="tabpanel">
<div id="{{ item.control }}" class="collapse show" role="tabpanel" data-parent="#tor-mobileAccordion">
{{ item.description|safe }}
</div>
</div>