Added collapse menu
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
app-header {
|
app-header {
|
||||||
box-shadow: 0 1.5rem 1rem rgba(0,0,0,0.21);
|
box-shadow: 0 1.5rem 1rem rgba(0,0,0,0.21);
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 5;
|
z-index: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hero-container {
|
.hero-container {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="menu">
|
<div class="menu" [ngClass]="{'hidden': !isCollapsed}">
|
||||||
<a href="#diensten">Diensten<span>Diensten</span></a>
|
<a href="#diensten">Diensten<span>Diensten</span></a>
|
||||||
<a href="#advies">Advies<span>Advies</span></a>
|
<a href="#advies">Advies<span>Advies</span></a>
|
||||||
<a href="#klantworden">Klant worden<span>Klant worden</span></a>
|
<a href="#klantworden">Klant worden<span>Klant worden</span></a>
|
||||||
@@ -14,3 +14,6 @@
|
|||||||
<a href="#vacatures">Vacatures<span>Vacatures</span></a>
|
<a href="#vacatures">Vacatures<span>Vacatures</span></a>
|
||||||
<a href="#contact">Contact<span>Contact</span></a>
|
<a href="#contact">Contact<span>Contact</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="icon" (click)="isCollapsed = !isCollapsed">
|
||||||
|
<span class="fa-bars fa-solid"></span>
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -61,10 +61,44 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1200px) {
|
@media only screen and (max-width: 1200px) {
|
||||||
|
:host {
|
||||||
|
padding: 2rem 3rem;
|
||||||
|
}
|
||||||
.logo .subtext {
|
.logo .subtext {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
display: none;
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
position: absolute;
|
||||||
|
width: 35%;
|
||||||
|
right: 0;
|
||||||
|
top: 11rem;
|
||||||
|
z-index: 200;
|
||||||
|
|
||||||
|
a {
|
||||||
|
width: 100%;
|
||||||
|
background-color: $white;
|
||||||
|
z-index: 200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 0;
|
||||||
|
height: 7.7rem;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: $primary-color;
|
||||||
|
font-size: 5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, HostListener } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-header',
|
selector: 'app-header',
|
||||||
@@ -6,5 +6,12 @@ import { Component } from '@angular/core';
|
|||||||
styleUrls: ['./header.component.scss']
|
styleUrls: ['./header.component.scss']
|
||||||
})
|
})
|
||||||
export class HeaderComponent {
|
export class HeaderComponent {
|
||||||
|
public isCollapsed: boolean = false;
|
||||||
|
|
||||||
|
@HostListener('document:click', ['$event'])
|
||||||
|
public reset(event: unknown) {
|
||||||
|
if (!(event as any).srcElement.classList.contains('fa-bars') && !(event as any).ctrlKey && !(event as any).altKey) {
|
||||||
|
this.isCollapsed = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user