diff options
Diffstat (limited to 'client/src/app/shared/shared-main/feeds')
5 files changed, 55 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/feeds/feed.component.html b/client/src/app/shared/shared-main/feeds/feed.component.html new file mode 100644 index 000000000..ac0b1f454 --- /dev/null +++ b/client/src/app/shared/shared-main/feeds/feed.component.html | |||
@@ -0,0 +1,15 @@ | |||
1 | <div class="video-feed" | ||
2 | [ngbTooltip]="'Feeds available'" | ||
3 | placement="right auto" | ||
4 | container="body" | ||
5 | > | ||
6 | <my-global-icon | ||
7 | *ngIf="syndicationItems.length !== 0" [ngbPopover]="feedsList" [autoClose]="true" placement="bottom" | ||
8 | class="icon-syndication" role="button" iconName="syndication" | ||
9 | > | ||
10 | </my-global-icon> | ||
11 | |||
12 | <ng-template #feedsList> | ||
13 | <a *ngFor="let item of syndicationItems" [href]="item.url" target="_blank" rel="noopener noreferrer">{{ item.label }}</a> | ||
14 | </ng-template> | ||
15 | </div> | ||
diff --git a/client/src/app/shared/shared-main/feeds/feed.component.scss b/client/src/app/shared/shared-main/feeds/feed.component.scss new file mode 100644 index 000000000..34dd0e937 --- /dev/null +++ b/client/src/app/shared/shared-main/feeds/feed.component.scss | |||
@@ -0,0 +1,20 @@ | |||
1 | @import '_variables'; | ||
2 | @import '_mixins'; | ||
3 | |||
4 | .video-feed { | ||
5 | width: min-content; | ||
6 | |||
7 | a { | ||
8 | color: black; | ||
9 | display: block; | ||
10 | } | ||
11 | |||
12 | my-global-icon { | ||
13 | cursor: pointer; | ||
14 | width: 12px; | ||
15 | position: relative; | ||
16 | top: -2px; | ||
17 | |||
18 | @include apply-svg-color(pvar(--mainForegroundColor)) | ||
19 | } | ||
20 | } | ||
diff --git a/client/src/app/shared/shared-main/feeds/feed.component.ts b/client/src/app/shared/shared-main/feeds/feed.component.ts new file mode 100644 index 000000000..ee3731c1d --- /dev/null +++ b/client/src/app/shared/shared-main/feeds/feed.component.ts | |||
@@ -0,0 +1,11 @@ | |||
1 | import { Component, Input } from '@angular/core' | ||
2 | import { Syndication } from './syndication.model' | ||
3 | |||
4 | @Component({ | ||
5 | selector: 'my-feed', | ||
6 | styleUrls: [ './feed.component.scss' ], | ||
7 | templateUrl: './feed.component.html' | ||
8 | }) | ||
9 | export class FeedComponent { | ||
10 | @Input() syndicationItems: Syndication[] | ||
11 | } | ||
diff --git a/client/src/app/shared/shared-main/feeds/index.ts b/client/src/app/shared/shared-main/feeds/index.ts new file mode 100644 index 000000000..6bc396699 --- /dev/null +++ b/client/src/app/shared/shared-main/feeds/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './feed.component' | ||
2 | export * from './syndication.model' | ||
diff --git a/client/src/app/shared/shared-main/feeds/syndication.model.ts b/client/src/app/shared/shared-main/feeds/syndication.model.ts new file mode 100644 index 000000000..2466ae7c6 --- /dev/null +++ b/client/src/app/shared/shared-main/feeds/syndication.model.ts | |||
@@ -0,0 +1,7 @@ | |||
1 | import { FeedFormat } from '@shared/models' | ||
2 | |||
3 | export interface Syndication { | ||
4 | format: FeedFormat, | ||
5 | label: string, | ||
6 | url: string | ||
7 | } | ||