login+-
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<logo></logo>
|
<logo></logo>
|
||||||
|
@if(!hideButtons) {
|
||||||
|
<div class="header-links" id="header-buttons">
|
||||||
<events-link></events-link>
|
<events-link></events-link>
|
||||||
<tags-link></tags-link>
|
<tags-link></tags-link>
|
||||||
<services-link></services-link>
|
<services-link></services-link>
|
||||||
@@ -9,9 +11,14 @@
|
|||||||
<content-manager-panel-link></content-manager-panel-link>
|
<content-manager-panel-link></content-manager-panel-link>
|
||||||
} @if (user.isAdmin) {
|
} @if (user.isAdmin) {
|
||||||
<admin-panel-link></admin-panel-link>
|
<admin-panel-link></admin-panel-link>
|
||||||
} @if (user.isLoggedIn) {
|
}
|
||||||
|
<div class="user-profile">
|
||||||
|
@if (user.isLoggedIn) {
|
||||||
<user-profile-link></user-profile-link>
|
<user-profile-link></user-profile-link>
|
||||||
} @else {
|
} @else {
|
||||||
<login-link></login-link>
|
<login-link (click)="login($event)"></login-link>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
</header>
|
</header>
|
||||||
|
@@ -3,23 +3,35 @@ header {
|
|||||||
top: 0;
|
top: 0;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
margin: 0;
|
padding-left: 2rem;
|
||||||
padding: 0;
|
max-width: 100%;
|
||||||
width: 100%;
|
height: 10%;
|
||||||
height: 7%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: baseline;
|
align-items: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: space-evenly;
|
|
||||||
gap: 0;
|
gap: 0;
|
||||||
|
|
||||||
logo {
|
logo {
|
||||||
width: 10%;
|
width: 30%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
order: 0;
|
order: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
.header-links {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
gap: 1rem;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
.user-profile {
|
||||||
|
order: 9999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -42,4 +42,14 @@ export class Header implements OnInit {
|
|||||||
get user() {
|
get user() {
|
||||||
return this.currentUser;
|
return this.currentUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideButtons = false;
|
||||||
|
login(event: Event) {
|
||||||
|
event.preventDefault();
|
||||||
|
this.hideButtons = true;
|
||||||
|
// const headerButtons = document.getElementById('header-buttons');
|
||||||
|
// if (headerButtons) {
|
||||||
|
// headerButtons.style.display = 'none';
|
||||||
|
// }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component, EventEmitter, Output, output } from '@angular/core';
|
||||||
import { SvgButton } from '../../../utils/svg-button/svg-button';
|
import { SvgButton } from '../../../utils/svg-button/svg-button';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -7,4 +7,6 @@ import { SvgButton } from '../../../utils/svg-button/svg-button';
|
|||||||
templateUrl: './login-link.html',
|
templateUrl: './login-link.html',
|
||||||
styleUrl: './login-link.scss',
|
styleUrl: './login-link.scss',
|
||||||
})
|
})
|
||||||
export class LoginLink {}
|
export class LoginLink {
|
||||||
|
@Output() login = new EventEmitter<void>();
|
||||||
|
}
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<a routerLink="/">
|
<a href="/">
|
||||||
<img [src]="logoSrc" alt="Logo" />
|
<img [src]="logoSrc" alt="Logo" />
|
||||||
</a>
|
</a>
|
||||||
|
@@ -1,6 +1,14 @@
|
|||||||
a {
|
a {
|
||||||
|
max-width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: auto;
|
||||||
height: auto;
|
max-width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
object-fit: scale-down;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user