]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
Cleanup title-page CSS
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / misc / top-menu-dropdown.component.html
CommitLineData
7034b3c9 1<div class="sub-menu" [ngClass]="{ 'sub-menu-fixed': !isBroadcastMessageDisplayed, 'no-scroll': isModalOpened }">
d363ef53 2 <ng-container *ngFor="let menuEntry of menuEntries; index as id">
ddb83e49 3
c4a05171
C
4 <a
5 *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" class="sub-menu-entry"
6 [routerLink]="menuEntry.routerLink" routerLinkActive="active" #routerLink
7 (click)="onActiveLinkScrollToTop(routerLink)"
8 >
9 {{ menuEntry.label }}
10 </a>
ddb83e49 11
dfe3f7b7 12 <div *ngIf="!menuEntry.routerLink && isDisplayed(menuEntry)" ngbDropdown class="parent-entry"
27f4a1ec 13 #dropdown="ngbDropdown" autoClose="true" container="body">
80bfd33c 14 <span
805d6a35
C
15 *ngIf="isInSmallView"
16 tabindex=0
17 [ngClass]="{ active: !!suffixLabels[menuEntry.label] }"
18 (click)="openModal(id)" (keydown.enter)="openModal(id)"
c4a05171 19 role="button" class="sub-menu-entry">
d363ef53 20 <ng-container i18n>{{ menuEntry.label }}</ng-container>
d363ef53
K
21 </span>
22
23 <span
24 *ngIf="!isInSmallView"
ed5bb517
K
25 tabindex=0
26 [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" ngbDropdownAnchor
27 (click)="dropdownAnchorClicked(dropdown)" (keydown.enter)="dropdownAnchorClicked(dropdown)"
c4a05171 28 role="button" class="sub-menu-entry"
80bfd33c 29 >
ddb83e49 30 <ng-container i18n>{{ menuEntry.label }}</ng-container>
ddb83e49
C
31 </span>
32
33 <div ngbDropdownMenu>
dfe3f7b7
K
34 <ng-container *ngFor="let menuChild of menuEntry.children">
35 <a *ngIf="isDisplayed(menuChild)" class="dropdown-item"
837fe4f3 36 [ngClass]="{ icon: hasIcons }"
30d55e75
K
37 [routerLink]="menuChild.routerLink"
38 #routerLink (click)="onActiveLinkScrollToTop(routerLink)">
dfe3f7b7 39 <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>
a55052c9 40
dfe3f7b7
K
41 {{ menuChild.label }}
42 </a>
43 </ng-container>
ddb83e49
C
44 </div>
45 </div>
ddb83e49
C
46 </ng-container>
47</div>
d363ef53
K
48
49<ng-template #modal let-close="close" let-dismiss="dismiss">
50 <div class="modal-body">
51 <ng-container *ngFor="let menuEntry of menuEntries; index as id">
52 <div [ngClass]="{ hidden: id !== currentMenuEntryIndex }">
dfe3f7b7
K
53 <ng-container *ngFor="let menuChild of menuEntry.children">
54 <a *ngIf="isDisplayed(menuChild)"
55 [ngClass]="{ icon: hasIcons }"
30d55e75
K
56 [routerLink]="menuChild.routerLink" routerLinkActive="active"
57 #routerLink (click)="dismissOtherModals(); onActiveLinkScrollToTop(routerLink)">
dfe3f7b7 58 <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>
d363ef53 59
dfe3f7b7
K
60 {{ menuChild.label }}
61 </a>
62 </ng-container>
d363ef53
K
63 </div>
64 </ng-container>
65 </div>
66</ng-template>