|
41 | 41 | </div> |
42 | 42 |
|
43 | 43 | <app-menu-icon |
44 | | - (click)="mobileMenuState = !mobileMenuState" |
| 44 | + (click)="toggleMobileMenu()" |
45 | 45 | [isOpen]="mobileMenuState" |
46 | 46 | ></app-menu-icon> |
47 | 47 | </div> |
|
73 | 73 |
|
74 | 74 | <div |
75 | 75 | class="col l5 offset-l3 m8 s4 middle" |
76 | | - *ngIf="!platform.columns12 && !isCompactActive" |
| 76 | + *ngIf="!platform.columns12 && !isCompactActive && !mobileMenuState" |
77 | 77 | > |
78 | 78 | <app-search></app-search> |
79 | 79 | </div> |
|
82 | 82 | <nav |
83 | 83 | (mouseleave)="mouseLeave()" |
84 | 84 | *ngIf="(mobileMenuState || platform.columns12) && !hideMainMenu" |
85 | | - [ngClass]="{ 'not-wordpress-display': notWordpressDisplay }" |
| 85 | + [ngClass]="{ |
| 86 | + 'not-wordpress-display': notWordpressDisplay, |
| 87 | + 'mobile-nav-overlay': !platform.columns12 && mobileMenuState |
| 88 | + }" |
86 | 89 | [attr.aria-label]="labelMenu" |
| 90 | + [attr.aria-modal]="!platform.columns12 && mobileMenuState ? true : null" |
| 91 | + [attr.aria-hidden]="!platform.columns12 && !mobileMenuState ? true : null" |
| 92 | + [cdkTrapFocus]="!platform.columns12 && mobileMenuState" |
| 93 | + [cdkTrapFocusAutoCapture]="false" |
87 | 94 | > |
88 | 95 | <!-- TODO @leomendoza123 Once the new info site is stable, remove this togglz hidden to save render time --> |
89 | 96 | <div class="top-bar-new-info"> |
90 | | - <div class="menu-container" [ngClass]="{ container: platform.columns12 }"> |
| 97 | + <div |
| 98 | + #mobileMenuContainer |
| 99 | + class="menu-container" |
| 100 | + [ngClass]="{ container: platform.columns12 }" |
| 101 | + tabindex="-1" |
| 102 | + > |
| 103 | + <ul |
| 104 | + class="row mobile-auth-menu" |
| 105 | + *ngIf="checkMenuItemRequirements({ desktop: false })" |
| 106 | + > |
| 107 | + <li |
| 108 | + class="col no-gutters" |
| 109 | + *ngIf=" |
| 110 | + checkMenuItemRequirements({ logging: false }) && |
| 111 | + signinRegisterButton |
| 112 | + " |
| 113 | + > |
| 114 | + <button |
| 115 | + mat-button |
| 116 | + class="top-menu-button sign-in-button" |
| 117 | + [ngClass]="{ active: activeMenuItemId === 'header-signin' }" |
| 118 | + (click)="onNavClick('signin', 'header-signin')" |
| 119 | + > |
| 120 | + <ng-container i18n="@@header.signin">Sign in</ng-container |
| 121 | + > / <ng-container i18n="@@header.register" |
| 122 | + >Register</ng-container |
| 123 | + > |
| 124 | + </button> |
| 125 | + </li> |
| 126 | + <li |
| 127 | + class="col no-gutters" |
| 128 | + *ngIf="checkMenuItemRequirements({ logging: true })" |
| 129 | + > |
| 130 | + <button |
| 131 | + mat-button |
| 132 | + class="top-menu-button sign-in-button" |
| 133 | + [ngClass]="{ active: activeMenuItemId === 'header-signout' }" |
| 134 | + (click)="onNavClick('signout', 'header-signout')" |
| 135 | + > |
| 136 | + <ng-container i18n="#upperCase@@public-layout.sign_out" |
| 137 | + >SIGN OUT</ng-container |
| 138 | + > |
| 139 | + </button> |
| 140 | + </li> |
| 141 | + </ul> |
91 | 142 | <ng-template #recursiveList let-list let-parents="parents"> |
92 | 143 | <ul class="row" *ngIf="!isDesktopThirdLevelMenu(parents)"> |
93 | 144 | <ng-container *ngFor="let item of list"> |
|
96 | 147 | *ngIf="checkMenuItemRequirements(item.requirements) === true" |
97 | 148 | > |
98 | 149 | <button |
99 | | - [ngClass]="{ |
100 | | - active: item.activeRoute === currentRoute |
101 | | - }" |
| 150 | + [ngClass]="{ active: isMenuItemActive(item) }" |
102 | 151 | class="top-menu-button" |
103 | 152 | mat-button |
104 | 153 | [color]="menuButtonColor(parents)" |
|
139 | 188 | context: { $implicit: menu, parents: [] } |
140 | 189 | " |
141 | 190 | ></ng-container> |
142 | | - <ul class="row" *ngIf="checkMenuItemRequirements({ desktop: false })"> |
143 | | - <li |
144 | | - class="col no-gutters" |
145 | | - *ngIf=" |
146 | | - checkMenuItemRequirements({ logging: false }) && |
147 | | - signinRegisterButton |
148 | | - " |
149 | | - > |
150 | | - <button |
151 | | - mat-stroked-button |
152 | | - class="sign-in-button" |
153 | | - (click)="goto('signin')" |
154 | | - > |
155 | | - <ng-container i18n="@@header.signin">Sign in</ng-container |
156 | | - > / <ng-container i18n="@@header.register" |
157 | | - >Register</ng-container |
158 | | - > |
159 | | - </button> |
160 | | - </li> |
161 | | - <li |
162 | | - class="col no-gutters" |
163 | | - *ngIf="checkMenuItemRequirements({ logging: true })" |
164 | | - > |
165 | | - <button |
166 | | - mat-stroked-button |
167 | | - class="sign-in-button" |
168 | | - (click)="goto('signout')" |
169 | | - > |
170 | | - <ng-container i18n="#upperCase@@public-layout.sign_out" |
171 | | - >SIGN OUT</ng-container |
172 | | - > |
173 | | - </button> |
174 | | - </li> |
175 | | - </ul> |
176 | 191 | </div> |
177 | 192 | <mat-divider class="row"></mat-divider> |
178 | 193 | </div> |
|
0 commit comments