mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
81901: Menu item components as ul > li
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<li class="sidebar-section">
|
||||
<div class="sidebar-section">
|
||||
<a href="javascript:void(0);" class="nav-item nav-link shortcut-icon" attr.aria-labelledby="sidebarName-{{section.id}}" [title]="('menu.section.icon.' + section.id) | translate" [routerLink]="itemModel.link">
|
||||
<i class="fas fa-{{section.icon}} fa-fw"></i>
|
||||
</a>
|
||||
@@ -7,4 +7,4 @@
|
||||
<a class="nav-item nav-link" tabindex="-1" [routerLink]="itemModel.link">{{itemModel.text | translate}}</a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
@@ -10,7 +10,8 @@ import { MenuSection } from '../../../shared/menu/menu.reducer';
|
||||
* Represents a non-expandable section in the admin sidebar
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-admin-sidebar-section',
|
||||
/* tslint:disable:component-selector */
|
||||
selector: 'li[ds-admin-sidebar-section]',
|
||||
templateUrl: './admin-sidebar-section.component.html',
|
||||
styleUrls: ['./admin-sidebar-section.component.scss'],
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<li class="sidebar-section" [ngClass]="{'expanded': (expanded | async)}"
|
||||
<div class="sidebar-section" [ngClass]="{'expanded': (expanded | async)}"
|
||||
[@bgColor]="{
|
||||
value: ((expanded | async) ? 'endBackground' : 'startBackground'),
|
||||
params: {endColor: (sidebarActiveBg | async)}}">
|
||||
@@ -24,4 +24,4 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</div>
|
||||
|
@@ -14,7 +14,8 @@ import { rendersSectionForMenu } from '../../../shared/menu/menu-section.decorat
|
||||
* Represents a expandable section in the sidebar
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-expandable-admin-sidebar-section',
|
||||
/* tslint:disable:component-selector */
|
||||
selector: 'li[ds-expandable-admin-sidebar-section]',
|
||||
templateUrl: './expandable-admin-sidebar-section.component.html',
|
||||
styleUrls: ['./expandable-admin-sidebar-section.component.scss'],
|
||||
animations: [rotate, slide, bgColor]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<li class="nav-item dropdown"
|
||||
<div class="nav-item dropdown expandable-navbar-section"
|
||||
(keyup.enter)="activateSection($event)"
|
||||
(mouseenter)="activateSection($event)"
|
||||
(mouseleave)="deactivateSection($event)">
|
||||
@@ -15,4 +15,4 @@
|
||||
*ngComponentOutlet="(sectionMap$ | async).get(subSection.id).component; injector: (sectionMap$ | async).get(subSection.id).injector;"></ng-container>
|
||||
</ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
|
@@ -11,7 +11,8 @@ import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'
|
||||
* Represents an expandable section in the navbar
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-expandable-navbar-section',
|
||||
/* tslint:disable:component-selector */
|
||||
selector: 'li[ds-expandable-navbar-section]',
|
||||
templateUrl: './expandable-navbar-section.component.html',
|
||||
styleUrls: ['./expandable-navbar-section.component.scss'],
|
||||
animations: [slide]
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<li class="nav-item">
|
||||
<div class="nav-item navbar-section">
|
||||
<ng-container
|
||||
*ngComponentOutlet="(sectionMap$ | async).get(section.id).component; injector: (sectionMap$ | async).get(section.id).injector;"></ng-container>
|
||||
</li>
|
||||
</div>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Component, Inject, Injector, OnInit } from '@angular/core';
|
||||
import { Component, HostBinding, Inject, Injector, OnInit } from '@angular/core';
|
||||
import { MenuSectionComponent } from '../../shared/menu/menu-section/menu-section.component';
|
||||
import { MenuService } from '../../shared/menu/menu.service';
|
||||
import { MenuID } from '../../shared/menu/initial-menus-state';
|
||||
@@ -8,7 +8,8 @@ import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'
|
||||
* Represents a non-expandable section in the navbar
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-navbar-section',
|
||||
/* tslint:disable:component-selector */
|
||||
selector: 'li[ds-navbar-section]',
|
||||
templateUrl: './navbar-section.component.html',
|
||||
styleUrls: ['./navbar-section.component.scss']
|
||||
})
|
||||
|
@@ -23,8 +23,8 @@
|
||||
}
|
||||
|
||||
header {
|
||||
ds-navbar-section > li,
|
||||
ds-expandable-navbar-section > li {
|
||||
li > .navbar-section,
|
||||
li > .expandable-navbar-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
Reference in New Issue
Block a user