Skip to content

Commit

Permalink
104-the-homepage-top-bar-new-info-has-a-bottom-margin-that-needs-redu…
Browse files Browse the repository at this point in the history
…cing-to-32px-2
  • Loading branch information
leomendoza123 committed Jul 8, 2024
1 parent 208b8ff commit 6876c23
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/layout/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<nav
(mouseleave)="mouseLeave()"
*ngIf="(mobileMenuState || platform.columns12) && !hideMainMenu"
[ngClass]="{ 'not-wordpress-display': notWordpressDisplay }"
[attr.aria-label]="labelMenu"
>
<!-- TODO @leomendoza123 Once the new info site is stable, remove this togglz hidden to save render time -->
Expand Down
6 changes: 6 additions & 0 deletions src/app/layout/header/header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ header.container {
}
}
}
nav.not-wordpress-display > .top-bar,
nav.not-wordpress-display > .top-bar-new-info {
margin-bottom: 60px;
}

nav {
ul {
Expand All @@ -31,6 +35,8 @@ nav {
padding: 0;
}



.top-bar,
.top-bar-new-info {
height: 60px;
Expand Down
13 changes: 12 additions & 1 deletion src/app/layout/header/header.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Location } from '@angular/common'
import { Component, Inject, Input, OnInit } from '@angular/core'
import { NavigationStart, Router } from '@angular/router'
import { filter } from 'rxjs/operators'
import { filter, switchMap, tap } from 'rxjs/operators'
import { PlatformInfo, PlatformInfoService } from 'src/app/cdk/platform-info'
import { WINDOW } from 'src/app/cdk/window'
import { UserService } from 'src/app/core'
Expand All @@ -25,6 +25,7 @@ import { menu } from './menu'
export class HeaderComponent implements OnInit {
hideMainMenu = false
_currentRoute: string
notWordpressDisplay: boolean
@Input() set currentRoute(value) {
this._currentRoute = value
this.setChildOfCurrentRouteAsSecondaryMenu()
Expand Down Expand Up @@ -66,6 +67,16 @@ export class HeaderComponent implements OnInit {
_togglz.getTogglz().subscribe((data) => {
this.togglz = data
})
_togglz
.getStateOf('WORDPRESS_HOME_PAGE')
.pipe(
tap((state) => {
this.notWordpressDisplay = !state

})
)
.subscribe()

_router.events.subscribe(() => {
const path = location.path()
this.signinRegisterButton =
Expand Down

0 comments on commit 6876c23

Please sign in to comment.