From f7729eac155fd08b3fc208346c12c3f49da9036d Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 18 Jan 2022 17:23:51 +0300 Subject: [PATCH] remove unused files --- edit/tab.css | 28 ---------------------------- edit/tab.js | 19 ------------------- 2 files changed, 47 deletions(-) delete mode 100644 edit/tab.css delete mode 100644 edit/tab.js diff --git a/edit/tab.css b/edit/tab.css deleted file mode 100644 index 7b581cfa..00000000 --- a/edit/tab.css +++ /dev/null @@ -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; -} - diff --git a/edit/tab.js b/edit/tab.js deleted file mode 100644 index 887a6e3a..00000000 --- a/edit/tab.js +++ /dev/null @@ -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); - } - } -})();