Client Better design for video watch
authorChocobozzz <florian.bigard@gmail.com>
Fri, 21 Apr 2017 14:40:45 +0000 (16:40 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Wed, 26 Apr 2017 19:23:19 +0000 (21:23 +0200)
client/src/app/account/account.component.html
client/src/app/core/menu/menu-admin.component.scss
client/src/app/shared/search/search.component.html
client/src/app/videos/video-watch/video-watch.component.html
client/src/app/videos/video-watch/video-watch.component.scss
client/src/sass/_variables.scss
client/src/sass/application.scss

index 24bcdf947d3b19f4b4c51ab2e2194980657fe8f4..c0995dad04778d3ec184fe6b48504823920d073c 100644 (file)
@@ -1,5 +1,6 @@
 <h3>Account</h3>
 
+<div class="col-md-6 col-sm-12">
 <div class="panel panel-default">
   <div class="panel-heading">Change password</div>
 
@@ -7,7 +8,9 @@
     <my-account-change-password></my-account-change-password>
   </div>
 </div>
+</div>
 
+<div class="col-md-6 col-sm-12">
 <div class="panel panel-default">
   <div class="panel-heading">Update my informations</div>
 
@@ -15,3 +18,4 @@
     <my-account-details [user]="user"></my-account-details>
   </div>
 </div>
+</div>
index 487461224132c11ab7ff700651e09b2114edfbc5..04403950e8a074aae1831fb3ac20023b6e1b1d18 100644 (file)
@@ -9,6 +9,7 @@ menu {
     height: 30px;
     color: #9cabb8;
     cursor: pointer;
+    transition: color 0.3s;
 
     &:hover, &:focus {
       text-decoration: none !important;
index b03b977dc848472f5f07a4a372f57efa27b6872e..c6c6ff6a8b12e5c1457d2e79d9fc93bb10210646 100644 (file)
@@ -1,4 +1,3 @@
-
 <div class="input-group">
 
   <span class="input-group-addon icon-addon">
index ed26b513e7f42aefb6ed52ce6c3abed4f96a41b4..989de0de476f51d23f397f04b93b7e1ff557543b 100644 (file)
 </div>
 
 <div *ngIf="video !== null" id="video-info">
-  <div class="row" id="video-name-actions">
-    <div class="col-md-6">
-      <div class="row">
-        <div id="video-name" class="col-md-12">
-          {{ video.name }}
-        </div>
-      </div>
+  <div class="row video-name-views">
+    <div id="video-name" class="col-md-8">
+      {{ video.name }}
+    </div>
 
-      <div class="row">
-        <div class="col-md-12" id="video-by-date">
-          <span id="video-by">
-              from
-              <a [routerLink]="['/videos/list', { field: 'author', search: video.author }]" class="video-miniature-author">
-                {{ video.by }}
-              </a>
-            </span>
-          <span id="video-date">on {{ video.createdAt | date:'short' }}</span>
-        </div>
-      </div>
+    <div class="col-md-4 pull-right video-views">
+      {{ video.views}} views
     </div>
+  </div>
 
-    <div id="video-actions" class="col-md-6 text-right">
-      <div id="rates">
-        <button
-          id="likes" class="btn btn-default"
-          [ngClass]="{ 'not-interactive-btn': !isUserLoggedIn(), 'activated-btn': userRating === 'like' }" (click)="setLike()"
-        >
-          <span class="glyphicon glyphicon-thumbs-up"></span> {{ video.likes }}
-        </button>
-
-        <button
-          id="dislikes" class="btn btn-default"
-          [ngClass]="{ 'not-interactive-btn': !isUserLoggedIn(), 'activated-btn': userRating === 'dislike' }" (click)="setDislike()"
-        >
-          <span class=" glyphicon glyphicon-thumbs-down"></span> {{ video.dislikes }}
-        </button>
-      </div>
+  <div class="row video-small-blocks">
+    <div class="col-md-3 video-small-block video-small-block-author">
+      <a title="Access to all videos of this user" [routerLink]="['/videos/list', { field: 'author', search: video.author }]">
+        {{ video.by }}
+      </a>
+    </div>
 
-      <button id="share" class="btn btn-default" (click)="showShareModal()">
-        <span class="glyphicon glyphicon-share"></span> Share
-      </button>
+    <div class="col-md-3 video-small-block video-small-block-share">
+      <a class="option" (click)="showShareModal()" title="Share the video">
+        <span class="glyphicon glyphicon-share"></span>
+        <span class="video-small-block-text">Share</span>
+      </a>
+    </div>
 
-      <div class="btn-group" dropdown>
-        <button id="single-button" type="button" id="more" class="btn btn-default" dropdownToggle>
-          <span class="glyphicon glyphicon-option-horizontal"></span> More
-        </button>
+    <div class="col-md-3 video-small-block video-small-block-more">
+      <div class="video-small-block-dropdown" dropdown dropup="true" placement="right">
+        <a class="option" title="Access to more options" dropdownToggle>
+          <span class="glyphicon glyphicon-option-horizontal"></span>
+          <span class="video-small-block-text">More</span>
+        </a>
 
         <ul *dropdownMenu class="dropdown-menu" id="more-menu" role="menu" aria-labelledby="single-button">
           <li *ngIf="canUserUpdateVideo()" role="menuitem">
@@ -87,7 +71,7 @@
 
           <li role="menuitem">
             <a class="dropdown-item" title="Get magnet URI" href="#" (click)="showMagnetUriModal($event)">
-               <span class="glyphicon glyphicon-magnet"></span> Magnet
+              <span class="glyphicon glyphicon-magnet"></span> Magnet
             </a>
           </li>
 
         </ul>
       </div>
     </div>
-  </div>
 
-  <div id="video-tags-views" class="row">
-    <div class="col-md-8">
-      <a *ngFor="let tag of video.tags" [routerLink]="['/videos/list', { field: 'tags', search: tag }]" class="label label-primary">
-        {{ tag }}
-      </a>
-    </div>
+    <div class="col-md-3 video-small-block video-small-block-rating">
+      <div class="video-small-block-like">
+        <span
+          class="glyphicon glyphicon-thumbs-up" title="Like this video"
+          [ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'like' }" (click)="setLike()"
+        ></span>
 
-    <div id="video-views" class="col-md-4 text-right">
-      {{ video.views }} views
-    </div>
-  </div>
+        <span class="video-small-block-text">
+          {{ video.likes }}
+        </span>
+      </div>
 
-  <div id="video-category" class="row">
-    <div class="col-md-12">
-      <span id="category-label">Category:</span>
-      {{ video.categoryLabel }}
-    </div>
-  </div>
+      <div class="video-small-block-dislike">
+        <span
+          class="glyphicon glyphicon-thumbs-down" title="Dislike this video"
+          [ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'dislike' }" (click)="setDislike()"
+        ></span>
 
-  <div id="video-licence" class="row">
-    <div class="col-md-12">
-      <span id="licence-label">Licence:</span>
-      {{ video.licenceLabel }}
+        <span class="video-small-block-text">
+          {{ video.dislikes }}
+        </span>
+      </div>
     </div>
   </div>
 
-  <div id="video-language" class="row">
-    <div class="col-md-12">
-      <span id="language-label">Language:</span>
-      {{ video.languageLabel }}
+  <div class="row video-details">
+    <div class="video-details-date-description col-md-9">
+      <div class="video-details-date">
+        Published on {{ video.createdAt | date:'short' }}
+      </div>
+
+      <div class="video-details-description">
+        {{ video.description }}
+      </div>
     </div>
-  </div>
 
-  <div id="video-description" class="row">
-    <div class="col-md-12">
-      <div id="description-label">Description</div>
-      {{ video.description }}
+    <div class="video-details-attributes col-md-3">
+      <div class="video-details-attribute">
+        <span class="video-details-attribute-label">
+          Category:
+        </span>
+        <span class="video-details-attribute-value">
+          {{ video.categoryLabel }}
+        </span>
+      </div>
+
+      <div class="video-details-attribute">
+        <span class="video-details-attribute-label">
+          Licence:
+        </span>
+        <span class="video-details-attribute-value">
+          {{ video.licenceLabel }}
+        </span>
+      </div>
+
+      <div class="video-details-attribute">
+        <span class="video-details-attribute-label">
+          Language:
+        </span>
+        <span class="video-details-attribute-value">
+          {{ video.languageLabel }}
+        </span>
+      </div>
     </div>
   </div>
 </div>
index 92192221f01b3d6f7ccf1dd709775dab99c771c7..cd9d71fb4752837554331f767e2af2378765cb0b 100644 (file)
 }
 
 #video-info {
-  border-top: 1px solid rgba(0, 0, 0, 0.1);
-  margin-top: 10px;
-  padding-top: 5px;
-
-  #video-name-actions {
-
-    #video-name {
-      font-size: 20px;
-    }
+  .video-name-views {
+    font-weight: bold;
+    font-size: 18px;
+    height: $video-watch-title-height;
+    line-height: $video-watch-title-height;
+    padding: 0 30px;
 
-    .btn .glyphicon {
-      position: relative;
-      top: 2px;
+    .video-views {
+      text-align: right;
     }
+  }
 
-    #rates {
-      display: inline-block;
-      margin-right: 20px;
+  .video-small-blocks {
+    height: 150px;
+    color: $video-watch-info-color;
+    border-color: $video-watch-border-color;
+    border-width: 1px 0px;
+    border-style: solid;
+
+    .video-small-block {
+      height: $video-watch-info-height;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      text-align: center;
+
+      a {
+        cursor: pointer;
+        transition: color 0.3s;
+
+        &, &:hover {
+          color: inherit;
+          text-decoration:none;
+        }
 
-      // Remove focus style
-      .btn:focus {
-        outline: 0;
+        &:hover {
+          color: #000 !important;
+        }
       }
 
-      .activated-btn {
-        color: #333;
-        background-color: #e6e6e6;
-        border-color: #8c8c8c;
+      .option .glyphicon {
+        font-size: 22px;
+        color: inherit;
+        opacity: 0.9;
+        margin-bottom: 10px;
       }
 
-      .not-interactive-btn {
-        cursor: default;
-
-        &:hover, &:focus, &:active {
-          color: #333;
-          background-color: #fff;
-          border-color: #ccc;
-          box-shadow: none;
-          outline: 0;
-        }
+      .video-small-block-text {
+        font-size: 15px;
+        font-weight: bold;
       }
     }
 
-    #share, #more {
-      font-weight: bold;
-      opacity: 0.85;
+    .video-small-block:not(:last-child) {
+      border-width: 0 1px 0 0;
+      border-color: $video-watch-border-color;
+      border-style: solid;
     }
 
-    #more-menu .dropdown-item .glyphicon {
-      margin-right: 5px;
+    .video-small-block-author {
+      font-size: 15px;
+      font-weight: bold;
     }
-  }
 
-  #video-by-date {
-    font-size: 13px;
-    opacity: 0.6;
+    .video-small-block-share, .video-small-block-more {
+      a.option {
+        display: block;
 
-    a {
-      color: black;
+        .glyphicon {
+          display: block;
+        }
+      }
     }
 
-    #video-date:before {
-      content: '\002022';
-      margin: 0 5px;
+    .video-small-block-more .video-small-block-dropdown {
+      position: relative;
+
+      .dropdown-item .glyphicon {
+        margin-right: 5px;
+      }
     }
-  }
 
-  #video-tags-views {
-    margin-top: 10px;
+    .video-small-block-rating {
 
-    a {
-      margin-right: 5px;
-    }
+      .video-small-block-like {
+        margin-bottom: 10px;
+      }
 
-    #video-views {
-      font-weight: bold;
-    }
-  }
+      .video-small-block-text {
+        vertical-align: top;
+      }
 
-  #video-category {
-    margin-top: 10px;
+      .glyphicon {
+        font-size: 18px;
+        margin: 0 10px 0 0;
+      }
 
-    #category-label {
-      font-weight: bold;
+      .interactive {
+        cursor: pointer;
+        transition: color 0.3s;
+
+        &.activated, &:hover {
+          color: #000;
+        }
+      }
     }
   }
 
-  #video-licence #licence-label, #video-language #language-label {
-    font-weight: bold;
-  }
+  .video-details {
+    margin-top: 30px;
 
-  #video-description {
-    margin-top: 10px;
+    .video-details-date-description {
+      padding-left: 30px;
 
-    #description-label {
+      .video-details-date {
+        font-weight: bold;
+        margin-bottom: 30px;
+      }
+    }
+
+    .video-details-attributes {
       font-weight: bold;
+      font-size: 12px;
+
+      .video-details-attribute-label {
+        color: $video-watch-info-color;
+        display: inline-block;
+        width: 60px;
+        margin-right: 5px;
+      }
     }
   }
 }
