-
+
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 6343d15..771d662 100644
--- a/src/app/components/main/main-root/main-root.component.scss
+++ b/src/app/components/main/main-root/main-root.component.scss
@@ -25,8 +25,6 @@
flex: 1;
background-color: rgba(0,0,0,0.05);
display: flex;
- align-items: center;
- justify-content: center;
backdrop-filter: blur(1rem);
}
}
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 56eac22..c8c36c6 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,4 @@
import { Component, OnInit } from '@angular/core';
-import { FastAverageColor, FastAverageColorResult } from 'fast-average-color';
@Component({
selector: 'app-main-root',
@@ -8,29 +7,8 @@ import { FastAverageColor, FastAverageColorResult } from 'fast-average-color';
})
export class MainRootComponent implements OnInit {
image: string = 'assets/games/minecraft/backgrounds/5.webp';
- color?: FastAverageColorResult;
constructor() {}
- 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);
- // });
- let fac = new FastAverageColor();
- this.color = fac.getColor(
- document.getElementById('image') as HTMLImageElement
- );
-
- console.log(this.color);
- }
}
diff --git a/src/app/components/main/main.module.ts b/src/app/components/main/main.module.ts
index e981102..efabc60 100644
--- a/src/app/components/main/main.module.ts
+++ b/src/app/components/main/main.module.ts
@@ -3,12 +3,52 @@ import { CommonModule } from '@angular/common';
import { MainRootComponent } from './main-root/main-root.component';
import { MainMenuComponent } from './main-menu/main-menu.component';
import { UiModule } from 'projects/ui/src/lib/ui.module';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { FormsModule,
+ ReactiveFormsModule } from '@angular/forms';
import { MenuSessionsComponent } from './main-menu/menu-sessions/menu-sessions.component';
+import { MenuGamesComponent } from './main-menu/menu-games/menu-games.component';
+import { ServersPageComponent } from './sections/servers-page/servers-page.component';
+import { FriendsPageComponent } from './sections/friends-page/friends-page.component';
+import { GamesPageComponent } from './sections/games-page/games-page.component';
+import { SessionPageComponent } from './sections/session-page/session-page.component';
+import { GamePageComponent } from './sections/game-page/game-page.component';
+import { MainRoutingModule } from './routing.module'
+import { ButtonModule } from 'projects/ui/src/lib/button/button.module'
+import { TypographyModule } from 'projects/ui/src/lib/typography/typography.module'
+import { IconModule } from 'projects/ui/src/lib/icon/icon.module'
@NgModule({
- declarations: [MainRootComponent, MainMenuComponent, MenuSessionsComponent],
- imports: [CommonModule, UiModule, ReactiveFormsModule, FormsModule],
- exports: [MainRootComponent, MainMenuComponent, MenuSessionsComponent],
+ declarations: [
+ MainRootComponent,
+ MainMenuComponent,
+ MenuSessionsComponent,
+ MenuGamesComponent,
+ ServersPageComponent,
+ FriendsPageComponent,
+ GamesPageComponent,
+ SessionPageComponent,
+ GamePageComponent
+ ],
+ imports: [
+ CommonModule,
+ UiModule,
+ ReactiveFormsModule,
+ FormsModule,
+ MainRoutingModule,
+ TypographyModule,
+ ButtonModule,
+ IconModule
+ ],
+ exports: [
+ MainRootComponent,
+ MainMenuComponent,
+ MenuSessionsComponent,
+ MenuGamesComponent,
+ ServersPageComponent,
+ FriendsPageComponent,
+ GamesPageComponent,
+ SessionPageComponent,
+ GamePageComponent
+ ]
})
export class MainModule {}
diff --git a/src/app/components/main/routing.module.ts b/src/app/components/main/routing.module.ts
new file mode 100644
index 0000000..fcb614d
--- /dev/null
+++ b/src/app/components/main/routing.module.ts
@@ -0,0 +1,35 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router'
+import { MainRootComponent } from './main-root/main-root.component'
+import { FriendsPageComponent } from './sections/friends-page/friends-page.component'
+import { GamePageComponent } from './sections/game-page/game-page.component'
+import { GamesPageComponent } from './sections/games-page/games-page.component'
+import { ServersPageComponent } from './sections/servers-page/servers-page.component'
+import { SessionPageComponent } from './sections/session-page/session-page.component'
+
+const routes: Routes = [{
+ path: '',
+ component: MainRootComponent,
+ children: [{
+ path: 'servers',
+ component: ServersPageComponent
+ }, {
+ path: 'friends',
+ component: FriendsPageComponent
+ }, {
+ path: 'games',
+ component: GamesPageComponent
+ }, {
+ path: 'session/:id',
+ component: SessionPageComponent
+ }, {
+ path: 'game/:id',
+ component: GamePageComponent
+ }]
+}]
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class MainRoutingModule { }
diff --git a/src/app/components/main/sections/_global.scss b/src/app/components/main/sections/_global.scss
new file mode 100644
index 0000000..9f3c85e
--- /dev/null
+++ b/src/app/components/main/sections/_global.scss
@@ -0,0 +1,17 @@
+@mixin page {
+
+ .section {
+ padding: 3rem;
+
+ .section-head {
+
+ .head-title {
+ padding-bottom: var(--sk-gap-xl);
+ }
+ }
+
+ .section-content {
+ padding: var(--sk-gap-xl) 0rem;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/components/main/sections/friends-page/friends-page.component.html b/src/app/components/main/sections/friends-page/friends-page.component.html
new file mode 100644
index 0000000..447d3c1
--- /dev/null
+++ b/src/app/components/main/sections/friends-page/friends-page.component.html
@@ -0,0 +1,8 @@
+
+
+
+ Friends
+
+
Friends page will be here
+
+
\ No newline at end of file
diff --git a/src/app/components/main/sections/friends-page/friends-page.component.scss b/src/app/components/main/sections/friends-page/friends-page.component.scss
new file mode 100644
index 0000000..e61ca7a
--- /dev/null
+++ b/src/app/components/main/sections/friends-page/friends-page.component.scss
@@ -0,0 +1,7 @@
+@use '../global';
+
+:host {
+ display: block;
+
+ @include global.page();
+}
diff --git a/src/app/components/main/sections/friends-page/friends-page.component.spec.ts b/src/app/components/main/sections/friends-page/friends-page.component.spec.ts
new file mode 100644
index 0000000..c30e3d0
--- /dev/null
+++ b/src/app/components/main/sections/friends-page/friends-page.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { FriendsPageComponent } from './friends-page.component';
+
+describe('FriendsPageComponent', () => {
+ let component: FriendsPageComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ FriendsPageComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(FriendsPageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/main/sections/friends-page/friends-page.component.ts b/src/app/components/main/sections/friends-page/friends-page.component.ts
new file mode 100644
index 0000000..73fe4f4
--- /dev/null
+++ b/src/app/components/main/sections/friends-page/friends-page.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-friends-page',
+ templateUrl: './friends-page.component.html',
+ styleUrls: ['./friends-page.component.scss']
+})
+export class FriendsPageComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/components/main/sections/game-page/game-page.component.html b/src/app/components/main/sections/game-page/game-page.component.html
new file mode 100644
index 0000000..465e354
--- /dev/null
+++ b/src/app/components/main/sections/game-page/game-page.component.html
@@ -0,0 +1,14 @@
+
+
+
+ Game
+
+
Game page will be here
+
+
+
+
+ Run game
+
+
+
\ No newline at end of file
diff --git a/src/app/components/main/sections/game-page/game-page.component.scss b/src/app/components/main/sections/game-page/game-page.component.scss
new file mode 100644
index 0000000..e61ca7a
--- /dev/null
+++ b/src/app/components/main/sections/game-page/game-page.component.scss
@@ -0,0 +1,7 @@
+@use '../global';
+
+:host {
+ display: block;
+
+ @include global.page();
+}
diff --git a/src/app/components/main/sections/game-page/game-page.component.spec.ts b/src/app/components/main/sections/game-page/game-page.component.spec.ts
new file mode 100644
index 0000000..cbfd6e1
--- /dev/null
+++ b/src/app/components/main/sections/game-page/game-page.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { GamePageComponent } from './game-page.component';
+
+describe('GamePageComponent', () => {
+ let component: GamePageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ GamePageComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(GamePageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/main/sections/game-page/game-page.component.ts b/src/app/components/main/sections/game-page/game-page.component.ts
new file mode 100644
index 0000000..3297b81
--- /dev/null
+++ b/src/app/components/main/sections/game-page/game-page.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-game-page',
+ templateUrl: './game-page.component.html',
+ styleUrls: ['./game-page.component.scss']
+})
+export class GamePageComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/components/main/sections/games-page/games-page.component.html b/src/app/components/main/sections/games-page/games-page.component.html
new file mode 100644
index 0000000..95f6846
--- /dev/null
+++ b/src/app/components/main/sections/games-page/games-page.component.html
@@ -0,0 +1,8 @@
+
+
+
+ Games
+
+
Games page will be here
+
+
\ No newline at end of file
diff --git a/src/app/components/main/sections/games-page/games-page.component.scss b/src/app/components/main/sections/games-page/games-page.component.scss
new file mode 100644
index 0000000..e61ca7a
--- /dev/null
+++ b/src/app/components/main/sections/games-page/games-page.component.scss
@@ -0,0 +1,7 @@
+@use '../global';
+
+:host {
+ display: block;
+
+ @include global.page();
+}
diff --git a/src/app/components/main/sections/games-page/games-page.component.spec.ts b/src/app/components/main/sections/games-page/games-page.component.spec.ts
new file mode 100644
index 0000000..c0af01c
--- /dev/null
+++ b/src/app/components/main/sections/games-page/games-page.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { GamesPageComponent } from './games-page.component';
+
+describe('GamesPageComponent', () => {
+ let component: GamesPageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ GamesPageComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(GamesPageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/main/sections/games-page/games-page.component.ts b/src/app/components/main/sections/games-page/games-page.component.ts
new file mode 100644
index 0000000..36a0ae6
--- /dev/null
+++ b/src/app/components/main/sections/games-page/games-page.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-games-page',
+ templateUrl: './games-page.component.html',
+ styleUrls: ['./games-page.component.scss']
+})
+export class GamesPageComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/components/main/sections/servers-page/servers-page.component.html b/src/app/components/main/sections/servers-page/servers-page.component.html
new file mode 100644
index 0000000..6cb9f24
--- /dev/null
+++ b/src/app/components/main/sections/servers-page/servers-page.component.html
@@ -0,0 +1,8 @@
+
+
+
+ Servers
+
+
Servers page will be here
+
+
\ No newline at end of file
diff --git a/src/app/components/main/sections/servers-page/servers-page.component.scss b/src/app/components/main/sections/servers-page/servers-page.component.scss
new file mode 100644
index 0000000..e61ca7a
--- /dev/null
+++ b/src/app/components/main/sections/servers-page/servers-page.component.scss
@@ -0,0 +1,7 @@
+@use '../global';
+
+:host {
+ display: block;
+
+ @include global.page();
+}
diff --git a/src/app/components/main/sections/servers-page/servers-page.component.spec.ts b/src/app/components/main/sections/servers-page/servers-page.component.spec.ts
new file mode 100644
index 0000000..bc2f509
--- /dev/null
+++ b/src/app/components/main/sections/servers-page/servers-page.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ServersPageComponent } from './servers-page.component';
+
+describe('ServersPageComponent', () => {
+ let component: ServersPageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ ServersPageComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(ServersPageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/main/sections/servers-page/servers-page.component.ts b/src/app/components/main/sections/servers-page/servers-page.component.ts
new file mode 100644
index 0000000..5e8e2c5
--- /dev/null
+++ b/src/app/components/main/sections/servers-page/servers-page.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-servers-page',
+ templateUrl: './servers-page.component.html',
+ styleUrls: ['./servers-page.component.scss']
+})
+export class ServersPageComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/components/main/sections/session-page/session-page.component.html b/src/app/components/main/sections/session-page/session-page.component.html
new file mode 100644
index 0000000..cfccea9
--- /dev/null
+++ b/src/app/components/main/sections/session-page/session-page.component.html
@@ -0,0 +1,14 @@
+
+
+
+ Session
+
+
Session page will be here
+
+
+
+
+ Run session
+
+
+
\ No newline at end of file
diff --git a/src/app/components/main/sections/session-page/session-page.component.scss b/src/app/components/main/sections/session-page/session-page.component.scss
new file mode 100644
index 0000000..e61ca7a
--- /dev/null
+++ b/src/app/components/main/sections/session-page/session-page.component.scss
@@ -0,0 +1,7 @@
+@use '../global';
+
+:host {
+ display: block;
+
+ @include global.page();
+}
diff --git a/src/app/components/main/sections/session-page/session-page.component.spec.ts b/src/app/components/main/sections/session-page/session-page.component.spec.ts
new file mode 100644
index 0000000..c452d3b
--- /dev/null
+++ b/src/app/components/main/sections/session-page/session-page.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SessionPageComponent } from './session-page.component';
+
+describe('SessionPageComponent', () => {
+ let component: SessionPageComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ SessionPageComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(SessionPageComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/components/main/sections/session-page/session-page.component.ts b/src/app/components/main/sections/session-page/session-page.component.ts
new file mode 100644
index 0000000..edf2c66
--- /dev/null
+++ b/src/app/components/main/sections/session-page/session-page.component.ts
@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'app-session-page',
+ templateUrl: './session-page.component.html',
+ styleUrls: ['./session-page.component.scss']
+})
+export class SessionPageComponent implements OnInit {
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/interfaces/game.interface.ts b/src/app/interfaces/game.interface.ts
index de967b5..f8ad7fb 100644
--- a/src/app/interfaces/game.interface.ts
+++ b/src/app/interfaces/game.interface.ts
@@ -3,5 +3,5 @@ export interface Game {
gameId: string
title: string;
image: string;
- description: string;
+ description?: string;
}
diff --git a/src/app/modules/app-routing.module.ts b/src/app/modules/app-routing.module.ts
index ff895ea..73b7b0e 100644
--- a/src/app/modules/app-routing.module.ts
+++ b/src/app/modules/app-routing.module.ts
@@ -1,6 +1,7 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MainRootComponent } from '../components/main/main-root/main-root.component';
+import { MainRoutingModule } from '../components/main/routing.module'
import { PlaygroundComponent } from '../components/playground/playground.component';
import { SandboxComponent } from '../components/sandbox/sandbox.component';
import { SignInComponent } from '../components/sign-in/sign-in.component';
@@ -12,7 +13,7 @@ const routes: Routes = [
},
{
path: 'main',
- component: MainRootComponent,
+ loadChildren: () => MainRoutingModule
},
{
path: 'sandbox',
diff --git a/src/assets/icons/Name=play.svg b/src/assets/icons/Name=play.svg
new file mode 100644
index 0000000..e1a76c1
--- /dev/null
+++ b/src/assets/icons/Name=play.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/styles.scss b/src/styles.scss
index a652dc5..f90b79d 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -5,6 +5,7 @@ html, body {
}
:root {
+ --sk-gap-xs: 0.125rem;
--sk-gap-s: 0.25rem;
--sk-gap-m: 0.5rem;
--sk-gap-l: 0.75rem;
@@ -17,5 +18,6 @@ html, body {
--sk-accent-dark: #2A3B39;
// border-radius
+ --sk-br-s: 0.25rem;
--sk-br-m: 0.5rem;
}