diff --git a/docs/javascripts/extra.js b/docs/javascripts/extra.js index 4d0a8ab55f..06dafdbabd 100644 --- a/docs/javascripts/extra.js +++ b/docs/javascripts/extra.js @@ -20,7 +20,7 @@ const focusedElement = document.activeElement; const isMainContent = focusedElement && focusedElement.id === 'main-content'; const isSkipLink = focusedElement && focusedElement.classList.contains('skip-link'); - + if (!isMainContent && !isSkipLink) { // Reset focus to document body to ensure skiplink is first tab stop document.body.setAttribute('tabindex', '-1'); @@ -123,34 +123,34 @@ // Function to setup custom tooltips function setupCustomTooltip(element) { let originalTitle = element.getAttribute('title'); - + // Store original title in data attribute for CSS to use element.setAttribute('data-tooltip', originalTitle); - + // Remove title immediately to prevent native tooltip element.removeAttribute('title'); } - // Function to fix search result semantic structure + // Function to fix search result semantic structure // Converts h1 tags in search results to h2 for proper semantic hierarchy function fixSearchResultSemantics() { // Find all search result h1 tags within the search output area const searchResults = document.querySelectorAll('.md-search-result h1, .md-search-result__title'); - + searchResults.forEach(function(h1Element) { // Only convert h1 tags, not other elements with md-search-result__title class if (h1Element.tagName.toLowerCase() === 'h1') { // Create a new h2 element const h2Element = document.createElement('h2'); - + // Copy all attributes from h1 to h2 Array.from(h1Element.attributes).forEach(function(attr) { h2Element.setAttribute(attr.name, attr.value); }); - + // Copy all content from h1 to h2 h2Element.innerHTML = h1Element.innerHTML; - + // Replace h1 with h2 in the DOM h1Element.parentNode.replaceChild(h2Element, h1Element); } @@ -166,7 +166,7 @@ const parent = mark.parentNode; const textNode = document.createTextNode(mark.textContent); parent.replaceChild(textNode, mark); - + // Normalize the parent to merge adjacent text nodes parent.normalize(); }); diff --git a/docs/javascripts/hamburger-control.js b/docs/javascripts/hamburger-control.js index 31aea1bbaf..2a0c0d1bd6 100644 --- a/docs/javascripts/hamburger-control.js +++ b/docs/javascripts/hamburger-control.js @@ -4,16 +4,16 @@ function controlHamburgerMenu() { // Even more aggressive selector search const selectors = [ '.md-header__button[for="__drawer"]', - '.md-header__button.md-icon--menu', + '.md-header__button.md-icon--menu', '.md-nav__button', 'button[for="__drawer"]', '[data-md-component="navigation"]', '.md-header__button[type="button"]', '.md-header button' ]; - + const hamburgers = document.querySelectorAll(selectors.join(', ')); - + hamburgers.forEach(hamburger => { if (window.innerWidth > 800) { // Nuclear option - remove all possible CSS @@ -30,25 +30,25 @@ function controlHamburgerMenu() { console.log('Hamburger restored:', hamburger.className); } }); - + console.log('Screen width check:', window.innerWidth, 'Found hamburgers:', hamburgers.length); } - + // Initial check findAndHideHamburger(); - + // Listen for resize events window.addEventListener('resize', findAndHideHamburger); - + // Force check every 100ms to override any dynamic changes from Material Insiders const forceInterval = setInterval(findAndHideHamburger, 100); - + // Also watch for DOM mutations if (typeof MutationObserver !== 'undefined') { const observer = new MutationObserver(findAndHideHamburger); observer.observe(document.body, { childList: true, subtree: true }); } - + // Clear interval after 10 seconds to avoid performance impact setTimeout(() => clearInterval(forceInterval), 10000); } @@ -64,4 +64,4 @@ if (document.readyState === 'loading') { window.addEventListener('pageshow', controlHamburgerMenu); // Run again after a delay to catch any late-loading elements -setTimeout(controlHamburgerMenu, 1000); \ No newline at end of file +setTimeout(controlHamburgerMenu, 1000); diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index e332aa43a7..58634212e7 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -121,27 +121,27 @@ td { table, thead, tbody, th, td, tr { display: block !important; } - + thead tr { position: absolute !important; top: -9999px !important; left: -9999px !important; } - + tr { border: 1px solid #B9C7D5 !important; margin-bottom: 10px !important; padding: 10px !important; border-radius: 4px; } - + td { border: none !important; position: relative !important; padding-left: 50% !important; min-width: auto !important; } - + td:before { content: attr(data-label) ": " !important; position: absolute !important; @@ -762,7 +762,7 @@ font-size: 0.875rem !important; .responsive-grid-2 { grid-template-columns: 1fr !important; } - + .responsive-grid-3 { grid-template-columns: 1fr !important; } @@ -776,20 +776,20 @@ font-size: 0.875rem !important; /* WCAG AA: Make images scalable for 320px viewport */ @media (max-width: 320px) { - img, + img, .block-image, .md-header__button.md-logo img { max-width: 100% !important; height: auto !important; width: auto !important; } - + /* Ensure grid cards stack properly on very small screens */ .grid.cards { grid-template-columns: 1fr !important; gap: 8px !important; } - + /* Reduce padding for very small screens */ .float-child, .float-child-white { diff --git a/docs/stylesheets/navigation.css b/docs/stylesheets/navigation.css index 2dbe81ab68..b6b9d8f233 100644 --- a/docs/stylesheets/navigation.css +++ b/docs/stylesheets/navigation.css @@ -650,7 +650,7 @@ abbr[data-tooltip]:hover { position: static !important; z-index: auto !important; } - + .md-main { margin-top: 0 !important; } @@ -720,4 +720,3 @@ abbr[data-tooltip]:hover { display: none !important; } } - diff --git a/src/overrides/hooks/lists.py b/src/overrides/hooks/lists.py index 00b30ec282..8f68b59bdb 100644 --- a/src/overrides/hooks/lists.py +++ b/src/overrides/hooks/lists.py @@ -450,14 +450,17 @@ def generate_filters( has_search = filter_options.get("search", True) has_column_filters = len(column_filters_html) > 0 has_ai_act_labels = filter_options.get("ai-act-labels", False) - has_export = should_show_export(current_file) and content_type in ["vereisten", "maatregelen"] + has_export = should_show_export(current_file) and content_type in [ + "vereisten", + "maatregelen", + ] has_any_filters = has_search or has_column_filters or has_ai_act_labels # Only add wrapper div if there are actually filters to show if has_any_filters: wrapper_class = "filter-wrapper" filters.append( - f'
' + f'
' ) filters.append('
') @@ -487,7 +490,9 @@ def generate_filters( # AI-act labels info as separate div below the filter container if has_ai_act_labels: - filters.append("
") + filters.append( + "
" + ) filters.append( "" ) diff --git a/src/overrides/main.html b/src/overrides/main.html index 03af978442..2cf7da16d5 100644 --- a/src/overrides/main.html +++ b/src/overrides/main.html @@ -18,4 +18,4 @@ {% block content %}{{ super() }}{% endblock %}
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/src/overrides/partials/footer.html b/src/overrides/partials/footer.html index 1d92d61d12..ff75b3fb8d 100644 --- a/src/overrides/partials/footer.html +++ b/src/overrides/partials/footer.html @@ -7,18 +7,21 @@