Fix channel banner padding (#2288)
* Fix channel banner padding * Add banner as background image for cover * Fix lint warnings * Fix ugly default channel banner
This commit is contained in:
parent
fd46b22f91
commit
6a1e81d5a8
|
@ -2,26 +2,32 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 85%;
|
width: 85%;
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto 20px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channelBanner {
|
.channelDetails {
|
||||||
width: 100%;
|
padding: 0 0 16px;
|
||||||
max-height: 200px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.defaultChannelBanner {
|
.channelBannerContainer {
|
||||||
|
background: center / cover no-repeat var(--banner-url, transparent);
|
||||||
|
height: 13vw;
|
||||||
|
min-height: 110px;
|
||||||
|
max-height: 32vh;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 200px;
|
}
|
||||||
height:200px;
|
|
||||||
background-color: black;
|
.channelBannerContainer.default {
|
||||||
background-image: url("images/defaultBanner.png");
|
background-image: url("images/defaultBanner.png");
|
||||||
|
background-repeat: repeat;
|
||||||
|
background-size: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channelInfoContainer {
|
.channelInfoContainer {
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: var(--card-bg-color);
|
background-color: var(--card-bg-color);
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channelInfo {
|
.channelInfo {
|
||||||
|
@ -143,3 +149,8 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.channelLineContainer h1,
|
||||||
|
.channelLineContainer p {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
|
@ -8,17 +8,16 @@
|
||||||
/>
|
/>
|
||||||
<ft-card
|
<ft-card
|
||||||
v-else
|
v-else
|
||||||
class="card"
|
class="card channelDetails"
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-if="bannerUrl !== null"
|
|
||||||
class="channelBanner"
|
|
||||||
:src="bannerUrl"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-else
|
|
||||||
class="defaultChannelBanner"
|
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
class="channelBannerContainer"
|
||||||
|
:class="{
|
||||||
|
default: !bannerUrl
|
||||||
|
}"
|
||||||
|
:style="{ '--banner-url': `url('${bannerUrl}')` }"
|
||||||
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="channelInfoContainer"
|
class="channelInfoContainer"
|
||||||
>
|
>
|
||||||
|
@ -35,19 +34,20 @@
|
||||||
<div
|
<div
|
||||||
class="channelLineContainer"
|
class="channelLineContainer"
|
||||||
>
|
>
|
||||||
<span
|
<h1
|
||||||
class="channelName"
|
class="channelName"
|
||||||
>
|
>
|
||||||
{{ channelName }}
|
{{ channelName }}
|
||||||
</span>
|
</h1>
|
||||||
<span
|
|
||||||
|
<p
|
||||||
v-if="subCount !== null"
|
v-if="subCount !== null"
|
||||||
class="channelSubCount"
|
class="channelSubCount"
|
||||||
>
|
>
|
||||||
{{ formattedSubCount }}
|
{{ formattedSubCount }}
|
||||||
<span v-if="subCount === 1">{{ $t("Channel.Subscriber") }}</span>
|
<span v-if="subCount === 1">{{ $t("Channel.Subscriber") }}</span>
|
||||||
<span v-else>{{ $t("Channel.Subscribers") }}</span>
|
<span v-else>{{ $t("Channel.Subscribers") }}</span>
|
||||||
</span>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue