diff --git a/.gitignore b/.gitignore index 99a2bb1..14d7b09 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ testem.log .DS_Store Thumbs.db /.vscode/ +/.vscode/ diff --git a/package-lock.json b/package-lock.json index c370539..87e8ce0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@angular/router": "^19.0.0", "@fortawesome/fontawesome-free": "^6.7.2", "@types/three": "^0.171.0", + "ngx-device-detector": "^9.0.0", "react": "^19.0.0", "rxjs": "~7.8.0", "three": "^0.171.0", @@ -10370,6 +10371,19 @@ "dev": true, "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": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", diff --git a/package.json b/package.json index b0d8623..b12f6ed 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@angular/router": "^19.0.0", "@fortawesome/fontawesome-free": "^6.7.2", "@types/three": "^0.171.0", + "ngx-device-detector": "^9.0.0", "react": "^19.0.0", "rxjs": "~7.8.0", "three": "^0.171.0", diff --git a/src/app/about/about.component.css b/src/app/about/about.component.css index 0b92e2e..23b0c66 100644 --- a/src/app/about/about.component.css +++ b/src/app/about/about.component.css @@ -19,6 +19,24 @@ 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 { text-align: center; } @@ -67,7 +85,7 @@ font-style: italic; } -h3 { +.tech-stack-title { font-size: 1.4rem; text-align: center; background: linear-gradient(135deg, #9c27b0, #6200ea); @@ -76,6 +94,15 @@ h3 { 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 { background: linear-gradient(135deg, #9c27b0, #6200ea); border-radius: 40px; diff --git a/src/app/about/about.component.html b/src/app/about/about.component.html index a6c2f59..5126983 100644 --- a/src/app/about/about.component.html +++ b/src/app/about/about.component.html @@ -1,6 +1,10 @@
-
+
+

About Me

+

Hobby developer & designer

+
+

About Me

Hobby developer & designer

@@ -14,7 +18,8 @@ When I'm not coding, I love learning new technologies and contributing to open-source projects.
I also give support on the Pterodactyl Discord


-

Tech Stack

+

Tech Stack

+

Tech Stack

= WEB SERVERS =

