diff --git a/Assets/css/index.css b/Assets/css/index.css index b69ba21..2d42862 100644 --- a/Assets/css/index.css +++ b/Assets/css/index.css @@ -784,4 +784,28 @@ li.jobguide_menu_list:hover > ul.jobguide_sub_menu { } #sortText { padding-right: 5px; +} + +/* search */ +.search { + background: var(--tank-color); + margin: 5px; + border-radius: 5px; + color: white; + font-size: 12px; +} +.search a { + line-height: 32px; + padding: 0 10px; +} +#searchInput { + border: 0; + background: var(--tank-AltColor); + height: 25px; + color: white; + border-radius: 10px; + padding: 0 15px; +} +input::placeholder { + color: white; } \ No newline at end of file diff --git a/Assets/js/main.js b/Assets/js/main.js index 07984b5..00b86df 100644 --- a/Assets/js/main.js +++ b/Assets/js/main.js @@ -201,7 +201,7 @@ function WarningFunctions() { } WarningFunctions(); // Debug -let DebugEnabled = false; +let DebugEnabled = true; function DebugFunctions() { if (!DebugEnabled) return; @@ -230,4 +230,39 @@ function DebugFunctions() { } }); } -DebugFunctions(); \ No newline at end of file +DebugFunctions(); + +// Search +function toggleSearch() { + const tbody = document.querySelector('tbody[data-search]'); + const searchContainer = document.querySelector('.search'); + + if (tbody?.dataset.search === "true") { + searchContainer.style.display = ''; + } else { + searchContainer.style.display = 'none'; + } +} + +function searchTable(event) { + const query = event.target.value.toLowerCase(); + const tbody = document.querySelector('tbody[data-search="true"]'); + + if (!tbody) return; + + tbody.querySelectorAll('tr').forEach(row => { + const skillName = row.querySelector('.skill p strong')?.textContent.toLowerCase() || ''; + + row.style.display = skillName.includes(query) ? '' : 'none'; + }); +} + +function initSearch() { + toggleSearch(); + + const searchInput = document.getElementById('searchInput'); + if (searchInput) { + searchInput.addEventListener('input', searchTable); + } +} +initSearch(); \ No newline at end of file diff --git a/Page/BLU.html b/Page/BLU.html index cd1295f..5b8e52c 100644 --- a/Page/BLU.html +++ b/Page/BLU.html @@ -429,6 +429,10 @@
Эффект |
-
+
---|