complete visual overhaul
This commit is contained in:
1 parent
02bc2faca0
commit
25d06ec49a
51 files changed
+694
-664
No files matched your search
@@ -1,31 +1,29 @@
|
||||
import {AfterViewInit, Component, Inject, OnDestroy, OnInit, PLATFORM_ID} from '@angular/core';
|
||||
import {VantaBackgroundService} from '../shared/services/vanta-background.service';
|
||||
import {AfterViewInit, Component, OnInit,} from '@angular/core';
|
||||
import {DeviceDetectorService} from '../shared/services/device-detector.service';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {isPlatformBrowser, NgIf} from '@angular/common';
|
||||
import {NgIf} from '@angular/common';
|
||||
import {TranslatePipe} from '@ngx-translate/core';
|
||||
import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-services',
|
||||
imports: [
|
||||
NgIf,
|
||||
TranslatePipe
|
||||
TranslatePipe,
|
||||
ParallaxComponent
|
||||
],
|
||||
templateUrl: './tos.component.html',
|
||||
styleUrl: './tos.component.css'
|
||||
})
|
||||
|
||||
export class TosComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
private readonly elementId = 'vanta-tos-bg';
|
||||
export class TosComponent implements OnInit, AfterViewInit {
|
||||
isMobile: boolean = false;
|
||||
activeSection: string = '';
|
||||
copiedSection: string | null = null;
|
||||
|
||||
constructor(
|
||||
private vantaService: VantaBackgroundService,
|
||||
private deviceService: DeviceDetectorService,
|
||||
private titleService: Title,
|
||||
@Inject(PLATFORM_ID) private platformId: Object
|
||||
private titleService: Title
|
||||
) {}
|
||||
|
||||
scrollToSection(event: Event, targetId: string): void {
|
||||
@@ -44,28 +42,11 @@ export class TosComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
ngOnInit() {
|
||||
this.titleService.setTitle('Terms of Service | itzMiney');
|
||||
this.isMobile = this.deviceService.isMobile;
|
||||
if (isPlatformBrowser(this.platformId)) {
|
||||
window.addEventListener('resize', this.onResize.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.vantaService.initVanta(this.elementId, {
|
||||
color: 0x5b417a,
|
||||
backgroundColor: 0x41e3c
|
||||
});
|
||||
this.initScrollTracking();
|
||||
}
|
||||
ngOnDestroy() {
|
||||
this.vantaService.destroyVanta(this.elementId);
|
||||
if (isPlatformBrowser(this.platformId)) {
|
||||
window.removeEventListener('resize', this.onResize);
|
||||
}
|
||||
}
|
||||
|
||||
onResize() {
|
||||
this.vantaService.resizeVanta(this.elementId);
|
||||
}
|
||||
|
||||
initScrollTracking(): void {
|
||||
const sections = Array.from(document.querySelectorAll('section')) as HTMLElement[];
|
||||
|
||||
Reference in new issue
Block a user