redesign the layout

This commit is contained in:
2021-01-30 07:09:36 +01:00
parent 58732af339
commit da6fb57ff4
3 changed files with 83 additions and 53 deletions
+4
View File
@@ -11,3 +11,7 @@ input, textarea {
h3 {
padding-top: 30px;
}
div.tab-pane h4 {
font-size: 14px;
font-weight: 600;
}
+8 -2
View File
@@ -5,10 +5,16 @@
tabButtons.map(function(button) {
button.addEventListener('click', function() {
active = document.querySelector('li a.active.button')
// only get the active buttons from the current tabs control
tabnav = button.closest('ul.tab-nav');
active = document.querySelector('#' + tabnav.id + ' li a.active.button')
if (active) active.classList.remove('active');
button.classList.add('active');
active = document.querySelector('.tab-pane.active')
// only get the active panes from the current tabs control
tabcontent = tabnav.nextSibling.nextSibling
active = document.querySelector('#' + tabcontent.id + ' .tab-pane.active')
if (active) active.classList.remove('active');
document.querySelector(button.getAttribute('href')).classList.add('active');
})