Add content card title by submenu
This commit is contained in:
@@ -75,7 +75,11 @@ function render_auth_home_page(array $user): void
|
||||
echo '<button class="sg-interaction-element sg-button sg-tab-button" type="button" role="tab" aria-selected="false" data-component-part="tab-button">Kontakte</button>';
|
||||
echo '</nav>';
|
||||
echo '</aside>';
|
||||
echo '<section class="sg-group-card sg-left-navigation-pattern__group-card sg-left-navigation-pattern__group-card--content" data-component="group-card" aria-hidden="true"></section>';
|
||||
echo '<section class="sg-group-card sg-left-navigation-pattern__group-card sg-left-navigation-pattern__group-card--content" data-component="group-card" aria-hidden="true">';
|
||||
echo '<div class="sg-group-card__header-row sg-left-navigation-pattern__header-row">';
|
||||
echo '<h2 class="sg-heading-h2 sg-text-on-dark sg-group-card__heading" data-left-navigation-content-title aria-live="polite">Bestellungen</h2>';
|
||||
echo '</div>';
|
||||
echo '</section>';
|
||||
echo '</div>';
|
||||
echo '</section>';
|
||||
echo '</section>';
|
||||
@@ -88,10 +92,12 @@ function render_auth_home_page(array $user): void
|
||||
echo "};";
|
||||
echo "const renderLeftNavigation = (moduleName) => {";
|
||||
echo " const title = document.querySelector('[data-left-navigation-title]');";
|
||||
echo " const contentTitle = document.querySelector('[data-left-navigation-content-title]');";
|
||||
echo " const menu = document.getElementById('left-navigation-menu');";
|
||||
echo " if (title) { title.textContent = moduleName; }";
|
||||
echo " if (!menu) { return; }";
|
||||
echo " const entries = portalModuleNavigation[moduleName] || [];";
|
||||
echo " if (contentTitle) { contentTitle.textContent = entries[0] || ''; }";
|
||||
echo " menu.innerHTML = '';";
|
||||
echo " entries.forEach((entry, index) => {";
|
||||
echo " const button = document.createElement('button');";
|
||||
@@ -108,6 +114,7 @@ function render_auth_home_page(array $user): void
|
||||
echo " menu.querySelectorAll('.sg-tab-button').forEach((otherButton) => {";
|
||||
echo " otherButton.setAttribute('aria-selected', String(otherButton === button));";
|
||||
echo " });";
|
||||
echo " if (contentTitle) { contentTitle.textContent = button.textContent.trim(); }";
|
||||
echo " });";
|
||||
echo " });";
|
||||
echo "};";
|
||||
|
||||
Reference in New Issue
Block a user