Desktop Tab-Grid: Gesundheit (5 Sp.), Admin (4 Sp.), Karte-Legende (8 Sp.), SW by-v332
This commit is contained in:
parent
7ac421fcf9
commit
c503737fb1
6 changed files with 50 additions and 2 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '319'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '320'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
|
||||
const App = (() => {
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ window.Page_admin = (() => {
|
|||
<div id="adm-content"></div>
|
||||
`;
|
||||
|
||||
_container.querySelector('#adm-tabs')
|
||||
?.style.setProperty('--adm-tab-cols', Math.ceil(TABS.length / 2));
|
||||
_container.querySelectorAll('#adm-tabs .by-tab').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
_tab = btn.dataset.tab;
|
||||
|
|
|
|||
|
|
@ -290,6 +290,8 @@ window.Page_health = (() => {
|
|||
${t.icon} ${t.label}
|
||||
</button>
|
||||
`).join('');
|
||||
const count = tabsEl.querySelectorAll('.by-tab').length;
|
||||
tabsEl.style.setProperty('--health-tab-cols', Math.ceil(count / 2));
|
||||
tabsEl.querySelectorAll('.by-tab').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
_activeTab = btn.dataset.tab;
|
||||
|
|
|
|||
|
|
@ -231,6 +231,10 @@ window.Page_map = (() => {
|
|||
</div>
|
||||
`;
|
||||
|
||||
const legendBtns = Object.keys(TYPEN).filter(k => k !== 'giftkoeder').length + 1; // +1 Alle-Btn
|
||||
document.getElementById('map-legend')
|
||||
?.style.setProperty('--map-legend-cols', Math.ceil(legendBtns / 2));
|
||||
|
||||
document.getElementById('map-legend').addEventListener('click', e => {
|
||||
const btn = e.target.closest('.map-legend-btn');
|
||||
if (!btn) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue