Made Mobile Detection more robust
This commit is contained in:
1 parent
4422cf448b
commit
2782cb4d45
7 files changed
+35
-18
No files matched your search
@@ -1,13 +1,18 @@
|
|||||||
<div id="vanta-about-bg"></div>
|
<div id="vanta-about-bg"></div>
|
||||||
|
|
||||||
<div class="about-container">
|
<div class="about-container">
|
||||||
<div class="about-header" *ngIf="!isMobile">
|
<ng-container *ngIf="!isMobile; else mobileContainer">
|
||||||
<h1>About Me</h1>
|
<div class="about-header" *ngIf="!isMobile">
|
||||||
<p class="subtitle">Hobby developer & designer</p>
|
<h1>About Me</h1>
|
||||||
</div>
|
<p class="subtitle">Hobby developer & designer</p>
|
||||||
<div class="about-header-mobile" *ngIf="isMobile">
|
</div>
|
||||||
<h1>About Me</h1>
|
</ng-container>
|
||||||
<p class="subtitle">Hobby developer & designer</p>
|
<ng-template #mobileContainer>
|
||||||
</div>
|
<div class="about-header-mobile" *ngIf="isMobile">
|
||||||
|
<h1>About Me</h1>
|
||||||
|
<p class="subtitle">Hobby developer & designer</p>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
<div class="about-content">
|
<div class="about-content">
|
||||||
<p>
|
<p>
|
||||||
@@ -18,8 +23,12 @@
|
|||||||
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 class="tech-stack-title" *ngIf="!isMobile">Tech Stack</h3>
|
<ng-container *ngIf="!isMobile; else mobileTechStack">
|
||||||
<h3 class="tech-stack-title-mobile" *ngIf="isMobile">Tech Stack</h3>
|
<h3 class="tech-stack-title" *ngIf="!isMobile">Tech Stack</h3>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #mobileTechStack>
|
||||||
|
<h3 class="tech-stack-title-mobile" *ngIf="isMobile">Tech Stack</h3>
|
||||||
|
</ng-template>
|
||||||
<div class="tech-stack">
|
<div class="tech-stack">
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<h4>= WEB SERVERS =</h4>
|
<h4>= WEB SERVERS =</h4>
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ export class AboutComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@Inject(PLATFORM_ID) private platformId: Object
|
@Inject(PLATFORM_ID) private platformId: Object
|
||||||
) {
|
) {
|
||||||
this.isMobile = this.deviceService.isMobile();
|
|
||||||
}
|
}
|
||||||
isMobile: boolean;
|
isMobile: boolean = false;
|
||||||
private vantaEffect: any;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
const metaData = this.route.snapshot.data['meta'];
|
const metaData = this.route.snapshot.data['meta'];
|
||||||
if (metaData?.title) {
|
if (metaData?.title) {
|
||||||
this.title.setTitle(metaData.title);
|
this.title.setTitle(metaData.title);
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
<div id="vanta-blog-bg"></div>
|
<div id="vanta-blog-bg"></div>
|
||||||
<div class="container" id="container">
|
<div class="container" id="container">
|
||||||
|
<ng-container *ngIf="!isMobile; else mobileError">
|
||||||
<div class="error-message" *ngIf="!isMobile">
|
<div class="error-message" *ngIf="!isMobile">
|
||||||
<h1>Soon™</h1>
|
<h1>Soon™</h1>
|
||||||
<p>Under Construction!</p>
|
<p>Under Construction!</p>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #mobileError>
|
||||||
<div class="error-message-mobile" *ngIf="isMobile">
|
<div class="error-message-mobile" *ngIf="isMobile">
|
||||||
<h1>Soon™</h1>
|
<h1>Soon™</h1>
|
||||||
<p>Under Construction!</p>
|
<p>Under Construction!</p>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,12 +22,12 @@ export class BlogComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@Inject(PLATFORM_ID) private platformId: Object
|
@Inject(PLATFORM_ID) private platformId: Object
|
||||||
) {
|
) {
|
||||||
this.isMobile = this.deviceService.isMobile();
|
|
||||||
}
|
}
|
||||||
isMobile: boolean;
|
isMobile: boolean = false;
|
||||||
private vantaEffect: any;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
const metaData = this.route.snapshot.data['meta'];
|
const metaData = this.route.snapshot.data['meta'];
|
||||||
if (metaData?.title) {
|
if (metaData?.title) {
|
||||||
this.title.setTitle(metaData.title);
|
this.title.setTitle(metaData.title);
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ export class NotFoundComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@Inject(PLATFORM_ID) private platformId: Object
|
@Inject(PLATFORM_ID) private platformId: Object
|
||||||
) {
|
) {
|
||||||
this.isMobile = this.deviceService.isMobile();
|
|
||||||
}
|
}
|
||||||
isMobile: boolean;
|
isMobile: boolean = false;
|
||||||
private vantaEffect: any;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
const metaData = this.route.snapshot.data['meta'];
|
const metaData = this.route.snapshot.data['meta'];
|
||||||
if (metaData?.title) {
|
if (metaData?.title) {
|
||||||
this.title.setTitle(metaData.title);
|
this.title.setTitle(metaData.title);
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
<div id="vanta-portfolio-bg"></div>
|
<div id="vanta-portfolio-bg"></div>
|
||||||
<div class="portfolio-container">
|
<div class="portfolio-container">
|
||||||
|
<ng-container *ngIf="!isMobile; else mobileContainer">
|
||||||
<div class="portfolio-header" *ngIf="!isMobile">
|
<div class="portfolio-header" *ngIf="!isMobile">
|
||||||
<h1>My Portfolio</h1>
|
<h1>My Portfolio</h1>
|
||||||
<p class="subtitle">Projects & Designs</p>
|
<p class="subtitle">Projects & Designs</p>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
<ng-template #mobileContainer>
|
||||||
<div class="portfolio-header-mobile" *ngIf="isMobile">
|
<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>
|
||||||
|
</ng-template>
|
||||||
<div class="text-content">
|
<div class="text-content">
|
||||||
<p>
|
<p>
|
||||||
Welcome to my portfolio!<br><br>
|
Welcome to my portfolio!<br><br>
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ export class PortfolioComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@Inject(PLATFORM_ID) private platformId: Object
|
@Inject(PLATFORM_ID) private platformId: Object
|
||||||
) {
|
) {
|
||||||
this.isMobile = this.deviceService.isMobile();
|
|
||||||
}
|
}
|
||||||
isMobile: boolean;
|
isMobile: boolean = false;
|
||||||
private vantaEffect: any;
|
private vantaEffect: any;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.isMobile = this.deviceService.isMobile();
|
||||||
const metaData = this.route.snapshot.data['meta'];
|
const metaData = this.route.snapshot.data['meta'];
|
||||||
if (metaData?.title) {
|
if (metaData?.title) {
|
||||||
this.title.setTitle(metaData.title);
|
this.title.setTitle(metaData.title);
|
||||||
|
|||||||
Reference in new issue
Block a user