index be57db304ba8c8d7d473410ef7c41e892ebb03b3..1b91434ba2859191e2698b156c009b185377ab97 100644 (file)
@@ -1,8 +1,15 @@
+$grey-color: #555;
+
 $black-background: #1d2125;
 $grey-background: #f6f2f2;
 
-$header-height: 60px;
+$header-height: 65px;
 $header-border-color: #e9eff6;
 
 $video-miniature-title-color: #16a2b7;
 $video-miniature-other-infos: #686767;
+
+$video-watch-border-color: #eceef4;
+$video-watch-title-height: 90px;
+$video-watch-info-color: #8e909b;
+$video-watch-info-height: 150px;
index 25d79a0cb799ecdba2bc2ff650eee36d64156e3f..d65cd8c64abbdd0a55ef5a1e69aa88433b32a782 100644 (file)
@@ -13,6 +13,10 @@ input.readonly {
   border-radius: 0;
 }
 
+.dropdown-menu {
+  border-radius: 0;
+}
+
 .glyphicon-black {
   color: black;
 }
@@ -61,7 +65,7 @@ input.readonly {
 
   #peertube-title {
     background-color: #fff;
-    border-right: 2px solid $header-border-color;
+    border-right: 1px solid $header-border-color;
     font-size: 25px;
     line-height: $header-height;
     text-align: center;