Skip to content

Commit

Permalink
[DURACOM-195] replace ul/li with div in navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-negretti committed Feb 26, 2024
1 parent 1fb742c commit abba806
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<li class="ds-menu-item-wrapper text-md-center" role="presentation"
<div class="ds-menu-item-wrapper text-md-center"
[id]="'expandable-navbar-section-' + section.id"
(mouseenter)="onMouseEnter($event, isActive)"
(mouseleave)="onMouseLeave($event, isActive)"
Expand All @@ -24,13 +24,13 @@
</span>
<i class="fas fa-caret-down fa-xs toggle-menu-icon" aria-hidden="true"></i>
</a>
<ul @slide *ngIf="isActive" (click)="deactivateSection($event)"
<div @slide *ngIf="isActive" (click)="deactivateSection($event)"
[id]="expandableNavbarSectionId(section.id)"
role="menu"
class="dropdown-menu show nav-dropdown-menu m-0 shadow-none border-top-0 px-3 px-md-0 pt-0 pt-md-1">
<li *ngFor="let subSection of (subSections$ | async)" class="text-nowrap" role="presentation">
<div *ngFor="let subSection of (subSections$ | async)" class="text-nowrap" role="presentation">
<ng-container
*ngComponentOutlet="(sectionMap$ | async).get(subSection.id).component; injector: (sectionMap$ | async).get(subSection.id).injector;"></ng-container>
</li>
</ul>
</li>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:host {
li.ds-menu-item-wrapper {
.ds-menu-item-wrapper {
position: relative; // align dropdown menu with respect to this element
}

Expand Down
7 changes: 3 additions & 4 deletions src/app/navbar/navbar-section/navbar-section.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<li role="presentation"
class="ds-menu-item-wrapper text-md-center"
[id]="'navbar-section-' + section.id">
<div class="ds-menu-item-wrapper text-md-center"
[id]="'navbar-section-' + section.id">
<ng-container *ngComponentOutlet="(sectionMap$ | async).get(section.id).component; injector: (sectionMap$ | async).get(section.id).injector;"></ng-container>
</li>
</div>
4 changes: 2 additions & 2 deletions src/app/navbar/navbar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<ng-container *ngIf="(isMobile$ | async) && (isAuthenticated$ | async)">
<ds-themed-user-menu [inExpandableNavbar]="true"></ds-themed-user-menu>
</ng-container>
<ul class="navbar-nav align-items-md-center mr-auto shadow-none gapx-3">
<div class="navbar-nav align-items-md-center mr-auto shadow-none gapx-3">
<ng-container *ngFor="let section of (sections | async)">
<ng-container
*ngComponentOutlet="(sectionMap$ | async).get(section.id)?.component; injector: (sectionMap$ | async).get(section.id)?.injector;"></ng-container>
</ng-container>
</ul>
</div>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/themes/dspace/app/navbar/navbar.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<ng-container *ngIf="(isMobile$ | async) && (isAuthenticated$ | async)">
<ds-user-menu [inExpandableNavbar]="true"></ds-user-menu>
</ng-container>
<ul class="navbar-nav h-100 align-items-md-stretch gapx-3" role="menubar">
<div class="navbar-nav h-100 align-items-md-stretch gapx-3" role="menubar">
<ng-container *ngFor="let section of (sections | async)">
<ng-container
*ngComponentOutlet="(sectionMap$ | async).get(section.id)?.component; injector: (sectionMap$ | async).get(section.id)?.injector;"></ng-container>
</ng-container>
</ul>
</div>

0 comments on commit abba806

Please sign in to comment.