remove unused files

This commit is contained in:
tophf 2022-01-18 17:23:51 +03:00
parent 0705392fb2
commit f7729eac15
2 changed files with 0 additions and 47 deletions

View File

@ -1,28 +0,0 @@
.tab-container {
display: flex;
flex-direction: column;
}
.tab-bar {
display: flex;
flex-direction: row;
border-bottom: 1px solid silver;
padding: 5px 5px 0 15px;
}
.tab-bar-item {
margin: 0 0.3em;
padding: 0.3em 0.6em;
border: 1px solid silver;
border-bottom: none;
background: silver;
cursor: pointer;
}
.tab-bar-item.active {
background: white;
}
.tab-panel {
flex-grow: 1;
}
.tab-panel > :not(.active) {
display: none;
}

View File

@ -1,19 +0,0 @@
'use strict';
(() => {
for (const container of document.querySelectorAll('.tab-container')) {
init(container);
}
function init(container) {
const tabButtons = [...container.querySelector('.tab-bar').children];
const tabPanels = [...container.querySelector('.tab-panel').children];
tabButtons.forEach((button, i) => button.addEventListener('click', () => activate(i)));
function activate(index) {
const toggleActive = (button, i) => button.classList.toggle('active', i === index);
tabButtons.forEach(toggleActive);
tabPanels.forEach(toggleActive);
}
}
})();