From 3038098cf5daeafeec0b599fcedea724ba921c06 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Wed, 26 Feb 2025 14:01:31 +0100 Subject: [PATCH] neuer Spinner, SEO Tags --- angular.json | 3 +++ src/app/app.component.ts | 25 ++++++++++++++----- .../components/loading-spinner.component.ts | 16 ++++++++++++ src/index.html | 21 ++++++++++++++++ 4 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 src/app/components/loading-spinner.component.ts diff --git a/angular.json b/angular.json index 6e5a67d..6f10acf 100644 --- a/angular.json +++ b/angular.json @@ -125,5 +125,8 @@ } } } + }, + "cli": { + "analytics": false } } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index e2f8d79..315ca01 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -5,28 +5,41 @@ import { RouterOutlet } from '@angular/router'; import * as AOS from 'aos'; import { OverlayService } from './services/overlay.service'; import { Observable } from 'rxjs'; +import { LoadingSpinnerComponent } from './components/loading-spinner.component'; @Component({ selector: 'app-root', standalone: true, - imports: [CommonModule, RouterOutlet], + imports: [CommonModule, RouterOutlet, LoadingSpinnerComponent], template: `
-
Please Wait...
+ class="fixed inset-0 bg-[rgb(0,0,0)]/[.50] flex items-center justify-center z-50 transition-opacity duration-300"> +
- Message successfully sent + class="fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded shadow z-50 animate-fadeIn"> +
+ + Message successfully sent +
`, + styles: [` + @keyframes fadeIn { + from { opacity: 0; transform: translateY(-10px); } + to { opacity: 1; transform: translateY(0); } + } + .animate-fadeIn { + animation: fadeIn 0.3s ease-in-out; + } + `] }) export class AppComponent { isLoading$: Observable; @@ -49,4 +62,4 @@ export class AppComponent { AOS.refresh(); }, 500); } -} +} \ No newline at end of file diff --git a/src/app/components/loading-spinner.component.ts b/src/app/components/loading-spinner.component.ts new file mode 100644 index 0000000..0dd46af --- /dev/null +++ b/src/app/components/loading-spinner.component.ts @@ -0,0 +1,16 @@ +// src/app/components/loading-spinner.component.ts +import { Component } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +@Component({ + selector: 'app-loading-spinner', + standalone: true, + imports: [CommonModule], + template: ` +
+
+
Please Wait...
+
+ ` +}) +export class LoadingSpinnerComponent {} \ No newline at end of file diff --git a/src/index.html b/src/index.html index 0e4c9b5..b12938d 100644 --- a/src/index.html +++ b/src/index.html @@ -7,6 +7,27 @@ + + + + + + + + + + + + + + + + + + + + +