.video-channel {
@include row-blocks;
+
padding-bottom: 0;
img {
- @include avatar(80px);
+ @include channel-avatar(80px);
margin-right: 10px;
}
@include row-blocks;
img {
- @include avatar(80px);
+ @include channel-avatar(80px);
margin-right: 10px;
}
$image-size: 130px;
$margin-size: ($video-thumbnail-width - $image-size) / 2; // So we have the same width than the video miniature
- @include avatar($image-size);
+ @include channel-avatar($image-size);
margin: 0 ($margin-size + 10) 0 $margin-size;
}
&:hover {
opacity: 0.8;
}
-
- img {
- @include avatar(18px);
-
- margin: -2px 5px 0 0;
- }
}
.video-info-channel-left {
<ng-container *ngIf="actor">
<div class="actor">
<div class="d-flex">
- <img [src]="actor.avatarUrl" alt="Avatar" />
+ <img [ngClass]="{ channel: isChannel() }" [src]="actor.avatarUrl" alt="Avatar" />
<div class="actor-img-edit-container">
</div>
</div>
-
<div class="actor-info">
<div class="actor-info-names">
<div class="actor-info-display-name">{{ actor.displayName }}</div>
display: flex;
img {
- @include avatar(100px);
-
margin-right: 15px;
+
+ &:not(.channel) {
+ @include avatar(100px);
+ }
+
+ &.channel {
+ @include channel-avatar(100px);
+ }
}
.actor-img-edit-container {
@include peertube-button-file(21px);
@include button-with-icon(19px);
@include orange-button;
-
+
margin-top: 10px;
margin-bottom: 5px;
border-radius: 50%;
hasAvatar () {
return !!this.avatarUrl
}
+
+ isChannel () {
+ return !!(this.actor as VideoChannel).ownerAccount
+ }
}
<div class="wrapper" [ngClass]="'avatar-' + size">
<ng-container *ngIf="!isChannelAvatarNull() && !genericChannel">
<a [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
- <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" />
+ <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" class="channel-avatar" />
</a>
+
<a [routerLink]="[ '/accounts', video.byAccount ]" [title]="accountLinkTitle">
<img [src]="video.accountAvatarUrl" i18n-alt alt="Account avatar" />
</a>
</a>
<a [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
- <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" />
+ <img [src]="video.videoChannelAvatarUrl" i18n-alt alt="Channel avatar" class="channel-avatar" />
</a>
</ng-container>
position: absolute;
top:50%;
left:50%;
- border-radius: 50%;
- transform: translate(-50%,-50%)
+ transform: translate(-50%,-50%);
+
+ &:not(.channel-avatar) {
+ border-radius: 50%;
+ }
}
a:nth-of-type(2) img {
<div class="video-bottom">
<div class="video-miniature-information">
<div class="d-inline-flex video-miniature-meta">
- <a *ngIf="displayOptions.avatar" class="avatar" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
+ <a *ngIf="displayOptions.avatar" class="avatar" [ngClass]="{ channel: displayOwnerVideoChannel() }" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
<img [src]="getAvatarUrl()" alt="" />
</a>
.avatar {
margin: 10px 10px 0 0;
- img {
+ img:not(.channel) {
@include avatar(40px);
}
+
+ img.channel {
+ @include channel-avatar(40px);
+ }
}
.video-miniature-name {
}
getAvatarUrl () {
- if (this.ownerDisplayTypeChosen === 'account') {
+ if (this.displayOwnerAccount()) {
return this.video.accountAvatarUrl
}
return
}
- // If the video channel name an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12)
+ // If the video channel name is an UUID (not really displayable, we changed this behaviour in v1.0.0-beta.12)
+ // Or is just a suffix of the account (default created channel)
// -> Use the account name
if (
this.video.channel.name === `${this.video.account.name}_channel` ||
align-items: center;
img {
- @include avatar(28px);
+ @include channel-avatar(28px);
margin-right: 8px;
}
}
}
-@mixin sub-menu-with-actor {
- position: initial;
- z-index: unset;
- height: max-content;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
-
- .actor {
- display: flex;
- margin-top: 20px;
- margin-bottom: 20px;
-
- img {
- @include avatar(80px);
-
- margin-right: 20px;
- }
-
- .actor-info {
- display: flex;
- flex-direction: column;
- justify-content: center;
-
- .actor-names {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
-
- .actor-display-name {
- font-size: 23px;
- font-weight: $font-bold;
- margin-right: 7px;
- }
-
- .actor-name {
- position: relative;
- top: 3px;
- font-size: 14px;
- color: $grey-actor-name;
- }
- }
-
- .actor-lower {
- grid-area: lower;
- }
-
- .actor-followers {
- font-size: 15px;
- }
-
- .actor-owner {
- @include actor-owner;
- }
- }
- }
-
- .links {
- margin-top: 0;
- margin-bottom: 15px;
-
- a {
- margin-top: 0;
- margin-bottom: 0;
- text-transform: uppercase;
- font-weight: 600;
- font-size: 110%;
-
- @media screen and (max-width: $mobile-view) {
- font-size: 130%;
- }
- }
-
- list-overflow {
- display: inline-block;
- width: max-content;
- }
- }
-}
-
@mixin create-button {
@include peertube-button-link;
@include orange-button;