Small UI fixing
This commit is contained in:
@@ -19,7 +19,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"browser": "src/main.ts",
|
"browser": "src/main.ts",
|
||||||
"polyfills": [
|
"polyfills": [
|
||||||
"zone.js"
|
"zone.js",
|
||||||
|
"@angular/localize/init"
|
||||||
],
|
],
|
||||||
"tsConfig": "tsconfig.app.json",
|
"tsConfig": "tsconfig.app.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
@@ -30,6 +31,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
|
{
|
||||||
|
"input": "node_modules/@progress/kendo-theme-default/dist/all.css"
|
||||||
|
},
|
||||||
"@angular/material/prebuilt-themes/cyan-orange.css",
|
"@angular/material/prebuilt-themes/cyan-orange.css",
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
]
|
]
|
||||||
@@ -78,7 +82,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"polyfills": [
|
"polyfills": [
|
||||||
"zone.js",
|
"zone.js",
|
||||||
"zone.js/testing"
|
"zone.js/testing",
|
||||||
|
"@angular/localize/init"
|
||||||
],
|
],
|
||||||
"tsConfig": "tsconfig.spec.json",
|
"tsConfig": "tsconfig.spec.json",
|
||||||
"inlineStyleLanguage": "scss",
|
"inlineStyleLanguage": "scss",
|
||||||
@@ -89,6 +94,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"styles": [
|
"styles": [
|
||||||
|
{
|
||||||
|
"input": "node_modules/@progress/kendo-theme-default/dist/all.css"
|
||||||
|
},
|
||||||
"@angular/material/prebuilt-themes/cyan-orange.css",
|
"@angular/material/prebuilt-themes/cyan-orange.css",
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
]
|
]
|
||||||
@@ -97,4 +105,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
+1062
-83
File diff suppressed because it is too large
Load Diff
@@ -17,12 +17,35 @@
|
|||||||
"@angular/compiler": "^20.0.0",
|
"@angular/compiler": "^20.0.0",
|
||||||
"@angular/core": "^20.0.0",
|
"@angular/core": "^20.0.0",
|
||||||
"@angular/forms": "^20.0.0",
|
"@angular/forms": "^20.0.0",
|
||||||
|
"@angular/localize": "^20.0.0",
|
||||||
"@angular/material": "^20.0.3",
|
"@angular/material": "^20.0.3",
|
||||||
"@angular/platform-browser": "^20.0.0",
|
"@angular/platform-browser": "^20.0.0",
|
||||||
"@angular/platform-browser-dynamic": "^20.0.3",
|
"@angular/platform-browser-dynamic": "^20.0.3",
|
||||||
"@angular/platform-server": "^20.0.0",
|
"@angular/platform-server": "^20.0.0",
|
||||||
"@angular/router": "^20.0.0",
|
"@angular/router": "^20.0.0",
|
||||||
"@angular/ssr": "^20.0.2",
|
"@angular/ssr": "^20.0.2",
|
||||||
|
"@progress/kendo-angular-buttons": "19.1.1",
|
||||||
|
"@progress/kendo-angular-common": "19.1.1",
|
||||||
|
"@progress/kendo-angular-dialog": "19.1.1",
|
||||||
|
"@progress/kendo-angular-dropdowns": "19.1.1",
|
||||||
|
"@progress/kendo-angular-editor": "^19.1.1",
|
||||||
|
"@progress/kendo-angular-icons": "19.1.1",
|
||||||
|
"@progress/kendo-angular-indicators": "^19.1.1",
|
||||||
|
"@progress/kendo-angular-inputs": "19.1.1",
|
||||||
|
"@progress/kendo-angular-intl": "19.1.1",
|
||||||
|
"@progress/kendo-angular-l10n": "19.1.1",
|
||||||
|
"@progress/kendo-angular-label": "19.1.1",
|
||||||
|
"@progress/kendo-angular-layout": "19.1.1",
|
||||||
|
"@progress/kendo-angular-navigation": "19.1.1",
|
||||||
|
"@progress/kendo-angular-popup": "19.1.1",
|
||||||
|
"@progress/kendo-angular-progressbar": "19.1.1",
|
||||||
|
"@progress/kendo-angular-toolbar": "19.1.1",
|
||||||
|
"@progress/kendo-angular-treeview": "19.1.1",
|
||||||
|
"@progress/kendo-angular-utils": "^19.1.1",
|
||||||
|
"@progress/kendo-drawing": "^1.21.0",
|
||||||
|
"@progress/kendo-licensing": "^1.5.0",
|
||||||
|
"@progress/kendo-svg-icons": "^4.0.0",
|
||||||
|
"@progress/kendo-theme-default": "11.0.2",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"rxjs": "~7.8.0",
|
"rxjs": "~7.8.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
@@ -1,5 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<nav class="navbar navbar-expand navbar-dark bg-dark">
|
<!-- <nav class="navbar navbar-expand navbar-dark bg-dark">
|
||||||
<a href="#" class="navbar-brand">Spring-AngularTS</a>
|
<a href="#" class="navbar-brand">Spring-AngularTS</a>
|
||||||
|
|
||||||
<ul class="navbar-nav mr-auto" routerLinkActive="active">
|
<ul class="navbar-nav mr-auto" routerLinkActive="active">
|
||||||
@@ -41,16 +41,28 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</nav>
|
</nav>-->
|
||||||
<mat-toolbar>
|
<mat-toolbar>
|
||||||
|
|
||||||
<button mat-raised-button routerLink="/" href="#">
|
<button mat-raised-button routerLink="/" href="#">
|
||||||
My App
|
My App
|
||||||
</button>
|
</button>
|
||||||
<span>My App
|
|
||||||
</span>
|
|
||||||
<span class="example-spacer"></span>
|
<span class="example-spacer"></span>
|
||||||
<button mat-raised-button *ngIf="!isLoggedIn">
|
<button mat-raised-button routerLink="tutorials">
|
||||||
|
Tutorials
|
||||||
|
</button>
|
||||||
|
<button mat-raised-button routerLink="add" *ngIf="isLoggedIn">
|
||||||
|
Add tutorial
|
||||||
|
</button>
|
||||||
|
<span class="example-spacer"></span>
|
||||||
|
@if (showAdminBoard) {
|
||||||
|
<button mat-raised-button routerLink="admin" >
|
||||||
|
<mat-icon>manage_accounts</mat-icon>
|
||||||
|
Admin Bord
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
|
||||||
|
<span class="example-spacer"></span>
|
||||||
|
<button mat-raised-button routerLink="register" *ngIf="!isLoggedIn">
|
||||||
<mat-icon>app_registration</mat-icon>
|
<mat-icon>app_registration</mat-icon>
|
||||||
Register
|
Register
|
||||||
</button>
|
</button>
|
||||||
@@ -60,7 +72,7 @@
|
|||||||
Login
|
Login
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-raised-button *ngIf="isLoggedIn">
|
<button mat-raised-button routerLink="profile" *ngIf="isLoggedIn">
|
||||||
<mat-icon>account_circle</mat-icon>
|
<mat-icon>account_circle</mat-icon>
|
||||||
{{ username }}
|
{{ username }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -4,3 +4,7 @@
|
|||||||
.example-spacer {
|
.example-spacer {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mat-toolbar{
|
||||||
|
background-color: rgba(153,153,153,0.16);
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,6 +26,19 @@ import {MatIcon} from "@angular/material/icon";
|
|||||||
import {MatChipGrid, MatChipInput, MatChipListbox, MatChipOption, MatChipRow} from "@angular/material/chips";
|
import {MatChipGrid, MatChipInput, MatChipListbox, MatChipOption, MatChipRow} from "@angular/material/chips";
|
||||||
import {MatAutocomplete, MatAutocompleteTrigger, MatOption} from "@angular/material/autocomplete";
|
import {MatAutocomplete, MatAutocompleteTrigger, MatOption} from "@angular/material/autocomplete";
|
||||||
import {MatFormField} from "@angular/material/form-field";
|
import {MatFormField} from "@angular/material/form-field";
|
||||||
|
import {MatLabel} from '@angular/material/form-field';
|
||||||
|
|
||||||
|
import {
|
||||||
|
MatCard, MatCardActions,
|
||||||
|
MatCardContent,
|
||||||
|
MatCardHeader,
|
||||||
|
MatCardImage,
|
||||||
|
MatCardSubtitle,
|
||||||
|
MatCardTitle
|
||||||
|
} from '@angular/material/card';
|
||||||
|
import {MatInput} from '@angular/material/input';
|
||||||
|
import {EditorComponent} from '@progress/kendo-angular-editor';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -63,7 +76,17 @@ import {MatFormField} from "@angular/material/form-field";
|
|||||||
MatFormField,
|
MatFormField,
|
||||||
MatChipListbox,
|
MatChipListbox,
|
||||||
MatChipOption,
|
MatChipOption,
|
||||||
ReactiveFormsModule
|
ReactiveFormsModule,
|
||||||
|
MatCardContent,
|
||||||
|
MatCardSubtitle,
|
||||||
|
MatCardTitle,
|
||||||
|
MatCard,
|
||||||
|
MatCardHeader,
|
||||||
|
MatCardImage,
|
||||||
|
MatCardActions,
|
||||||
|
MatInput,
|
||||||
|
MatLabel,
|
||||||
|
EditorComponent
|
||||||
],
|
],
|
||||||
providers: [authInterceptorProviders, provideHttpClient(withInterceptorsFromDi()), provideAnimationsAsync()] })
|
providers: [authInterceptorProviders, provideHttpClient(withInterceptorsFromDi()), provideAnimationsAsync()] })
|
||||||
|
|
||||||
|
|||||||
@@ -1,35 +1,56 @@
|
|||||||
<div>
|
<!--<div>-->
|
||||||
<div class="submit-form">
|
<!-- <div class="submit-form">-->
|
||||||
<div *ngIf="!submitted">
|
<!-- <div *ngIf="!submitted">-->
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label for="title">Title</label>
|
<!-- <label for="title">Title</label>-->
|
||||||
<input
|
<!-- <input-->
|
||||||
type="text"
|
<!-- type="text"-->
|
||||||
class="form-control"
|
<!-- class="form-control"-->
|
||||||
id="title"
|
<!-- id="title"-->
|
||||||
required
|
<!-- required-->
|
||||||
[(ngModel)]="tutorial.title"
|
<!-- [(ngModel)]="tutorial.title"-->
|
||||||
name="title"
|
<!-- name="title"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <div class="form-group">-->
|
||||||
<label for="description">Description</label>
|
<!-- <label for="description">Description</label>-->
|
||||||
<input
|
<!-- <input-->
|
||||||
class="form-control"
|
<!-- class="form-control"-->
|
||||||
id="description"
|
<!-- id="description"-->
|
||||||
required
|
<!-- required-->
|
||||||
[(ngModel)]="tutorial.description"
|
<!-- [(ngModel)]="tutorial.description"-->
|
||||||
name="description"
|
<!-- name="description"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<button (click)="saveTutorial()" class="btn btn-success">Submit</button>
|
<!-- <button (click)="saveTutorial()" class="btn btn-success">Submit</button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- <div *ngIf="submitted">-->
|
||||||
|
<!-- <h4>Tutorial was submitted successfully!</h4>-->
|
||||||
|
<!-- <button class="btn btn-success" (click)="newTutorial()">Add</button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
|
||||||
|
<mat-card appearance="outlined">
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>Add tutorial</mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content *ngIf="!submitted">
|
||||||
|
<mat-form-field class="example-full-width">
|
||||||
|
<mat-label>Title</mat-label>
|
||||||
|
<input matInput required
|
||||||
|
[(ngModel)]="tutorial.title">
|
||||||
|
</mat-form-field>
|
||||||
|
<kendo-editor [(ngModel)]="tutorial.description" ></kendo-editor>
|
||||||
|
</mat-card-content>
|
||||||
|
<mat-card-actions>
|
||||||
|
<button matButton (click)="saveTutorial()" *ngIf="!submitted">Save</button>
|
||||||
<div *ngIf="submitted">
|
<div *ngIf="submitted">
|
||||||
<h4>Tutorial was submitted successfully!</h4>
|
<h4>Tutorial was submitted successfully!</h4>
|
||||||
<button class="btn btn-success" (click)="newTutorial()">Add</button>
|
<button matButton (click)="newTutorial()">Add new tutorial</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</mat-card-actions>
|
||||||
</div>
|
</mat-card>
|
||||||
|
|||||||
@@ -1,4 +1,21 @@
|
|||||||
.submit-form {
|
.submit-form {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mat-card{
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
mat-card-title{
|
||||||
|
color: cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-form {
|
||||||
|
min-width: 150px;
|
||||||
|
max-width: 500px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.example-full-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
import {Tutorial} from '../../models/tutorial.model';
|
import {Tutorial} from '../../models/tutorial.model';
|
||||||
import {TutorialService} from '../../services/tutorial.service';
|
import {TutorialService} from '../../services/tutorial.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-tutorial',
|
selector: 'app-add-tutorial',
|
||||||
templateUrl: './add-tutorial.component.html',
|
templateUrl: './add-tutorial.component.html',
|
||||||
styleUrls: ['./add-tutorial.component.scss'],
|
styleUrls: ['./add-tutorial.component.scss'],
|
||||||
standalone: false
|
standalone: false
|
||||||
})
|
})
|
||||||
export class AddTutorialComponent implements OnInit {
|
export class AddTutorialComponent implements OnInit {
|
||||||
|
|
||||||
|
|||||||
@@ -2,4 +2,21 @@
|
|||||||
<header class="jumbotron">
|
<header class="jumbotron">
|
||||||
<p>{{ content }}</p>
|
<p>{{ content }}</p>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<mat-card appearance="outlined" >
|
||||||
|
<mat-card-header>
|
||||||
|
<mat-card-title>Tutorials</mat-card-title>
|
||||||
|
</mat-card-header>
|
||||||
|
<mat-card-content>
|
||||||
|
|
||||||
|
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
|
||||||
|
@for (tutorial of tutorials; track $index){
|
||||||
|
<mat-card appearance="outlined" class="tutorial-card">
|
||||||
|
<mat-card-content [innerHTML]="tutorial.description">
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
mat-card{
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
mat-card-title{
|
||||||
|
color: cyan;
|
||||||
|
}
|
||||||
|
.tutorial-card{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import {UserService} from '../../services/user.service';
|
import {TutorialService} from '../../services/tutorial.service';
|
||||||
|
|
||||||
|
import {Tutorial} from '../../models/tutorial.model';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -11,16 +13,22 @@ import {UserService} from '../../services/user.service';
|
|||||||
export class HomeComponent implements OnInit {
|
export class HomeComponent implements OnInit {
|
||||||
content?: string;
|
content?: string;
|
||||||
|
|
||||||
constructor(private userService: UserService) { }
|
tutorials?: Tutorial[];
|
||||||
|
|
||||||
|
constructor(private tutorialService: TutorialService) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
// this.userService.getPublicContent().subscribe(
|
this.retrieveTutorials();
|
||||||
// (data : any) => {
|
}
|
||||||
// this.content = data;
|
retrieveTutorials(): void {
|
||||||
// },
|
this.tutorialService.getAll()
|
||||||
// (err : any) => {
|
.subscribe(
|
||||||
// this.content = JSON.parse(err.error).message;
|
data => {
|
||||||
// }
|
this.tutorials = data;
|
||||||
// );
|
console.log(data);
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
/* You can add global styles to this file, and also import other style files */
|
/* You can add global styles to this file, and also import other style files */
|
||||||
|
|
||||||
html, body { height: 100%; }
|
html, body { height: 100%; }
|
||||||
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
|
body {
|
||||||
|
background-image: url('../public/Firefly_jambo tron 118290.png');
|
||||||
|
background-attachment:fixed;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "./out-tsc/app",
|
"outDir": "./out-tsc/app",
|
||||||
"types": [
|
"types": [
|
||||||
"node"
|
"node",
|
||||||
|
"@angular/localize"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
|
|||||||
Reference in New Issue
Block a user