Arrow animation
This commit is contained in:
@@ -6,9 +6,17 @@
|
|||||||
<span>BookLore</span>
|
<span>BookLore</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<p-button #menubutton icon="pi pi-arrow-left" [rounded]="true" [outlined]="true" (click)="layoutService.onMenuToggle()"></p-button>
|
<p-button
|
||||||
|
#menubutton
|
||||||
|
icon="pi pi-arrow-left"
|
||||||
|
[rounded]="true"
|
||||||
|
[outlined]="true"
|
||||||
|
(click)="toggleMenu()"
|
||||||
|
[ngClass]="{ 'rotate-right': !isMenuVisible, 'rotate-left': isMenuVisible }"
|
||||||
|
>
|
||||||
|
</p-button>
|
||||||
|
|
||||||
<div class="xxx">
|
<div class="topbar-right-items">
|
||||||
<app-search></app-search>
|
<app-search></app-search>
|
||||||
<ul class="topbar-items">
|
<ul class="topbar-items">
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {FormsModule} from '@angular/forms';
|
|||||||
import {InputTextModule} from 'primeng/inputtext';
|
import {InputTextModule} from 'primeng/inputtext';
|
||||||
import {SearchComponent} from '../search/search.component';
|
import {SearchComponent} from '../search/search.component';
|
||||||
import {FileUploadComponent} from '../file-upload/file-upload.component';
|
import {FileUploadComponent} from '../file-upload/file-upload.component';
|
||||||
import {NgIf} from '@angular/common';
|
import {NgClass, NgIf} from '@angular/common';
|
||||||
import {EventService} from '../../service/event.service';
|
import {EventService} from '../../service/event.service';
|
||||||
import {LogNotification} from '../../model/log-notification.model';
|
import {LogNotification} from '../../model/log-notification.model';
|
||||||
import {Button} from 'primeng/button';
|
import {Button} from 'primeng/button';
|
||||||
@@ -29,7 +29,8 @@ import {StyleClass} from 'primeng/styleclass';
|
|||||||
NgIf,
|
NgIf,
|
||||||
Button,
|
Button,
|
||||||
AppConfiguratorComponent,
|
AppConfiguratorComponent,
|
||||||
StyleClass
|
StyleClass,
|
||||||
|
NgClass
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class AppTopBarComponent implements OnDestroy {
|
export class AppTopBarComponent implements OnDestroy {
|
||||||
@@ -54,6 +55,13 @@ export class AppTopBarComponent implements OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isMenuVisible: boolean = true;
|
||||||
|
|
||||||
|
toggleMenu() {
|
||||||
|
this.isMenuVisible = !this.isMenuVisible;
|
||||||
|
this.layoutService.onMenuToggle();
|
||||||
|
}
|
||||||
|
|
||||||
onMouseEnter() {
|
onMouseEnter() {
|
||||||
this.showEvents = true;
|
this.showEvents = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,17 +90,6 @@ export class LayoutService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showProfileSidebar() {
|
|
||||||
this.state.profileSidebarVisible = !this.state.profileSidebarVisible;
|
|
||||||
if (this.state.profileSidebarVisible) {
|
|
||||||
this.overlayOpen.next(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showConfigSidebar() {
|
|
||||||
this.state.configSidebarVisible = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
isOverlay() {
|
isOverlay() {
|
||||||
return this.config().menuMode === 'overlay';
|
return this.config().menuMode === 'overlay';
|
||||||
}
|
}
|
||||||
@@ -109,10 +98,6 @@ export class LayoutService {
|
|||||||
return window.innerWidth > 991;
|
return window.innerWidth > 991;
|
||||||
}
|
}
|
||||||
|
|
||||||
isMobile() {
|
|
||||||
return !this.isDesktop();
|
|
||||||
}
|
|
||||||
|
|
||||||
onConfigUpdate() {
|
onConfigUpdate() {
|
||||||
this._config = { ...this.config() };
|
this._config = { ...this.config() };
|
||||||
this.configUpdate.next(this.config());
|
this.configUpdate.next(this.config());
|
||||||
|
|||||||
@@ -316,8 +316,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.xxx {
|
.topbar-right-items {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rotate-left {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
transition: transform 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rotate-right {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
transition: transform 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user