Commit e79c0327 by Natthaphat Pankiang

หน้า signup

parent 89580e27
@media (min-width: 480px){
.authentication-page{
padding-top: 1rem;
padding-bottom: 1rem;
}
}
.cover::before{
position: absolute;
left: 0px;
right: 0px;
top: 0px;
z-index: -1;
height: 100%;
width: 100%;
content: var(--tw-content);
background-image: url('/assets/img/register_images/bg_signup.jpg');
background-size: cover;
background-position: center;
}
\ No newline at end of file
import { Component } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { Component, ElementRef, Inject, Renderer2 } from '@angular/core';
@Component({
selector: 'app-register-page',
......@@ -6,5 +7,38 @@ import { Component } from '@angular/core';
styleUrls: ['./register-page.component.scss']
})
export class RegisterPageComponent {
constructor(@Inject(DOCUMENT) private document: Document,private elementRef: ElementRef,
private renderer: Renderer2) {}
ngOnInit(): void {
this.renderer.addClass(this.document.body, 'h-full');
this.renderer.addClass(this.document.body, '!py-0');
this.renderer.addClass(this.document.body, 'bg-white');
this.renderer.addClass(this.document.body, 'dark:bg-bgdark');
const authe : any = document.querySelector('.auth');
authe.setAttribute('class','h-full');
const html: any = this.elementRef.nativeElement.ownerDocument.documentElement;
html.classList.add('h-full', 'light');
html.removeAttribute('data-header-styles', 'light');
if (localStorage.getItem('synto-header-mode') == 'dark') {
const html: any = this.elementRef.nativeElement.ownerDocument.documentElement;
html.classList.add('h-full', 'dark');
}
}
ngOnDestroy(): void {
this.renderer.removeClass(this.document.body, 'h-full');
this.renderer.removeClass(this.document.body, '!py-0');
this.renderer.removeClass(this.document.body, 'bg-white');
this.renderer.removeClass(this.document.body, 'dark:bg-bgdark');
if (localStorage.getItem('synto-header-mode') == 'dark') {
const html: any = this.elementRef.nativeElement.ownerDocument.documentElement;
html.classList.remove('h-full', 'dark');
}
const authe: any = document.querySelector('.h-full');
authe.removeAttribute('class', 'h-full');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment