import {Component, OnInit} 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', imports: [ NgStyle, AudioPlayerComponent, TranslatePipe, CommonModule, 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 }) ]) ]) ] }) export class PortfolioComponent implements OnInit { galleryItems = [ { src: '/assets/design1.png', alt: 'Design 1', label: 'Abstract Background' }, { src: '/assets/design2.png', alt: 'Design 2', label: 'Profile Picture Design' }, { src: '/assets/design3.png', alt: 'Design 3', label: 'Pixelart Canvas' }, { src: '/assets/design4.png', alt: 'Design 4', label: 'Profile Picture Design 2' }, { src: '/assets/design5.png', alt: 'Design 5', label: 'Social Media Banner' }, { src: '/assets/design6.png', alt: 'Design 6', label: 'Logo Design' }, { src: '/assets/design7.png', alt: 'Design 7', label: 'Clipart Design' }, { src: 'https://opengraph.githubassets.com/1/itzMiney/itzmineydev', alt: 'Frontend', label: 'itzMiney.dev Frontend' }, { src: 'https://opengraph.githubassets.com/1/Hideout-Codeworks/DoritoBot', alt: 'DoritoBot', label: 'DoritoBot' }, ]; selectedItem: any = null; showModal = false; isMobile: boolean = false; constructor( private deviceService: DeviceDetectorService, private titleService: Title, ) {} ngOnInit() { this.titleService.setTitle('Portfolio | itzMiney'); this.isMobile = this.deviceService.isMobile; } openModal(item: any) { this.selectedItem = item; this.showModal = true; } closeModal() { this.selectedItem = null; this.showModal = false; } }