diff --git a/angular.json b/angular.json
index 192fc6a..954d3c0 100644
--- a/angular.json
+++ b/angular.json
@@ -75,6 +75,9 @@
"browserTarget": "f13_ang_web:build:development"
}
},
+ "options": {
+ "proxyConfig": "src/proxy.conf.json"
+ },
"defaultConfiguration": "development"
},
"extract-i18n": {
diff --git a/package-lock.json b/package-lock.json
index 9cc1dc0..ae70d18 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,10 +9,12 @@
"version": "0.0.0",
"dependencies": {
"@angular/animations": "^14.2.0",
+ "@angular/cdk": "^14.2.7",
"@angular/common": "^14.2.0",
"@angular/compiler": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/forms": "^14.2.0",
+ "@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "^14.2.0",
@@ -368,6 +370,30 @@
"@angular/core": "14.3.0"
}
},
+ "node_modules/@angular/cdk": {
+ "version": "14.2.7",
+ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-14.2.7.tgz",
+ "integrity": "sha512-/tEsYaUbDSnfEmKVvAMramIptmhI67O+9STjOV0i+74XR2NospeK0fkbywIANu1n3w6AHGMotvRWJrjmbCElFg==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.3.0"
+ },
+ "optionalDependencies": {
+ "parse5": "^5.0.0"
+ },
+ "peerDependencies": {
+ "@angular/common": "^14.0.0 || ^15.0.0",
+ "@angular/core": "^14.0.0 || ^15.0.0",
+ "rxjs": "^6.5.3 || ^7.4.0"
+ }
+ },
+ "node_modules/@angular/cdk/node_modules/parse5": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
+ "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
+ "license": "MIT",
+ "optional": true
+ },
"node_modules/@angular/cli": {
"version": "14.2.13",
"resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.2.13.tgz",
@@ -506,6 +532,24 @@
"rxjs": "^6.5.3 || ^7.4.0"
}
},
+ "node_modules/@angular/material": {
+ "version": "14.2.7",
+ "resolved": "https://registry.npmjs.org/@angular/material/-/material-14.2.7.tgz",
+ "integrity": "sha512-WXHh8pEStpgkXZJmYOg2cI8BSHkV82ET4XTJCNPdveumaCn1UYnaNzsXD13kw5z+zmy8CufhFEzdXTrv/yt7KQ==",
+ "license": "MIT",
+ "dependencies": {
+ "tslib": "^2.3.0"
+ },
+ "peerDependencies": {
+ "@angular/animations": "^14.0.0 || ^15.0.0",
+ "@angular/cdk": "14.2.7",
+ "@angular/common": "^14.0.0 || ^15.0.0",
+ "@angular/core": "^14.0.0 || ^15.0.0",
+ "@angular/forms": "^14.0.0 || ^15.0.0",
+ "@angular/platform-browser": "^14.0.0 || ^15.0.0",
+ "rxjs": "^6.5.3 || ^7.4.0"
+ }
+ },
"node_modules/@angular/platform-browser": {
"version": "14.3.0",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.3.0.tgz",
diff --git a/package.json b/package.json
index b70a885..cfe29df 100644
--- a/package.json
+++ b/package.json
@@ -11,10 +11,12 @@
"private": true,
"dependencies": {
"@angular/animations": "^14.2.0",
+ "@angular/cdk": "^14.2.7",
"@angular/common": "^14.2.0",
"@angular/compiler": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/forms": "^14.2.0",
+ "@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "^14.2.0",
@@ -35,4 +37,4 @@
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2"
}
-}
+}
\ No newline at end of file
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 0297262..342041d 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -1,7 +1,10 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
+import {MainPageComponent} from "./pages/main-page/main-page.component";
-const routes: Routes = [];
+const routes: Routes = [
+ { path: "", component: MainPageComponent}
+];
@NgModule({
imports: [RouterModule.forRoot(routes)],
diff --git a/src/app/app.component.html b/src/app/app.component.html
index 2a0fbf1..848f07a 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,484 +1,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ title }} app is running!
-
-
-
-
-
-
-
Resources
-
Here are some links to help you get started:
-
-
-
-
-
Next Steps
-
What do you want to do next with your app?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ng generate component xyz
-
ng add @angular/material
-
ng add @angular/pwa
-
ng add _____
-
ng test
-
ng build
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ факты
+
+
+
+
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts
deleted file mode 100644
index 037ee62..0000000
--- a/src/app/app.component.spec.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { TestBed } from '@angular/core/testing';
-import { RouterTestingModule } from '@angular/router/testing';
-import { AppComponent } from './app.component';
-
-describe('AppComponent', () => {
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [
- RouterTestingModule
- ],
- declarations: [
- AppComponent
- ],
- }).compileComponents();
- });
-
- it('should create the app', () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.componentInstance;
- expect(app).toBeTruthy();
- });
-
- it(`should have as title 'f13_ang_web'`, () => {
- const fixture = TestBed.createComponent(AppComponent);
- const app = fixture.componentInstance;
- expect(app.title).toEqual('f13_ang_web');
- });
-
- it('should render title', () => {
- const fixture = TestBed.createComponent(AppComponent);
- fixture.detectChanges();
- const compiled = fixture.nativeElement as HTMLElement;
- expect(compiled.querySelector('.content span')?.textContent).toContain('f13_ang_web app is running!');
- });
-});
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index c7d5cb1..22a7144 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,4 +1,5 @@
import { Component } from '@angular/core';
+import {BaseUtils} from "./utils/BaseUtils";
@Component({
selector: 'app-root',
@@ -6,5 +7,12 @@ import { Component } from '@angular/core';
styleUrls: ['./app.component.scss']
})
export class AppComponent {
- title = 'f13_ang_web';
+ baseUtils: BaseUtils = new BaseUtils();
+ social_media_links: {link: string, name: string}[] = [
+ {name: "Дискорд", link: "/discord"},
+ {name: "Телеграм", link: "https://t.me/facti13"},
+ {name: "Стим", link: "/steam"}
+ ]
+
+
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index b1c6c96..b1ad21a 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -3,16 +3,33 @@ import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import {MatToolbarModule} from "@angular/material/toolbar";
+import {MatIconModule} from "@angular/material/icon";
+import {MatButtonModule} from "@angular/material/button";
+import {MatGridListModule} from "@angular/material/grid-list";
+import { MainPageComponent } from './pages/main-page/main-page.component';
+import {MatCardModule} from "@angular/material/card";
+import {AnnonceService} from "./services/AnnonceService";
@NgModule({
declarations: [
- AppComponent
+ AppComponent,
+ MainPageComponent
],
imports: [
BrowserModule,
- AppRoutingModule
+ AppRoutingModule,
+ BrowserAnimationsModule,
+ MatToolbarModule,
+ MatIconModule,
+ MatButtonModule,
+ MatGridListModule,
+ MatCardModule
+ ],
+ providers: [
+ AnnonceService
],
- providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
diff --git a/src/app/entities/Annonce.ts b/src/app/entities/Annonce.ts
new file mode 100644
index 0000000..a2f0936
--- /dev/null
+++ b/src/app/entities/Annonce.ts
@@ -0,0 +1,8 @@
+export interface Annonce {
+ header: string
+ short: string
+ full: string|null
+ image: string
+ type: 'news' | 'reason4play',
+ redirect: string|null
+}
diff --git a/src/app/pages/main-page/main-page.component.html b/src/app/pages/main-page/main-page.component.html
new file mode 100644
index 0000000..55e6f90
--- /dev/null
+++ b/src/app/pages/main-page/main-page.component.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
{{b.ico}}
+
+
{{b.name}}
+
+
+
+
+
person
+
Сейчас играют
+
555
+
+
+
person
+
Сейчас играют
+
555
+
+
person
+
Сейчас играют
+
555
+
+
+
i love search
+
+
+
+
+
+
+
Интереснные приколы
+
+
+ {{a.header}}
+ {{a.short}}
+
+
+
+
Почему стоит начать играть?
+
+
+ {{a.header}}
+ {{a.short}}
+
+
+
diff --git a/src/app/pages/main-page/main-page.component.scss b/src/app/pages/main-page/main-page.component.scss
new file mode 100644
index 0000000..457c8e3
--- /dev/null
+++ b/src/app/pages/main-page/main-page.component.scss
@@ -0,0 +1,12 @@
+.card-annonce {
+ width: 28%;
+}
+
+.card-annonces-container {
+ display: flex; flex-wrap: wrap; justify-content: space-between
+}
+
+.card-text-color {
+ color: white;
+}
+
diff --git a/src/app/pages/main-page/main-page.component.ts b/src/app/pages/main-page/main-page.component.ts
new file mode 100644
index 0000000..3f6b2cb
--- /dev/null
+++ b/src/app/pages/main-page/main-page.component.ts
@@ -0,0 +1,39 @@
+import { Component, OnInit } from '@angular/core';
+import {AnnonceService} from "../../services/AnnonceService";
+import {Annonce} from "../../entities/Annonce";
+
+@Component({
+ selector: 'app-main-page',
+ templateUrl: './main-page.component.html',
+ styleUrls: ['./main-page.component.scss']
+})
+export class MainPageComponent implements OnInit {
+ go2urls: {ico: string, name: string, url: string}[] = [
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'},
+ {ico: 'download', name: 'бля', url: '/'}
+ ]
+
+
+ constructor(private annoncesService: AnnonceService) { }
+
+ ngOnInit(): void {
+ }
+
+ getAnnonces(type: any, limit: number = 3): Annonce[] {
+ return this.annoncesService.getAnnonces(type);
+ }
+
+ generateStyle4Card(a: Annonce) {
+ return {
+ 'background': 'linear-gradient(to right, transparent, mistyrose), url(\''+a.image+'\')',
+ 'background-size': 'cover'
+ }
+ }
+
+}
diff --git a/src/app/services/AnnonceService.ts b/src/app/services/AnnonceService.ts
new file mode 100644
index 0000000..868060b
--- /dev/null
+++ b/src/app/services/AnnonceService.ts
@@ -0,0 +1,20 @@
+import {Annonce} from "../entities/Annonce";
+import {Injectable} from "@angular/core";
+import {MatPaginator, MatPaginatorIntl} from "@angular/material/paginator";
+
+@Injectable()
+export class AnnonceService {
+ annonces: Annonce[] = [
+ {header: 'Пиздатая коллекция карт', short: 'Жми сюда карлик и получи пачку карт факты13', full: null, type: 'news', image: '../../../../assets/images/test.jpg', redirect: null},
+ {header: 'Крутые поделки наших работяг', short: 'Заходи в дискорд и насоалист качественным исскуством самых рукастых карликов', full: null, type: 'news', image: '../../../../assets/images/test.jpg', redirect: null},
+ {header: 'Ютуб канал какого-то злодея', short: 'Зацени забавные видосики по нашему серверу', full: null, type: 'news', image: '../../../../assets/images/test.jpg', redirect: null},
+ {header: 'Уникальный опыт', short: 'Все карты на сервере уникальны и сделаны нами, ты всегда можншь найти место по вкусу!', full: null, type: 'reason4play', image: '../../../../assets/images/test.jpg', redirect: null},
+ {header: 'Качественный геймплей', short: 'Большенство плагинов на сервере сделаны нами и добавляют некий шарм в геймплей.', full: null, type: 'reason4play', image: '../../../../assets/images/test.jpg', redirect: null},
+ {header: 'Отсутствие правил', short: 'Правила для вас не писаны(каканы), можете делать всё что душе угодно, но ожидайте что вам дадут пиздюлей наши модераторы.', full: null, type: 'reason4play', image: '../../../../assets/images/test.jpg', redirect: null},
+ {header: 'Uptime 99%', short: 'Сервера работают на божем слове, так что шанс что проект закроется стремится к нулю. Конечно пока нам не надоест.', full: null, type: 'reason4play', image: '../../../../assets/images/test.jpg', redirect: null},
+ ]
+
+ getAnnonces(type: 'news' | 'reason4play'): Annonce[] {
+ return this.annonces.filter((a) => a.type == type)
+ }
+}
diff --git a/src/app/utils/BaseUtils.ts b/src/app/utils/BaseUtils.ts
new file mode 100644
index 0000000..1934add
--- /dev/null
+++ b/src/app/utils/BaseUtils.ts
@@ -0,0 +1,5 @@
+export class BaseUtils {
+ openUrlInNewWindow(url: string) {
+ window.open(url, "_blank");
+ }
+}
diff --git a/src/assets/images/Engineertaunt1.png b/src/assets/images/Engineertaunt1.png
new file mode 100644
index 0000000..c6009f4
Binary files /dev/null and b/src/assets/images/Engineertaunt1.png differ
diff --git a/src/assets/images/test.jpg b/src/assets/images/test.jpg
new file mode 100644
index 0000000..da16c56
Binary files /dev/null and b/src/assets/images/test.jpg differ
diff --git a/src/index.html b/src/index.html
index bffae24..546649e 100644
--- a/src/index.html
+++ b/src/index.html
@@ -6,6 +6,9 @@
+
+
+
diff --git a/src/proxy.conf.json b/src/proxy.conf.json
new file mode 100644
index 0000000..190fb95
--- /dev/null
+++ b/src/proxy.conf.json
@@ -0,0 +1,6 @@
+{
+ "/api": {
+ "target": "http://192.168.3.3:26272/",
+ "secure": false
+ }
+}
diff --git a/src/styles.scss b/src/styles.scss
index 90d4ee0..e704f76 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -1 +1,55 @@
+
+// Custom Theming for Angular Material
+// For more information: https://material.angular.io/guide/theming
+@use '@angular/material' as mat;
+// Plus imports for other components in your app.
+
+// Include the common styles for Angular Material. We include this here so that you only
+// have to load a single css file for Angular Material in your app.
+// Be sure that you only ever include this mixin once!
+@include mat.core();
+
+// Define the palettes for your theme using the Material Design palettes available in palette.scss
+// (imported above). For each palette, you can optionally specify a default, lighter, and darker
+// hue. Available color palettes: https://material.io/design/color/
+$f13_ang_web-primary: mat.define-palette(mat.$red-palette);
+$f13_ang_web-accent: mat.define-palette(mat.$red-palette, A200, A100, A400);
+
+// The warn palette is optional (defaults to red).
+$f13_ang_web-warn: mat.define-palette(mat.$red-palette);
+
+// Create the theme object. A theme consists of configurations for individual
+// theming systems such as "color" or "typography".
+$f13_ang_web-theme: mat.define-light-theme((
+ color: (
+ primary: $f13_ang_web-primary,
+ accent: $f13_ang_web-accent,
+ warn: $f13_ang_web-warn,
+ )
+));
+
+// Include theme styles for core and each component used in your app.
+// Alternatively, you can import and @include the theme mixins for each component
+// that you are using.
+@include mat.all-component-themes($f13_ang_web-theme);
+
/* You can add global styles to this file, and also import other style files */
+
+html, body { height: 100%; }
+body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
+
+.spacer {
+ flex: 1 1 auto;
+}
+
+.f13_color_primary {
+ color: #ef7f41;
+}
+
+.f13_color_secondary {
+ color: #d6473c;
+}
+
+.f13_color_extra {
+ color: #5e7edf;
+}
diff --git a/tsconfig.json b/tsconfig.json
index ff06eae..333c207 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -27,6 +27,7 @@
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
- "strictTemplates": true
+ "strictTemplates": true,
+ "skipLibCheck": true
}
}