diff --git a/src/app/about/about.component.spec.ts b/src/app/about/about.component.spec.ts deleted file mode 100644 index 74d6d9e..0000000 --- a/src/app/about/about.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { AboutComponent } from './about.component'; - -describe('AboutComponent', () => { - let component: AboutComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [AboutComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(AboutComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/about/about.component.ts b/src/app/about/about.component.ts index 9bff281..0abd801 100644 --- a/src/app/about/about.component.ts +++ b/src/app/about/about.component.ts @@ -1,13 +1,21 @@ import {Component, OnInit, OnDestroy, AfterViewInit} from '@angular/core'; import {Meta, Title} from '@angular/platform-browser'; +import { DeviceDetectorService } from 'ngx-device-detector'; +import {NgIf} from '@angular/common'; @Component({ selector: 'app-about', templateUrl: './about.component.html', + imports: [ + NgIf + ], styleUrls: ['./about.component.css'] }) 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; ngOnInit() { diff --git a/src/app/app.component.html b/src/app/app.component.html index a37e8ae..220ec2c 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,3 +1,4 @@ - + + diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts deleted file mode 100644 index 880fe43..0000000 --- a/src/app/app.component.spec.ts +++ /dev/null @@ -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'); - }); -}); diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 793f639..acb8e2d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,14 +1,22 @@ 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 {MobileNavbarComponent} from './mobile-navbar/mobile-navbar.component'; import {FooterComponent} from './footer/footer.component'; @Component({ selector: 'app-root', - imports: [RouterOutlet, NavbarComponent, FooterComponent], + imports: [RouterOutlet, NavbarComponent, FooterComponent, MobileNavbarComponent, NgIf], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent { title = 'itzmineydev'; + isMobile: boolean; + + constructor(private deviceService: DeviceDetectorService) { + this.isMobile = this.deviceService.isMobile(); + } } diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 052b4e7..be6e994 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,7 +1,6 @@ import { Routes } from '@angular/router'; import { AboutComponent } from './about/about.component'; import { PortfolioComponent } from './portfolio/portfolio.component'; -import { ContactComponent } from './contact/contact.component'; import { BlogComponent } from './blog/blog.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: 'about', component: AboutComponent }, { path: 'portfolio', component: PortfolioComponent }, - { path: 'contact', component: ContactComponent }, { path: 'blog', component: BlogComponent }, { path: '**', pathMatch: 'full', component: NotFoundComponent }, diff --git a/src/app/blog/blog.component.css b/src/app/blog/blog.component.css index 67cdc91..1ded4d5 100644 --- a/src/app/blog/blog.component.css +++ b/src/app/blog/blog.component.css @@ -30,3 +30,17 @@ font-weight: 400; 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; +} diff --git a/src/app/blog/blog.component.html b/src/app/blog/blog.component.html index 8ef8094..ac52d6b 100644 --- a/src/app/blog/blog.component.html +++ b/src/app/blog/blog.component.html @@ -1,6 +1,10 @@
-
+
+

Soon™

+

Under Construction!

+
+

Soon™

Under Construction!

diff --git a/src/app/blog/blog.component.spec.ts b/src/app/blog/blog.component.spec.ts deleted file mode 100644 index 7998b08..0000000 --- a/src/app/blog/blog.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BlogComponent } from './blog.component'; - -describe('BlogComponent', () => { - let component: BlogComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [BlogComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(BlogComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/blog/blog.component.ts b/src/app/blog/blog.component.ts index 90737d5..660a676 100644 --- a/src/app/blog/blog.component.ts +++ b/src/app/blog/blog.component.ts @@ -1,14 +1,21 @@ import {Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core'; import {Meta, Title} from '@angular/platform-browser'; +import { DeviceDetectorService } from 'ngx-device-detector'; +import {NgIf} from '@angular/common'; @Component({ selector: 'app-blog', - imports: [], + imports: [ + NgIf + ], templateUrl: './blog.component.html', styleUrl: './blog.component.css' }) 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; ngOnInit() { diff --git a/src/app/contact/contact.component.css b/src/app/contact/contact.component.css deleted file mode 100644 index a8e7a9c..0000000 --- a/src/app/contact/contact.component.css +++ /dev/null @@ -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; - } -} diff --git a/src/app/contact/contact.component.html b/src/app/contact/contact.component.html deleted file mode 100644 index 361ee26..0000000 --- a/src/app/contact/contact.component.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
-
-

Contact

-

Lets get in touch!

-
-

Contact Form

-
-
-
- - - - - - - - - -
-
-
-
-
diff --git a/src/app/contact/contact.component.spec.ts b/src/app/contact/contact.component.spec.ts deleted file mode 100644 index dae8ee6..0000000 --- a/src/app/contact/contact.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ContactComponent } from './contact.component'; - -describe('ContactComponent', () => { - let component: ContactComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [ContactComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(ContactComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts deleted file mode 100644 index a4008ff..0000000 --- a/src/app/contact/contact.component.ts +++ /dev/null @@ -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() { - - } -} diff --git a/src/app/footer/footer.component.spec.ts b/src/app/footer/footer.component.spec.ts deleted file mode 100644 index 3f93915..0000000 --- a/src/app/footer/footer.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { FooterComponent } from './footer.component'; - -describe('FooterComponent', () => { - let component: FooterComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [FooterComponent] - }) - .compileComponents(); - - fixture = TestBed.createComponent(FooterComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/mobile-navbar/mobile-navbar.component.css b/src/app/mobile-navbar/mobile-navbar.component.css new file mode 100644 index 0000000..9ebf306 --- /dev/null +++ b/src/app/mobile-navbar/mobile-navbar.component.css @@ -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; +} diff --git a/src/app/mobile-navbar/mobile-navbar.component.html b/src/app/mobile-navbar/mobile-navbar.component.html new file mode 100644 index 0000000..09185e9 --- /dev/null +++ b/src/app/mobile-navbar/mobile-navbar.component.html @@ -0,0 +1,17 @@ +
+ + + + +
+ + +
+
diff --git a/src/app/mobile-navbar/mobile-navbar.component.ts b/src/app/mobile-navbar/mobile-navbar.component.ts new file mode 100644 index 0000000..1134aae --- /dev/null +++ b/src/app/mobile-navbar/mobile-navbar.component.ts @@ -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 + } + }); + } +} diff --git a/src/app/navbar/navbar.component.html b/src/app/navbar/navbar.component.html index ea6f713..a98146c 100644 --- a/src/app/navbar/navbar.component.html +++ b/src/app/navbar/navbar.component.html @@ -1,8 +1,8 @@ -