Added Device Detection and conditional formatting for Mobile

This commit is contained in:
ItzMineyy committed 2024-12-24 22:31:28 +01:00
1 parent 166e2503ee
commit 97217cb149
31 files changed
+261 -453

No files matched your search

+17 -5
View File
@@ -21,6 +21,21 @@
text-align: center;
}
.portfolio-header-mobile {
text-align: center;
padding-top: 50px;
padding-bottom: 10px;
}
.portfolio-header-mobile h1 {
font-size: 2.5rem;
background: transparent;
border: 4px solid white;
margin: 8px 30px 8px 30px;
padding: 10px;
border-radius: 45px;
}
.portfolio-header h1 {
font-size: 2.5rem;
background: transparent;
@@ -50,24 +65,21 @@
text-align: center;
border-radius: 10px;
overflow: hidden;
background: rgba(255, 255, 255, 0.1);
padding: 10px;
transition: transform 0.3s ease-in-out;
}
.gallery-item img {
width: 100%;
border-radius: 8px;
margin-bottom: 10px;
margin-bottom: 2px;
}
.gallery-item:hover {
transform: scale(1.05);
background: rgba(255, 255, 255, 0.2);
}
.gallery-item p {
font-size: 1rem;
font-size: 1.0rem;
font-weight: 400;
}
+5 -1
View File
@@ -1,6 +1,10 @@
<div id="vanta-portfolio-bg"></div>
<div class="portfolio-container">
<div class="portfolio-header">
<div class="portfolio-header" *ngIf="!isMobile">
<h1>My Portfolio</h1>
<p class="subtitle">Projects & Designs</p>
</div>
<div class="portfolio-header-mobile" *ngIf="isMobile">
<h1>My Portfolio</h1>
<p class="subtitle">Projects & Designs</p>
</div>
@@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PortfolioComponent } from './portfolio.component';
describe('PortfolioComponent', () => {
let component: PortfolioComponent;
let fixture: ComponentFixture<PortfolioComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [PortfolioComponent]
})
.compileComponents();
fixture = TestBed.createComponent(PortfolioComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
+9 -2
View File
@@ -1,14 +1,21 @@
import {AfterViewInit, Component, OnDestroy, OnInit} from '@angular/core';
import {Meta, Title } from '@angular/platform-browser';
import { DeviceDetectorService } from 'ngx-device-detector';
import {NgIf} from '@angular/common';
@Component({
selector: 'app-portfolio',
imports: [],
imports: [
NgIf
],
templateUrl: './portfolio.component.html',
styleUrl: './portfolio.component.css'
})
export class PortfolioComponent implements OnInit, OnDestroy, AfterViewInit {
constructor(private titleService: Title, private meta: Meta) {}
constructor(private titleService: Title, private meta: Meta, private deviceService: DeviceDetectorService) {
this.isMobile = this.deviceService.isMobile();
}
isMobile: boolean;
private vantaEffect: any;
ngOnInit() {