Browse Source

Onglets fonctionnels

master
Matthieu Marcillaud 9 months ago
parent
commit
fbf7634153
  1. 19
      templates/autodoc.css
  2. 6
      templates/index.html.twig

19
templates/autodoc.css

@ -162,12 +162,19 @@ td.links a + a:before {
display: none;
}
.tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child,
.tabset > input:nth-child(3):checked ~ .tab-panels > .tab-panel:nth-child(2),
.tabset > input:nth-child(5):checked ~ .tab-panels > .tab-panel:nth-child(3),
.tabset > input:nth-child(7):checked ~ .tab-panels > .tab-panel:nth-child(4),
.tabset > input:nth-child(9):checked ~ .tab-panels > .tab-panel:nth-child(5),
.tabset > input:nth-child(11):checked ~ .tab-panels > .tab-panel:nth-child(6) {
/* First is "All opens" */
.tabset > input[data-index="0"]:checked ~ .tab-panels > .tab-panel {
display: block;
}
.tabset > input[data-index="1"]:checked ~ .tab-panels > .tab-panel[data-index="1"],
.tabset > input[data-index="2"]:checked ~ .tab-panels > .tab-panel[data-index="2"],
.tabset > input[data-index="3"]:checked ~ .tab-panels > .tab-panel[data-index="3"],
.tabset > input[data-index="4"]:checked ~ .tab-panels > .tab-panel[data-index="4"],
.tabset > input[data-index="5"]:checked ~ .tab-panels > .tab-panel[data-index="5"],
.tabset > input[data-index="6"]:checked ~ .tab-panels > .tab-panel[data-index="6"],
.tabset > input[data-index="7"]:checked ~ .tab-panels > .tab-panel[data-index="7"],
.tabset > input[data-index="8"]:checked ~ .tab-panels > .tab-panel[data-index="8"],
.tabset > input[data-index="9"]:checked ~ .tab-panels > .tab-panel[data-index="9"] {
display: block;
}

6
templates/index.html.twig

@ -39,11 +39,11 @@
<div class='container'>
<div class="content" id="content">
<div class="tabset">
<input type="radio" name="tabset" id="tab0" aria-controls="tous" checked>
<input type="radio" name="tabset" id="tab0" aria-controls="tous" checked data-index="0">
<label for="tab0">Tous</label>
{% for organization, name in organizations %}
{% if groups[organization] %}
<input type="radio" name="tabset" id="tab{{ loop.index }}" aria-controls="{{ name|slug }}">
<input type="radio" name="tabset" id="tab{{ loop.index }}" aria-controls="{{ name|slug }}" data-index="{{ loop.index }}">
<label for="tab{{ loop.index }}">{{ name }}</label>
{% endif %}
{% endfor %}
@ -51,7 +51,7 @@
<div class="tab-panels">
{% for organization, name in organizations %}
{% if groups[organization] %}
<section id="marzen" class="tab-panel">
<section id="marzen" class="tab-panel" data-index="{{ loop.index }}">
<h2>{{ name }}</h2>
<table class="table">
<thead>

Loading…
Cancel
Save