Added Device Detection and conditional formatting for Mobile
This commit is contained in:
1 parent
166e2503ee
commit
97217cb149
31 files changed
+261
-453
No files matched your search
@@ -41,3 +41,4 @@ testem.log
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
/.vscode/
|
/.vscode/
|
||||||
|
/.vscode/
|
||||||
Generated
+14
@@ -20,6 +20,7 @@
|
|||||||
"@angular/router": "^19.0.0",
|
"@angular/router": "^19.0.0",
|
||||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||||
"@types/three": "^0.171.0",
|
"@types/three": "^0.171.0",
|
||||||
|
"ngx-device-detector": "^9.0.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"three": "^0.171.0",
|
"three": "^0.171.0",
|
||||||
@@ -10370,6 +10371,19 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/ngx-device-detector": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ngx-device-detector/-/ngx-device-detector-9.0.0.tgz",
|
||||||
|
"integrity": "sha512-zpio/wqH1GnxIpWCdA7cp5fmWf7YLycgzfXzQHmB9vaS7eAcqpBF5mxDS65IhE7TzNTJziDrYJCT+9tVqBcsDg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^19.0.0",
|
||||||
|
"@angular/core": "^19.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/node-addon-api": {
|
"node_modules/node-addon-api": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
"@angular/router": "^19.0.0",
|
"@angular/router": "^19.0.0",
|
||||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||||
"@types/three": "^0.171.0",
|
"@types/three": "^0.171.0",
|
||||||
|
"ngx-device-detector": "^9.0.0",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"three": "^0.171.0",
|
"three": "^0.171.0",
|
||||||
|
|||||||
@@ -19,6 +19,24 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.about-header-mobile {
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-header-mobile p {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about-header-mobile h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
background: transparent;
|
||||||
|
border: 4px solid white;
|
||||||
|
margin: 8px 30px 8px 30px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
.about-header {
|
.about-header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -67,7 +85,7 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
.tech-stack-title {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
||||||
@@ -76,6 +94,15 @@ h3 {
|
|||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tech-stack-title-mobile {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
text-align: center;
|
||||||
|
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
||||||
|
margin: 8px 80px 20px 80px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
.tech-stack {
|
.tech-stack {
|
||||||
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
||||||
border-radius: 40px;
|
border-radius: 40px;
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<div id="vanta-about-bg"></div>
|
<div id="vanta-about-bg"></div>
|
||||||
<div class="about-container">
|
<div class="about-container">
|
||||||
<div class="about-header">
|
<div class="about-header" *ngIf="!isMobile">
|
||||||
|
<h1>About Me</h1>
|
||||||
|
<p class="subtitle">Hobby developer & designer</p>
|
||||||
|
</div>
|
||||||
|
<div class="about-header-mobile" *ngIf="isMobile">
|
||||||
<h1>About Me</h1>
|
<h1>About Me</h1>
|
||||||
<p class="subtitle">Hobby developer & designer</p>
|
<p class="subtitle">Hobby developer & designer</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -14,7 +18,8 @@
|
|||||||
When I'm not coding, I love learning new technologies and contributing to open-source projects.<br>I also give support on the Pterodactyl Discord
|
When I'm not coding, I love learning new technologies and contributing to open-source projects.<br>I also give support on the Pterodactyl Discord
|
||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
<h3>Tech Stack</h3>
|
<h3 class="tech-stack-title" *ngIf="!isMobile">Tech Stack</h3>
|
||||||
|
<h3 class="tech-stack-title-mobile" *ngIf="isMobile">Tech Stack</h3>
|
||||||
<div class="tech-stack">
|
<div class="tech-stack">
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<h4>= WEB SERVERS =</h4>
|
<h4>= WEB SERVERS =</h4>
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { AboutComponent } from './about.component';
|
|
||||||
|
|
||||||
describe('AboutComponent', () => {
|
|
||||||
let component: AboutComponent;
|
|
||||||
let fixture: ComponentFixture<AboutComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [AboutComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(AboutComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,13 +1,21 @@
|
|||||||
import {Component, OnInit, OnDestroy, AfterViewInit} from '@angular/core';
|
import {Component, OnInit, OnDestroy, AfterViewInit} from '@angular/core';
|
||||||
import {Meta, Title} from '@angular/platform-browser';
|
import {Meta, Title} from '@angular/platform-browser';
|
||||||
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
import {NgIf} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-about',
|
selector: 'app-about',
|
||||||
templateUrl: './about.component.html',
|
templateUrl: './about.component.html',
|
||||||
|
imports: [
|
||||||
|
NgIf
|
||||||
|
],
|
||||||
styleUrls: ['./about.component.css']
|
styleUrls: ['./about.component.css']
|
||||||
})
|
})
|
||||||
export class AboutComponent implements OnInit, OnDestroy, AfterViewInit {
|
export class AboutComponent 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;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
<app-navbar></app-navbar>
|
<app-navbar *ngIf="!isMobile"></app-navbar>
|
||||||
|
<app-mobile-navbar *ngIf="isMobile"></app-mobile-navbar>
|
||||||
<router-outlet />
|
<router-outlet />
|
||||||
<app-footer></app-footer>
|
<app-footer></app-footer>
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [AppComponent],
|
|
||||||
}).compileComponents();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create the app', () => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
const app = fixture.componentInstance;
|
|
||||||
expect(app).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should have the 'itzmineydev' title`, () => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
const app = fixture.componentInstance;
|
|
||||||
expect(app.title).toEqual('itzmineydev');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should render title', () => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
fixture.detectChanges();
|
|
||||||
const compiled = fixture.nativeElement as HTMLElement;
|
|
||||||
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, itzmineydev');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { RouterOutlet, provideRouter } from '@angular/router';
|
import {NgIf} from '@angular/common';
|
||||||
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
import {RouterOutlet, provideRouter, Router} from '@angular/router';
|
||||||
import {NavbarComponent} from './navbar/navbar.component';
|
import {NavbarComponent} from './navbar/navbar.component';
|
||||||
|
import {MobileNavbarComponent} from './mobile-navbar/mobile-navbar.component';
|
||||||
import {FooterComponent} from './footer/footer.component';
|
import {FooterComponent} from './footer/footer.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
imports: [RouterOutlet, NavbarComponent, FooterComponent],
|
imports: [RouterOutlet, NavbarComponent, FooterComponent, MobileNavbarComponent, NgIf],
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrl: './app.component.css'
|
styleUrl: './app.component.css'
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
title = 'itzmineydev';
|
title = 'itzmineydev';
|
||||||
|
isMobile: boolean;
|
||||||
|
|
||||||
|
constructor(private deviceService: DeviceDetectorService) {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Routes } from '@angular/router';
|
import { Routes } from '@angular/router';
|
||||||
import { AboutComponent } from './about/about.component';
|
import { AboutComponent } from './about/about.component';
|
||||||
import { PortfolioComponent } from './portfolio/portfolio.component';
|
import { PortfolioComponent } from './portfolio/portfolio.component';
|
||||||
import { ContactComponent } from './contact/contact.component';
|
|
||||||
import { BlogComponent } from './blog/blog.component';
|
import { BlogComponent } from './blog/blog.component';
|
||||||
import {NotFoundComponent} from './not-found/not-found.component';
|
import {NotFoundComponent} from './not-found/not-found.component';
|
||||||
|
|
||||||
@@ -9,7 +8,6 @@ export const routes: Routes = [
|
|||||||
{ path: '', redirectTo: '/about', pathMatch: 'full' }, // Redirect default route to 'about'
|
{ path: '', redirectTo: '/about', pathMatch: 'full' }, // Redirect default route to 'about'
|
||||||
{ path: 'about', component: AboutComponent },
|
{ path: 'about', component: AboutComponent },
|
||||||
{ path: 'portfolio', component: PortfolioComponent },
|
{ path: 'portfolio', component: PortfolioComponent },
|
||||||
{ path: 'contact', component: ContactComponent },
|
|
||||||
{ path: 'blog', component: BlogComponent },
|
{ path: 'blog', component: BlogComponent },
|
||||||
|
|
||||||
{ path: '**', pathMatch: 'full', component: NotFoundComponent },
|
{ path: '**', pathMatch: 'full', component: NotFoundComponent },
|
||||||
|
|||||||
@@ -30,3 +30,17 @@
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error-message-mobile h1 {
|
||||||
|
font-size: 8rem;
|
||||||
|
margin: 0;
|
||||||
|
font-weight: 700;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message-mobile p {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
margin: 20px 0;
|
||||||
|
font-weight: 400;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
<div id="vanta-blog-bg"></div>
|
<div id="vanta-blog-bg"></div>
|
||||||
<div class="container" id="container">
|
<div class="container" id="container">
|
||||||
<div class="error-message">
|
<div class="error-message" *ngIf="!isMobile">
|
||||||
|
<h1>Soon™</h1>
|
||||||
|
<p>Under Construction!</p>
|
||||||
|
</div>
|
||||||
|
<div class="error-message-mobile" *ngIf="isMobile">
|
||||||
<h1>Soon™</h1>
|
<h1>Soon™</h1>
|
||||||
<p>Under Construction!</p>
|
<p>Under Construction!</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { BlogComponent } from './blog.component';
|
|
||||||
|
|
||||||
describe('BlogComponent', () => {
|
|
||||||
let component: BlogComponent;
|
|
||||||
let fixture: ComponentFixture<BlogComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [BlogComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(BlogComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,14 +1,21 @@
|
|||||||
import {Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
import {Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
|
||||||
import {Meta, Title} from '@angular/platform-browser';
|
import {Meta, Title} from '@angular/platform-browser';
|
||||||
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
import {NgIf} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-blog',
|
selector: 'app-blog',
|
||||||
imports: [],
|
imports: [
|
||||||
|
NgIf
|
||||||
|
],
|
||||||
templateUrl: './blog.component.html',
|
templateUrl: './blog.component.html',
|
||||||
styleUrl: './blog.component.css'
|
styleUrl: './blog.component.css'
|
||||||
})
|
})
|
||||||
export class BlogComponent implements OnInit, OnDestroy, AfterViewInit {
|
export class BlogComponent 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;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@@ -1,134 +0,0 @@
|
|||||||
#vanta-contact-bg {
|
|
||||||
transition: opacity 0.3s ease-in-out;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100vw; /* Full viewport width */
|
|
||||||
height: 100vh; /* Full viewport height */
|
|
||||||
z-index: -100; /* Place the background behind content */
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-container {
|
|
||||||
position: relative;
|
|
||||||
color: white;
|
|
||||||
padding: 120px 20px;
|
|
||||||
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
|
|
||||||
max-width: 700px;
|
|
||||||
margin: 0px auto 0px auto;
|
|
||||||
font-family: 'Roboto', sans-serif;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-header {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-header p {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-box p {
|
|
||||||
font-size: 1.0rem;
|
|
||||||
font-weight: 400;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-header h1 {
|
|
||||||
font-size: 2.5rem;
|
|
||||||
background: transparent;
|
|
||||||
border: 4px solid white;
|
|
||||||
margin: 8px 230px 8px 230px;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 45px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 300;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-box {
|
|
||||||
line-height: 1.6;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
text-align: center;
|
|
||||||
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
|
||||||
margin: 8px 250px 20px 250px;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-box {
|
|
||||||
background: linear-gradient(135deg, #9c27b0, #6200ea);
|
|
||||||
border-radius: 40px;
|
|
||||||
padding: 20px;
|
|
||||||
margin: 0px 30px 0px 30px;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: flex-start;
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 500px;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form input, .contact-form textarea {
|
|
||||||
padding: 10px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form input:focus, .contact-form textarea:focus {
|
|
||||||
outline: none;
|
|
||||||
border-color: #6200ea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form button {
|
|
||||||
padding: 12px;
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: black;
|
|
||||||
min-width: 200px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.right {
|
|
||||||
transform: translateX(+300px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form button:hover {
|
|
||||||
background-color: #dddddd;
|
|
||||||
color: #6200ea;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-form textarea {
|
|
||||||
resize: vertical;
|
|
||||||
min-height: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.contact-container {
|
|
||||||
padding: 20px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-header h1 {
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
<div id="vanta-contact-bg"></div>
|
|
||||||
<div class="contact-container">
|
|
||||||
<div class="contact-header">
|
|
||||||
<h1>Contact</h1>
|
|
||||||
<p class="subtitle">Lets get in touch!</p>
|
|
||||||
</div>
|
|
||||||
<h3>Contact Form</h3>
|
|
||||||
<div class="contact-box">
|
|
||||||
<div class="contact-form">
|
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="contactForm" class="contact-form">
|
|
||||||
<label for="name">Name</label>
|
|
||||||
<input id="name" type="text" formControlName="name" required />
|
|
||||||
|
|
||||||
<label for="email">Email</label>
|
|
||||||
<input id="email" type="email" formControlName="email" required />
|
|
||||||
|
|
||||||
<label for="message">Message</label>
|
|
||||||
<textarea id="message" formControlName="message" required></textarea>
|
|
||||||
|
|
||||||
<div class=right><button type="submit" [disabled]="contactForm.invalid">Submit</button></div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { ContactComponent } from './contact.component';
|
|
||||||
|
|
||||||
describe('ContactComponent', () => {
|
|
||||||
let component: ContactComponent;
|
|
||||||
let fixture: ComponentFixture<ContactComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [ContactComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ContactComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
import {Component, OnInit, OnDestroy, AfterViewInit} from '@angular/core';
|
|
||||||
import {FormGroup, FormBuilder, Validators, ReactiveFormsModule} from '@angular/forms';
|
|
||||||
import {Meta, Title} from '@angular/platform-browser';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-contact',
|
|
||||||
templateUrl: './contact.component.html',
|
|
||||||
imports: [ReactiveFormsModule],
|
|
||||||
styleUrls: ['./contact.component.css']
|
|
||||||
})
|
|
||||||
|
|
||||||
export class ContactComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
||||||
constructor(private titleService: Title, private fb: FormBuilder, private meta: Meta) {}
|
|
||||||
private vantaEffect: any;
|
|
||||||
contactForm: FormGroup = new FormGroup({});
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.titleService.setTitle('Contact | itzMiney');
|
|
||||||
this.meta.updateTag({ name: 'description', content: 'Wanna get in touch? Fill out this short Contact form and I\'ll get back to you as soon as I can!' });
|
|
||||||
this.meta.updateTag({ property: 'og:image', content: 'https://itzminey.dev/assets/ogimg.png' });
|
|
||||||
|
|
||||||
window.addEventListener('resize', this.onResize.bind(this)); // Add resize listener for responsiveness
|
|
||||||
|
|
||||||
const bgElement = document.getElementById('vanta-contact-bg')
|
|
||||||
if (bgElement) {
|
|
||||||
bgElement.style.position = 'fixed';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.contactForm = this.fb.group({
|
|
||||||
name: ['', [Validators.required, Validators.minLength(3)]], // Name is required and at least 3 chars
|
|
||||||
email: ['', [Validators.required, Validators.email]], // Email is required and must be valid
|
|
||||||
message: ['', [Validators.required, Validators.minLength(10)]], // Message is required and at least 10 chars
|
|
||||||
});
|
|
||||||
}
|
|
||||||
ngAfterViewInit() {
|
|
||||||
this.initVanta();
|
|
||||||
this.resizeVanta();
|
|
||||||
}
|
|
||||||
ngOnDestroy() {
|
|
||||||
if (this.vantaEffect) {
|
|
||||||
this.vantaEffect.destroy(); // Clean up the effect on destroy
|
|
||||||
}
|
|
||||||
window.removeEventListener('resize', this.onResize); // Remove the listener when the component is destroyed
|
|
||||||
}
|
|
||||||
|
|
||||||
initVanta() {
|
|
||||||
// Initialize the Vanta effect on the element with ID 'vanta-bg'
|
|
||||||
this.vantaEffect = window.VANTA.NET({
|
|
||||||
el: '#vanta-contact-bg',
|
|
||||||
mouseControls: true,
|
|
||||||
touchControls: true,
|
|
||||||
gyroControls: false,
|
|
||||||
scale: 1.00,
|
|
||||||
scaleMobile: 1.00,
|
|
||||||
points: 20.00,
|
|
||||||
maxDistance: 25.00,
|
|
||||||
spacing: 18.00,
|
|
||||||
showDots: false,
|
|
||||||
minWidth: window.innerWidth,
|
|
||||||
minHeight: window.innerHeight,
|
|
||||||
color: 0xbb3fff,
|
|
||||||
backgroundColor: 0x15193c
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onResize() {
|
|
||||||
// Update the minHeight and minWidth when the window is resized
|
|
||||||
this.resizeVanta();
|
|
||||||
}
|
|
||||||
|
|
||||||
resizeVanta() {
|
|
||||||
if (this.vantaEffect) {
|
|
||||||
// Trigger the resize on the vanta effect
|
|
||||||
this.vantaEffect.resize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onSubmit() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { FooterComponent } from './footer.component';
|
|
||||||
|
|
||||||
describe('FooterComponent', () => {
|
|
||||||
let component: FooterComponent;
|
|
||||||
let fixture: ComponentFixture<FooterComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [FooterComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(FooterComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
.mobile-navbar {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
background: none;
|
||||||
|
padding: 10px;
|
||||||
|
color: #fff;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-icon {
|
||||||
|
font-size: 32px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-screen-menu {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.9);
|
||||||
|
color: white;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 2000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-screen-menu ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
position: fixed;
|
||||||
|
top: 72px;
|
||||||
|
left: 72px;
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-screen-menu li {
|
||||||
|
margin: 20px 0;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-screen-menu a {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
font-size: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
right: 20px;
|
||||||
|
font-size: 24px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<div class="mobile-navbar">
|
||||||
|
<!-- Hamburger Icon -->
|
||||||
|
<button class="menu-icon" (click)="toggleMenu()">
|
||||||
|
☰
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<!-- Full-Screen Menu -->
|
||||||
|
<div class="full-screen-menu" *ngIf="menuOpen">
|
||||||
|
<button class="close-icon" (click)="toggleMenu()">✖</button>
|
||||||
|
<ul>
|
||||||
|
<li><a [routerLink]="'/about'" [class.active]="activeLink === '/about'">About</a></li>
|
||||||
|
<li><a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a></li>
|
||||||
|
<li><a href="https://linktr.ee/itzminey">Socials</a></li>
|
||||||
|
<li><a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import {Component, OnInit } from '@angular/core';
|
||||||
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
import {NgIf} from '@angular/common';
|
||||||
|
import {Router, NavigationEnd, RouterLink} from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-mobile-navbar',
|
||||||
|
imports: [
|
||||||
|
RouterLink,
|
||||||
|
NgIf
|
||||||
|
],
|
||||||
|
templateUrl: './mobile-navbar.component.html',
|
||||||
|
styleUrl: './mobile-navbar.component.css'
|
||||||
|
})
|
||||||
|
|
||||||
|
export class MobileNavbarComponent implements OnInit{
|
||||||
|
menuOpen = false;
|
||||||
|
isMobile: boolean;
|
||||||
|
activeLink: string = '';
|
||||||
|
|
||||||
|
constructor(private router: Router, private deviceService: DeviceDetectorService) {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleMenu() {
|
||||||
|
this.menuOpen = !this.menuOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
// Listen to route changes
|
||||||
|
this.router.events.subscribe((event) => {
|
||||||
|
if (event instanceof NavigationEnd) {
|
||||||
|
this.menuOpen = false;
|
||||||
|
this.activeLink = event.urlAfterRedirects; // Capture the active route
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<nav class="navbar">
|
<nav class="navbar" *ngIf="!isMobile">
|
||||||
<div class="navbar-links">
|
<div class="navbar-links">
|
||||||
<a [routerLink]="'/about'" [class.active]="activeLink === '/about'">About</a>
|
<a [routerLink]="'/about'" [class.active]="activeLink === '/about'">About</a>
|
||||||
<a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a>
|
<a [routerLink]="'/portfolio'" [class.active]="activeLink === '/portfolio'">Portfolio</a>
|
||||||
<a [routerLink]="'/contact'" [class.active]="activeLink === '/contact'">Contact</a>
|
<a href="https://linktr.ee/itzminey">Socials</a>
|
||||||
<a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a>
|
<a [routerLink]="'/blog'" [class.active]="activeLink === '/blog'">Blog</a>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { NavbarComponent } from './navbar.component';
|
|
||||||
|
|
||||||
describe('NavbarComponent', () => {
|
|
||||||
let component: NavbarComponent;
|
|
||||||
let fixture: ComponentFixture<NavbarComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [NavbarComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(NavbarComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,18 +1,24 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {Router, NavigationEnd, RouterLink} from '@angular/router';
|
import {Router, NavigationEnd, RouterLink} from '@angular/router';
|
||||||
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
import {NgIf} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-navbar',
|
selector: 'app-navbar',
|
||||||
templateUrl: './navbar.component.html',
|
templateUrl: './navbar.component.html',
|
||||||
styleUrls: ['./navbar.component.css'],
|
styleUrls: ['./navbar.component.css'],
|
||||||
imports: [
|
imports: [
|
||||||
RouterLink
|
RouterLink,
|
||||||
|
NgIf,
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class NavbarComponent implements OnInit {
|
export class NavbarComponent implements OnInit {
|
||||||
activeLink: string = '';
|
activeLink: string = '';
|
||||||
|
isMobile: boolean;
|
||||||
|
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router, private deviceService: DeviceDetectorService) {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// Listen to route changes
|
// Listen to route changes
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
||||||
|
|
||||||
import { NotFoundComponent } from './not-found.component';
|
|
||||||
|
|
||||||
describe('NotFoundComponent', () => {
|
|
||||||
let component: NotFoundComponent;
|
|
||||||
let fixture: ComponentFixture<NotFoundComponent>;
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
await TestBed.configureTestingModule({
|
|
||||||
imports: [NotFoundComponent]
|
|
||||||
})
|
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(NotFoundComponent);
|
|
||||||
component = fixture.componentInstance;
|
|
||||||
fixture.detectChanges();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create', () => {
|
|
||||||
expect(component).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -21,6 +21,21 @@
|
|||||||
text-align: center;
|
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 {
|
.portfolio-header h1 {
|
||||||
font-size: 2.5rem;
|
font-size: 2.5rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
@@ -50,24 +65,21 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: rgba(255, 255, 255, 0.1);
|
|
||||||
padding: 10px;
|
|
||||||
transition: transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-item img {
|
.gallery-item img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-item:hover {
|
.gallery-item:hover {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
background: rgba(255, 255, 255, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-item p {
|
.gallery-item p {
|
||||||
font-size: 1rem;
|
font-size: 1.0rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<div id="vanta-portfolio-bg"></div>
|
<div id="vanta-portfolio-bg"></div>
|
||||||
<div class="portfolio-container">
|
<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>
|
<h1>My Portfolio</h1>
|
||||||
<p class="subtitle">Projects & Designs</p>
|
<p class="subtitle">Projects & Designs</p>
|
||||||
</div>
|
</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();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,14 +1,21 @@
|
|||||||
import {AfterViewInit, Component, OnDestroy, OnInit} from '@angular/core';
|
import {AfterViewInit, Component, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {Meta, Title } from '@angular/platform-browser';
|
import {Meta, Title } from '@angular/platform-browser';
|
||||||
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
||||||
|
import {NgIf} from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-portfolio',
|
selector: 'app-portfolio',
|
||||||
imports: [],
|
imports: [
|
||||||
|
NgIf
|
||||||
|
],
|
||||||
templateUrl: './portfolio.component.html',
|
templateUrl: './portfolio.component.html',
|
||||||
styleUrl: './portfolio.component.css'
|
styleUrl: './portfolio.component.css'
|
||||||
})
|
})
|
||||||
export class PortfolioComponent implements OnInit, OnDestroy, AfterViewInit {
|
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;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
Reference in new issue
Block a user