refactor of image modal code
This commit is contained in:
1 parent
293a06e9a4
commit
357e1b6cf3
2 files changed
+58
-97
No files matched your search
@@ -1,14 +1,14 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
||||
import { CommonModule, NgStyle } from '@angular/common';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {AudioPlayerComponent} from '../shared/audio-player/audio-player.component';
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
import {animate, stagger, style, transition, trigger, query} from '@angular/animations';
|
||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-portfolio',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
imports: [
|
||||
NgStyle,
|
||||
AudioPlayerComponent,
|
||||
@@ -17,30 +17,7 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||
ParallaxComponent
|
||||
],
|
||||
templateUrl: './portfolio.component.html',
|
||||
styleUrl: './portfolio.component.css',
|
||||
animations: [
|
||||
trigger('fadeInOut', [
|
||||
transition(':enter', [
|
||||
style({ opacity: 0, transform: 'translateY(20px)' }),
|
||||
animate('0.5s ease-out', style({ opacity: 1, transform: 'translateY(0)' }))
|
||||
]),
|
||||
transition(':leave', [
|
||||
animate('0.3s ease-in', style({ opacity: 0, transform: 'translateY(20px)' }))
|
||||
])
|
||||
]),
|
||||
trigger('staggerGallery', [
|
||||
transition(':enter', [
|
||||
query('.gallery-item', [
|
||||
style({ opacity: 0, transform: 'translateY(20px)' }),
|
||||
stagger(100, [
|
||||
animate('0.5s ease-out', style({ opacity: 1, transform: 'translateY(0)' }))
|
||||
])
|
||||
], {
|
||||
optional: true
|
||||
})
|
||||
])
|
||||
])
|
||||
]
|
||||
styleUrl: './portfolio.component.css'
|
||||
})
|
||||
export class PortfolioComponent implements OnInit {
|
||||
galleryItems = [
|
||||
|
||||
Reference in new issue
Block a user