diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-23 14:10:17 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-06-23 16:00:49 +0200 |
commit | 67ed6552b831df66713bac9e672738796128d33f (patch) | |
tree | 59c97d41e0b49d75a90aa3de987968ab9b1ff447 /client/src/app/shared/channel | |
parent | 0c4bacbff53bc732f5a2677d62a6ead7752e2405 (diff) | |
download | PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.gz PeerTube-67ed6552b831df66713bac9e672738796128d33f.tar.zst PeerTube-67ed6552b831df66713bac9e672738796128d33f.zip |
Reorganize client shared modules
Diffstat (limited to 'client/src/app/shared/channel')
-rw-r--r-- | client/src/app/shared/channel/avatar.component.html | 8 | ||||
-rw-r--r-- | client/src/app/shared/channel/avatar.component.scss | 40 | ||||
-rw-r--r-- | client/src/app/shared/channel/avatar.component.ts | 31 |
3 files changed, 0 insertions, 79 deletions
diff --git a/client/src/app/shared/channel/avatar.component.html b/client/src/app/shared/channel/avatar.component.html deleted file mode 100644 index 09871fca4..000000000 --- a/client/src/app/shared/channel/avatar.component.html +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | <div class="wrapper" [ngClass]="'avatar-' + size"> | ||
2 | <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle"> | ||
3 | <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" /> | ||
4 | </a> | ||
5 | <a [routerLink]="[ '/accounts', video.byAccount ]" [title]="accountLinkTitle"> | ||
6 | <img [src]="video.accountAvatarUrl" i18n-alt alt="Account avatar" /> | ||
7 | </a> | ||
8 | </div> | ||
diff --git a/client/src/app/shared/channel/avatar.component.scss b/client/src/app/shared/channel/avatar.component.scss deleted file mode 100644 index 37709fce6..000000000 --- a/client/src/app/shared/channel/avatar.component.scss +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | @import '_mixins'; | ||
2 | |||
3 | .wrapper { | ||
4 | $avatar-size: 35px; | ||
5 | |||
6 | width: $avatar-size; | ||
7 | height: $avatar-size; | ||
8 | position: relative; | ||
9 | margin-right: 5px; | ||
10 | margin-bottom: 5px; | ||
11 | |||
12 | &.avatar-sm { | ||
13 | width: 28px; | ||
14 | height: 28px; | ||
15 | margin-bottom: 3px; | ||
16 | } | ||
17 | |||
18 | a { | ||
19 | @include disable-outline; | ||
20 | } | ||
21 | |||
22 | a img { | ||
23 | height: 100%; | ||
24 | object-fit: cover; | ||
25 | position: absolute; | ||
26 | top:50%; | ||
27 | left:50%; | ||
28 | border-radius: 50%; | ||
29 | transform: translate(-50%,-50%) | ||
30 | } | ||
31 | |||
32 | a:nth-of-type(2) img { | ||
33 | height: 60%; | ||
34 | width: 60%; | ||
35 | border: 2px solid pvar(--mainBackgroundColor); | ||
36 | transform: translateX(15%); | ||
37 | position: relative; | ||
38 | background-color: pvar(--mainBackgroundColor); | ||
39 | } | ||
40 | } | ||
diff --git a/client/src/app/shared/channel/avatar.component.ts b/client/src/app/shared/channel/avatar.component.ts deleted file mode 100644 index 31f39c200..000000000 --- a/client/src/app/shared/channel/avatar.component.ts +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | import { Component, Input, OnInit } from '@angular/core' | ||
2 | import { Video } from '../video/video.model' | ||
3 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'avatar-channel', | ||
7 | templateUrl: './avatar.component.html', | ||
8 | styleUrls: [ './avatar.component.scss' ] | ||
9 | }) | ||
10 | export class AvatarComponent implements OnInit { | ||
11 | @Input() video: Video | ||
12 | @Input() size: 'md' | 'sm' = 'md' | ||
13 | |||
14 | channelLinkTitle = '' | ||
15 | accountLinkTitle = '' | ||
16 | |||
17 | constructor ( | ||
18 | private i18n: I18n | ||
19 | ) {} | ||
20 | |||
21 | ngOnInit () { | ||
22 | this.channelLinkTitle = this.i18n( | ||
23 | '{{name}} (channel page)', | ||
24 | { name: this.video.channel.name, handle: this.video.byVideoChannel } | ||
25 | ) | ||
26 | this.accountLinkTitle = this.i18n( | ||
27 | '{{name}} (account page)', | ||
28 | { name: this.video.account.name, handle: this.video.byAccount } | ||
29 | ) | ||
30 | } | ||
31 | } | ||