Update theme styles, scripts, and front page template
This commit is contained in:
@@ -9,3 +9,25 @@
|
||||
toggle.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
|
||||
});
|
||||
})();
|
||||
|
||||
(function () {
|
||||
var tabs = document.querySelectorAll('.showcase-tab');
|
||||
if (!tabs.length) return;
|
||||
|
||||
tabs.forEach(function (tab) {
|
||||
tab.addEventListener('click', function () {
|
||||
var targetId = tab.getAttribute('data-tab-target');
|
||||
|
||||
tabs.forEach(function (t) {
|
||||
t.classList.remove('is-active');
|
||||
t.setAttribute('aria-selected', 'false');
|
||||
});
|
||||
tab.classList.add('is-active');
|
||||
tab.setAttribute('aria-selected', 'true');
|
||||
|
||||
document.querySelectorAll('.showcase-panel').forEach(function (panel) {
|
||||
panel.classList.toggle('is-active', panel.id === 'tab-' + targetId);
|
||||
});
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user