From 8a520b11d60ebb64759e1659303059844a6ff079 Mon Sep 17 00:00:00 2001 From: Krzysiej Date: Sun, 1 Mar 2026 10:46:47 +0100 Subject: [PATCH] Add footer with switch. --- templates/footer.html.twig | 9 ++++++ templates/template.html.twig | 59 +++--------------------------------- 2 files changed, 13 insertions(+), 55 deletions(-) create mode 100644 templates/footer.html.twig diff --git a/templates/footer.html.twig b/templates/footer.html.twig new file mode 100644 index 0000000..8eabd46 --- /dev/null +++ b/templates/footer.html.twig @@ -0,0 +1,9 @@ +
+ +
\ No newline at end of file diff --git a/templates/template.html.twig b/templates/template.html.twig index ed6fede..e216a28 100644 --- a/templates/template.html.twig +++ b/templates/template.html.twig @@ -34,21 +34,13 @@ return } - const themeSwitcherText = document.querySelector('#bd-theme-text') - const activeThemeIcon = document.querySelector('.theme-icon-active use') const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`) - const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href') document.querySelectorAll('[data-bs-theme-value]').forEach(element => { element.classList.remove('active') - element.setAttribute('aria-pressed', 'false') }) btnToActive.classList.add('active') - btnToActive.setAttribute('aria-pressed', 'true') - activeThemeIcon.setAttribute('href', svgOfActiveBtn) - const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})` - themeSwitcher.setAttribute('aria-label', themeSwitcherLabel) if (focus) { themeSwitcher.focus() @@ -124,53 +116,9 @@ class="badge text-bg-secondary">{{ discontinuedCount() }} {% endcache %} - + {# #}