Display banner on channel page

This commit is contained in:
Chocobozzz 2021-04-08 09:13:42 +02:00 committed by Chocobozzz
parent cdeddff142
commit 02dd4f3c65
6 changed files with 13 additions and 4 deletions

View File

@ -1,4 +1,8 @@
<div class="root" *ngIf="videoChannel"> <div class="root" *ngIf="videoChannel">
<div class="banner" *ngIf="videoChannel.bannerUrl">
<img [src]="videoChannel.bannerUrl" alt="Channel banner">
</div>
<div class="channel-info"> <div class="channel-info">
<ng-template #buttonsTemplate> <ng-template #buttonsTemplate>

View File

@ -11,6 +11,10 @@
--myGreyOwnerFontSize: 14px; --myGreyOwnerFontSize: 14px;
} }
.banner {
@include block-ratio('img', $banner-inverted-ratio);
}
.section-label { .section-label {
@include section-label-responsive; @include section-label-responsive;
} }

View File

@ -2,7 +2,7 @@
@import '_mixins'; @import '_mixins';
.content { .content {
scrollbar-color: unset; scrollbar-color: auto;
} }
.notification-inbox-popover { .notification-inbox-popover {

View File

@ -36,7 +36,8 @@ export class ActorBannerEditComponent implements OnInit {
this.maxBannerSize = config.banner.file.size.max this.maxBannerSize = config.banner.file.size.max
this.bannerExtensions = config.banner.file.extensions.join(', ') this.bannerExtensions = config.banner.file.extensions.join(', ')
this.bannerFormat = $localize`maxsize: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}` // tslint:disable:max-line-length
this.bannerFormat = $localize`ratio 6/1, recommended size: 1600x266, max size: ${getBytes(this.maxBannerSize)}, extensions: ${this.bannerExtensions}`
}) })
} }

View File

@ -53,7 +53,7 @@ $sub-menu-height: 81px;
$channel-background-color: #f6ede8; $channel-background-color: #f6ede8;
$banner-inverted-ratio: 1/5; $banner-inverted-ratio: 1/6;
$max-channels-width: 1200px; $max-channels-width: 1200px;

View File

@ -614,7 +614,7 @@ const ACTOR_IMAGES_SIZE = {
}, },
BANNERS: { BANNERS: {
width: 1920, width: 1920,
height: 384 height: 317 // 6/1 ratio
} }
} }