Arrow animation
This commit is contained in:
@@ -6,9 +6,17 @@
|
||||
<span>BookLore</span>
|
||||
</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>
|
||||
<ul class="topbar-items">
|
||||
<li>
|
||||
|
||||
@@ -9,7 +9,7 @@ import {FormsModule} from '@angular/forms';
|
||||
import {InputTextModule} from 'primeng/inputtext';
|
||||
import {SearchComponent} from '../search/search.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 {LogNotification} from '../../model/log-notification.model';
|
||||
import {Button} from 'primeng/button';
|
||||
@@ -29,7 +29,8 @@ import {StyleClass} from 'primeng/styleclass';
|
||||
NgIf,
|
||||
Button,
|
||||
AppConfiguratorComponent,
|
||||
StyleClass
|
||||
StyleClass,
|
||||
NgClass
|
||||
],
|
||||
})
|
||||
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() {
|
||||
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() {
|
||||
return this.config().menuMode === 'overlay';
|
||||
}
|
||||
@@ -109,10 +98,6 @@ export class LayoutService {
|
||||
return window.innerWidth > 991;
|
||||
}
|
||||
|
||||
isMobile() {
|
||||
return !this.isDesktop();
|
||||
}
|
||||
|
||||
onConfigUpdate() {
|
||||
this._config = { ...this.config() };
|
||||
this.configUpdate.next(this.config());
|
||||
|
||||
@@ -316,8 +316,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.xxx {
|
||||
.topbar-right-items {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
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