Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
madoc:testveneta [2022/11/25 11:02] andreeva-v créée |
madoc:testveneta [2023/01/25 16:31] andreeva-v supprimée |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
< | < | ||
+ | < | ||
< | < | ||
- | | + | .tabs ul{ |
- | font-size: 20px; | + | display: |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | font-size: 20px; | ||
+ | | ||
} | } | ||
- | .tabs .tab-registers | + | .tabs ul li{ |
- | | + | width:calc(100%/3); |
- | background-color: | + | |
- | | + | |
} | } | ||
- | .tabs button | + | .first-level-tab-results{ |
- | | + | |
- | | + | |
+ | } | ||
+ | a{ | ||
+ | text-decoration: none; | ||
} | } | ||
- | .tab-registers button{ | + | .tab-content |
- | display:flex; | + | |
- | flex-wrap: | + | |
- | width: | + | |
- | min-height: | + | |
- | background-color:# | + | |
- | } | + | |
- | + | ||
- | .tabs .tab-registers button: | + | |
- | cursor: pointer; | + | |
- | background-color: | + | |
- | color:black; | + | |
} | } | ||
- | .tabs .tab-bodies | + | .is-active |
- | | + | |
- | background-color: | + | |
- | flex-grow: 1; | + | |
- | overflow-y: auto; | + | |
- | | + | |
- | flex-direction: | + | |
- | flex-wrap: | + | |
- | align-content: | + | |
- | | + | |
} | } | ||
- | .tabs button.active-tab { | + | section |
- | background-color: | + | |
+ | flex-direction: | ||
+ | justify-content: | ||
+ | | ||
+ | margin:0; | ||
+ | padding: 1.5em; | ||
+ | min-height: 8em; | ||
+ | } | ||
+ | |||
+ | .sub-tab-content{ | ||
+ | background-color: | ||
+ | padding: | ||
+ | } | ||
+ | |||
+ | body { | ||
+ | padding: 20px; | ||
} | } | ||
</ | </ | ||
+ | < | ||
- | <div class=" | + | <div class=" |
- | <div class=" | + | <nav class=" |
- | <button | + | <ul> |
- | <button> | + | <li class=" |
- | <button>Créer des ressources et les organiser</ | + | <li><a href="# |
- | <button>Créer des activités | + | <li><a href="# |
- | <button>Animer mon espace et suivre l' | + | <li><a href="# |
- | <button>Réinitialiser | + | <li><a href="# |
- | </div> | + | <li><a href="# |
- | <div class=" | + | </ul> |
- | <div class=" | + | </nav> |
- | <button> | + | |
- | <button>Gérer les utilisateurs</button> | + | <div class=" |
- | </div> | + | <section |
- | < | + | |
- | | + | |
- | </div> | + | < |
- | <div style="display: | + | <li><a href="# |
- | | + | < |
- | </div> | + | </ul> |
- | </ | + | < |
+ | |||
+ | | ||
+ | Sub-Section One</section> | ||
+ | |||
+ | <section class="tab-content" | ||
+ | | ||
+ | | ||
+ | | ||
+ | Section Three</section> | ||
+ | | ||
+ | | ||
+ | |||
+ | <section class=" | ||
+ | Section Two</ | ||
+ | |||
+ | <section class=" | ||
+ | Section Three</ | ||
+ | |||
+ | | ||
</ | </ | ||
+ | </ | ||
+ | |||
< | < | ||
- | Array.from(document.querySelectorAll('.tabs')).forEach((tab_container, | + | const tabs = document.querySelectorAll(".my-tabs .tabs li"); |
- | const registers | + | const sections |
- | const bodies | + | const subTabs |
- | + | const subSections = document.querySelectorAll(".sub-tab-content .tab-content" | |
- | Array.from(registers.children).forEach((el, i) => { | + | |
- | | + | tabs.forEach(tab => { |
- | bodies.children[i]? | + | tab.addEventListener("click", e => { |
- | + | e.preventDefault(); | |
- | el.addEventListener('click', (ev) => { | + | |
- | let activeRegister = registers.querySelector(' | + | |
- | | + | }); |
- | activeRegister = el; | + | |
- | | + | |
- | changeBody(registers, | + | |
- | }) | + | |
- | }) | + | |
}) | }) | ||
+ | subTabs.forEach(tab => { | ||
+ | tab.addEventListener(" | ||
+ | e.preventDefault(); | ||
+ | removeActiveSubTab(); | ||
+ | addActiveTab(tab); | ||
+ | }); | ||
+ | }) | ||
- | function changeBody(registers, bodies, activeRegister) { | + | const removeActiveTab = () => { |
- | Array.from(registers.children).forEach((el, i) => { | + | tabs.forEach(tab => { |
- | if (bodies.children[i]) { | + | tab.classList.remove(" |
- | | + | }); |
- | } | + | sections.forEach(section |
+ | | ||
+ | }); | ||
+ | } | ||
- | el.setAttribute(' | + | const removeActiveSubTab = () => { |
- | }) | + | subTabs.forEach(subTab |
+ | subTab.classList.remove(" | ||
+ | }); | ||
+ | subSections.forEach(subSection => { | ||
+ | | ||
+ | | ||
} | } | ||
+ | |||
+ | const addActiveTab = tab => { | ||
+ | tab.classList.add(" | ||
+ | const href = tab.querySelector(" | ||
+ | const matchingSection = document.querySelector(href); | ||
+ | matchingSection.classList.add(" | ||
+ | } | ||
+ | |||
</ | </ | ||
</ | </ | ||
- | ====Découvrir et paramétrer mon espace d' | + | |
- | <columns 100% 33%> | + | |
- | <box round #fff #3452ff #3452ff #3452ff 90%|\\ **Accéder à un espace de cours**\\ \\ > | + | |
- | * :!: [[madoc: | + | |
- | * [[madoc: | + | |
- | * [[madoc: | + | |
- | </ | + | |
- | <box round #fff #3452ff #3452ff #3452ff 90%|\\ **Gérer les utilisateurs**\\ \\ > | + | |
- | * [[madoc: | + | |
- | * [[madoc: | + | |
- | * [[madoc: | + | |
- | * [[madoc: | + | |
- | * [[madoc: | + | |
- | </ | + | |
- | < | + |