Added image fullscreen modals and style updates

This commit is contained in:
itzMiney committed 2025-08-18 21:40:34 +02:00
1 parent 659ab2a975
commit 5bbadfef1c
7 files changed
+240 -67

No files matched your search

+55
View File
@@ -74,6 +74,7 @@
width: 100%;
border-radius: 8px;
margin-bottom: 2px;
cursor: pointer;
}
.gallery-item:hover {
@@ -117,6 +118,60 @@
color: cornflowerblue;
}
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.7);
color: white;
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.modal-content {
background: transparent;
padding: 1rem;
border-radius: 8px;
max-width: 80vw;
max-height: 80vh;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.modal-content img {
max-width: 100%;
max-height: 80vh;
object-fit: contain;
border-radius: 8px;
}
.modal-content button {
background-color: #FF5C8D;
border: none;
padding: 10px 20px;
border-radius: 25px;
cursor: pointer;
color: white;
font-size: 1.1rem;
font-weight: bold;
font-family: Roboto, serif;
}
.modal-content button:hover {
background-color: #FF3C75;
}
.modal-content button:active {
background-color: #ef85a4;
}
hr.rounded {
border: 2px solid white;
width: 40px;
+23 -51
View File
@@ -1,61 +1,33 @@
<div id="vanta-portfolio-bg"></div>
<div class="height-container">
<div class="portfolio-container">
<div class="portfolio-header" [ngStyle]="{'margin-top': isMobile ? '60px' : '120px'}">
<h1>{{ 'PORTF_TITLE' | translate }}</h1>
<p class="subtitle">{{ 'PORTF_SUB' | translate }}</p>
</div>
<hr class="rounded">
<div class="text-content">
<p [innerHTML]="'PORTFOLIO' | translate"></p>
</div>
<div class="commission-button">
<a href="https://ko-fi.com/itzminey/commissions" target="_blank">
<button class="ko-fi-btn">Commission me on Ko-Fi</button>
</a>
</div>
<div class="portfolio-gallery">
<div class="gallery-item">
<img src="/assets/design1.png" alt="Design 1">
<p>Abstract Background</p>
<div class="portfolio-container">
<div class="portfolio-header" [ngStyle]="{'margin-top': isMobile ? '60px' : '120px'}">
<h1>{{ 'PORTF_TITLE' | translate }}</h1>
<p class="subtitle">{{ 'PORTF_SUB' | translate }}</p>
</div>
<div class="gallery-item">
<img src="/assets/design2.png" alt="Design 2">
<p>Profile Picture Design</p>
<hr class="rounded">
<div class="text-content">
<p [innerHTML]="'PORTFOLIO' | translate"></p>
</div>
<div class="gallery-item">
<img src="/assets/design3.png" alt="Design 3">
<p>Pixelart Canvas</p>
</div>
<div class="gallery-item">
<img src="/assets/design4.png" alt="Design 4">
<p>Profile Picture Design 2</p>
</div>
<div class="gallery-item">
<img src="/assets/design5.png" alt="Design 5">
<p>Social Media Banner</p>
</div>
<div class="gallery-item">
<img src="/assets/design6.png" alt="Design 6">
<p>Logo Design</p>
</div>
<div class="gallery-item">
<img src="/assets/design7.png" alt="Design 6">
<p>Clipart Design</p>
</div>
<div class="gallery-item">
<a href="https://github.com/itzMiney/itzmineydev">
<img src="https://opengraph.githubassets.com/1/itzMiney/itzmineydev" alt="Frontend">
<p>itzMiney.dev Frontend</p>
<div class="commission-button">
<a href="https://ko-fi.com/itzminey/commissions" target="_blank">
<button class="ko-fi-btn">Commission me on Ko-Fi</button>
</a>
</div>
<div class="gallery-item">
<a href="https://github.com/Hideout-Codeworks/DoritoBot">
<img src="https://opengraph.githubassets.com/1/Hideout-Codeworks/DoritoBot" alt="DoritoBot">
<p>DoritoBot</p>
</a>
<div class="portfolio-gallery" [@staggerGallery]>
<div class="gallery-item" *ngFor="let item of galleryItems" (click)="openModal(item)">
<img [src]="item.src" [alt]="item.alt">
<p>{{ item.label }}</p>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal-backdrop" *ngIf="showModal" (click)="closeModal()">
<div class="modal-content" (click)="$event.stopPropagation()">
<img [src]="selectedItem?.src" [alt]="selectedItem?.alt">
<h2>{{ selectedItem?.label }}</h2>
<button (click)="closeModal()">Close</button>
</div>
</div>
</div>
</div>
<app-audio-player></app-audio-player>
+51 -3
View File
@@ -1,22 +1,60 @@
import {AfterViewInit, Component, Inject, OnDestroy, OnInit, PLATFORM_ID} from '@angular/core';
import {VantaBackgroundService} from '../shared/services/vanta-background.service';
import {DeviceDetectorService} from '../shared/services/device-detector.service';
import {isPlatformBrowser, NgStyle} from '@angular/common';
import {CommonModule, isPlatformBrowser, 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';
@Component({
selector: 'app-portfolio',
imports: [
NgStyle,
AudioPlayerComponent,
TranslatePipe
TranslatePipe,
CommonModule
],
templateUrl: './portfolio.component.html',
styleUrl: './portfolio.component.css'
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, OnDestroy, AfterViewInit {
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;
private readonly elementId = 'vanta-portfolio-bg';
isMobile: boolean = false;
constructor(
@@ -51,4 +89,14 @@ export class PortfolioComponent implements OnInit, OnDestroy, AfterViewInit {
// Update the minHeight and minWidth when the window is resized
this.vantaService.resizeVanta(this.elementId);
}
openModal(item: any) {
this.selectedItem = item;
this.showModal = true;
}
closeModal() {
this.selectedItem = null;
this.showModal = false;
}
}