fix miniature fixed height, add link/title to avatar, remove pr-2 on channels list
authorRigel Kent <sendmemail@rigelk.eu>
Fri, 12 Jun 2020 07:51:13 +0000 (09:51 +0200)
committerRigel Kent <sendmemail@rigelk.eu>
Fri, 12 Jun 2020 07:51:16 +0000 (09:51 +0200)
client/src/app/+accounts/account-video-channels/account-video-channels.component.html
client/src/app/shared/video/video-miniature.component.html
client/src/app/shared/video/video-miniature.component.scss
client/src/app/shared/video/video-miniature.component.ts
client/src/sass/include/_variables.scss

index b45ca58da51cd831ebf335db0619f134c8c28b84..8f1ff21a55422246e155ad31acaf9ea4927691aa 100644 (file)
@@ -19,7 +19,6 @@
         <div class="no-results my-5" i18n *ngIf="getVideosOf(videoChannel).length === 0">This channel doesn't have any videos.</div>
 
         <my-video-miniature
-          class="pr-2"
           *ngFor="let video of getVideosOf(videoChannel)"
           [video]="video" [user]="user" [displayVideoActions]="true"
         ></my-video-miniature>
index 992c16585bc4031fee7d147ece975d17d94310e7..d3b750da8a8a1515d0a902c830e0173e8948370d 100644 (file)
   <div class="video-bottom">
     <div class="video-miniature-information">
       <div class="d-inline-flex video-miniature-meta">
-        <div *ngIf="displayOptions.avatar" class="avatar">
-          <img [src]="getAvatarUrl()" alt="Avatar" />
-        </div>
-
+        <a *ngIf="displayOptions.avatar" class="avatar" [routerLink]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle">
+          <img [src]="getAvatarUrl()" alt="" />
+        </a>
+        
         <div class="d-flex flex-column">
           <a
             tabindex="-1"
index d926c4dec26797e9af55f287b70d57da548f64be..99bd9c15b850b9c3486cc2a8a819dd70d07891b5 100644 (file)
@@ -9,7 +9,6 @@ $more-margin-right: 15px;
   display: inline-flex;
   flex-direction: column;
   padding-bottom: $video-miniature-margin-bottom;
-  height: 195px;
   vertical-align: top;
 
   .video-bottom {
@@ -119,8 +118,6 @@ $more-margin-right: 15px;
 
   &.fit-width {
     width: 100%;
-    height: unset;
-    padding-bottom: $video-miniature-margin-bottom / 2;
 
     .video-bottom {
       width: 100% !important;
index ccf90af54ead80b0624c77efbf3c38be23c5eec3..36e18d018bffef0735eeaeac1f6f37278ddc05fd 100644 (file)
@@ -78,6 +78,7 @@ export class VideoMiniatureComponent implements OnInit {
   addToWatchLaterText: string
   addedToWatchLaterText: string
   inWatchLaterPlaylist: boolean
+  channelLinkTitle = ''
 
   watchLaterPlaylist: {
     id: number
@@ -96,9 +97,7 @@ export class VideoMiniatureComponent implements OnInit {
     private videoPlaylistService: VideoPlaylistService,
     private cd: ChangeDetectorRef,
     @Inject(LOCALE_ID) private localeId: string
-  ) {
-
-  }
+  ) {}
 
   get isVideoBlur () {
     return this.video.isVideoNSFWForUser(this.user, this.serverConfig)
@@ -114,6 +113,11 @@ export class VideoMiniatureComponent implements OnInit {
 
     this.setUpBy()
 
+    this.channelLinkTitle = this.i18n(
+      'Go to the channel page of {{name}} ({{handle}})',
+      { name: this.video.channel.name, handle: this.video.byVideoChannel }
+    )
+
     // We rely on mouseenter to lazy load actions
     if (this.screenService.isInTouchScreen()) {
       this.loadActions()
index 56b1ff884c5c4b16648860d6fdfad698345a1eb1..fc13f6509e88e13d63fe1632cb34f9e77784a59c 100644 (file)
@@ -56,7 +56,7 @@ $footer-margin: 30px;
 $separator-border-color: rgba(0, 0, 0, 0.10);
 
 $video-miniature-width: 238px;
-$video-miniature-margin-bottom: 30px;
+$video-miniature-margin-bottom: 15px;
 $video-thumbnail-height: 122px;
 $video-thumbnail-width: 223px;