From 93ab4635b3011a4370ffedab52ed00780ef39d0f Mon Sep 17 00:00:00 2001 From: Flo Date: Wed, 7 Aug 2024 19:42:44 +0000 Subject: [PATCH] tag sorting, tag thumbnail and tag strip in home --- src/app/component/home/home.component.html | 4 ++ src/app/component/home/home.component.ts | 12 +++++- src/app/feature/tag/tag.component.html | 9 +++++ .../tag-card/tag-card.component.html | 40 +++++++++++++++++++ .../tag-card/tag-card.component.scss | 0 .../components/tag-card/tag-card.component.ts | 19 +++++++++ .../video-card/video-card.component.html | 2 +- .../video-list/video-list.component.html | 17 ++++---- src/app/shared/shared.module.ts | 3 ++ 9 files changed, 96 insertions(+), 10 deletions(-) create mode 100644 src/app/shared/components/tag-card/tag-card.component.html create mode 100644 src/app/shared/components/tag-card/tag-card.component.scss create mode 100644 src/app/shared/components/tag-card/tag-card.component.ts diff --git a/src/app/component/home/home.component.html b/src/app/component/home/home.component.html index 68e4222..db3a4e3 100644 --- a/src/app/component/home/home.component.html +++ b/src/app/component/home/home.component.html @@ -1,3 +1,7 @@ +
+ +
+ { + this.tags = response.items; + }); + } } diff --git a/src/app/feature/tag/tag.component.html b/src/app/feature/tag/tag.component.html index 8a78ad8..98b044c 100644 --- a/src/app/feature/tag/tag.component.html +++ b/src/app/feature/tag/tag.component.html @@ -28,6 +28,15 @@ /> + +
+ Thumbnail +
+
Alias:
diff --git a/src/app/shared/components/tag-card/tag-card.component.html b/src/app/shared/components/tag-card/tag-card.component.html new file mode 100644 index 0000000..71d791f --- /dev/null +++ b/src/app/shared/components/tag-card/tag-card.component.html @@ -0,0 +1,40 @@ +
+ + +
+ Thumbnail +
+ + +
diff --git a/src/app/shared/components/tag-card/tag-card.component.scss b/src/app/shared/components/tag-card/tag-card.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/shared/components/tag-card/tag-card.component.ts b/src/app/shared/components/tag-card/tag-card.component.ts new file mode 100644 index 0000000..20b6201 --- /dev/null +++ b/src/app/shared/components/tag-card/tag-card.component.ts @@ -0,0 +1,19 @@ +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { TagListEntry } from 'src/app/model/TagListEntry'; +import { VideoListEntry } from 'src/app/model/VideoListEntry'; + +@Component({ + selector: 'shared-tag-card', + templateUrl: './tag-card.component.html', + styleUrls: ['./tag-card.component.scss'], +}) +export class TagCardComponent { + @Input() tag: TagListEntry | null = null; + @Output() clicked = new EventEmitter(); + + onClick(): void { + if (this.tag === null) return; + + this.clicked.emit(this.tag); + } +} diff --git a/src/app/shared/components/video-card/video-card.component.html b/src/app/shared/components/video-card/video-card.component.html index 865bfe6..8ab1950 100644 --- a/src/app/shared/components/video-card/video-card.component.html +++ b/src/app/shared/components/video-card/video-card.component.html @@ -1,7 +1,7 @@