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

+14
View File
@@ -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;
}
+5 -1
View File
@@ -1,6 +1,10 @@
<div id="vanta-blog-bg"></div>
<div class="container" id="container">
<div class="error-message">
<div class="error-message" *ngIf="!isMobile">
<h1>Soon&#8482;</h1>
<p>Under Construction!</p>
</div>
<div class="error-message-mobile" *ngIf="isMobile">
<h1>Soon&#8482;</h1>
<p>Under Construction!</p>
</div>
-23
View File
@@ -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();
});
});
+9 -2
View File
@@ -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() {