content will be here
diff --git a/src/app/components/main/main-root/main-root.component.scss b/src/app/components/main/main-root/main-root.component.scss
index 95997d2..6343d15 100644
--- a/src/app/components/main/main-root/main-root.component.scss
+++ b/src/app/components/main/main-root/main-root.component.scss
@@ -1,5 +1,17 @@
:host {
display: block;
+ position: relative;
+ width: 100vw;
+ height: 100vh;
+ overflow: hidden;
+
+ img {
+ position: absolute;
+ height: 100%;
+ top: 0;
+ left: 50%;
+ translate: -50% 0%;
+ }
.main-wrapper {
display: flex;
diff --git a/src/app/components/main/main-root/main-root.component.ts b/src/app/components/main/main-root/main-root.component.ts
index 8a9fb67..56eac22 100644
--- a/src/app/components/main/main-root/main-root.component.ts
+++ b/src/app/components/main/main-root/main-root.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import { FastAverageColor } from 'fast-average-color';
+import { FastAverageColor, FastAverageColorResult } from 'fast-average-color';
@Component({
selector: 'app-main-root',
@@ -7,18 +7,30 @@ import { FastAverageColor } from 'fast-average-color';
styleUrls: ['./main-root.component.scss'],
})
export class MainRootComponent implements OnInit {
- image: string = 'assets/games-icons/gmod.png';
+ image: string = 'assets/games/minecraft/backgrounds/5.webp';
+ color?: FastAverageColorResult;
constructor() {}
- ngOnInit(): void {
- this.setColors();
+ ngAfterViewInit(): void {
+ //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
+ //Add 'implements AfterViewInit' to the class.
+ window.addEventListener('load', () => {
+ this.setColors();
+ });
}
+ ngOnInit(): void {}
+
setColors() {
// extractColors(this.image).then((value) => {
// console.log(value);
// });
- console.log(FastAverageColor);
+ let fac = new FastAverageColor();
+ this.color = fac.getColor(
+ document.getElementById('image') as HTMLImageElement
+ );
+
+ console.log(this.color);
}
}
diff --git a/src/app/components/sign-in/sign-in.component.html b/src/app/components/sign-in/sign-in.component.html
new file mode 100644
index 0000000..c094911
--- /dev/null
+++ b/src/app/components/sign-in/sign-in.component.html
@@ -0,0 +1,12 @@
+
+
+
+ Sign in with Discord
+
+
+
+ Please, check your default browser and click 'Continue' after Discord authentication:
+
+ Continue
+
+
diff --git a/src/app/components/sign-in/sign-in.component.scss b/src/app/components/sign-in/sign-in.component.scss
new file mode 100644
index 0000000..ac2970b
--- /dev/null
+++ b/src/app/components/sign-in/sign-in.component.scss
@@ -0,0 +1,23 @@
+:host {
+ display: flex;
+ width: 100vw;
+ height: 100vh;
+ justify-content: center;
+ align-items: center;
+
+ .sk-state {
+ width: 300px;
+ padding: var(--sk-gap-xl);
+ background-color: rgba(255, 255, 255, 0.05);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ border-radius: var(--sk-br-m);
+ gap: var(--sk-gap-l);
+
+ skirda-text {
+ text-align: center;
+ }
+ }
+}
diff --git a/src/app/components/sign-in/sign-in.component.spec.ts b/src/app/components/sign-in/sign-in.component.spec.ts
new file mode 100644
index 0000000..bd946e2
--- /dev/null
+++ b/src/app/components/sign-in/sign-in.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SignInComponent } from './sign-in.component';
+
+describe('SignInComponent', () => {
+ let component: SignInComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ SignInComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(SignInComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/sign-in/sign-in.component.ts b/src/app/components/sign-in/sign-in.component.ts
new file mode 100644
index 0000000..00c70e7
--- /dev/null
+++ b/src/app/components/sign-in/sign-in.component.ts
@@ -0,0 +1,14 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-sign-in',
+ templateUrl: './sign-in.component.html',
+ styleUrls: ['./sign-in.component.scss'],
+})
+export class SignInComponent implements OnInit {
+ inProgress: boolean = false;
+
+ constructor() {}
+
+ ngOnInit(): void {}
+}
diff --git a/src/app/components/sign-in/sign-in.module.ts b/src/app/components/sign-in/sign-in.module.ts
new file mode 100644
index 0000000..a1bfc48
--- /dev/null
+++ b/src/app/components/sign-in/sign-in.module.ts
@@ -0,0 +1,12 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { SignInComponent } from './sign-in.component';
+import { ButtonModule } from 'projects/ui/src/lib/button/button.module';
+import { IconModule, TypographyModule } from 'projects/ui/src/public-api';
+
+@NgModule({
+ declarations: [SignInComponent],
+ imports: [CommonModule, ButtonModule, IconModule, TypographyModule],
+ exports: [SignInComponent],
+})
+export class SignInModule {}
diff --git a/src/app/modules/app-routing.module.ts b/src/app/modules/app-routing.module.ts
index c67ee7d..ff895ea 100644
--- a/src/app/modules/app-routing.module.ts
+++ b/src/app/modules/app-routing.module.ts
@@ -3,6 +3,7 @@ import { RouterModule, Routes } from '@angular/router';
import { MainRootComponent } from '../components/main/main-root/main-root.component';
import { PlaygroundComponent } from '../components/playground/playground.component';
import { SandboxComponent } from '../components/sandbox/sandbox.component';
+import { SignInComponent } from '../components/sign-in/sign-in.component';
const routes: Routes = [
{
@@ -17,6 +18,10 @@ const routes: Routes = [
path: 'sandbox',
component: SandboxComponent,
},
+ {
+ path: 'sign-in',
+ component: SignInComponent,
+ },
];
@NgModule({
diff --git a/src/assets/icons/Name=discord.svg b/src/assets/icons/Name=discord.svg
new file mode 100644
index 0000000..d198389
--- /dev/null
+++ b/src/assets/icons/Name=discord.svg
@@ -0,0 +1,3 @@
+