]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Client: responsive design
authorChocobozzz <florian.bigard@gmail.com>
Fri, 21 Apr 2017 09:06:33 +0000 (11:06 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Wed, 26 Apr 2017 19:23:19 +0000 (21:23 +0200)
28 files changed:
client/.bootstraprc
client/config/webpack.common.js
client/config/webpack.dev.js
client/package.json
client/src/app/+admin/friends/friend-list/friend-list.component.html
client/src/app/+admin/friends/friend-list/friend-list.component.scss
client/src/app/+admin/requests/request-stats/request-stats.component.html
client/src/app/+admin/requests/request-stats/request-stats.component.scss
client/src/app/account/account.component.html
client/src/app/account/account.component.scss
client/src/app/app.component.html
client/src/app/app.component.scss
client/src/app/core/menu/menu-admin.component.html
client/src/app/core/menu/menu-admin.component.scss [new file with mode: 0644]
client/src/app/core/menu/menu-admin.component.ts
client/src/app/core/menu/menu.component.html
client/src/app/core/menu/menu.component.ts
client/src/app/shared/search/search.component.html
client/src/app/shared/search/search.component.scss [new file with mode: 0644]
client/src/app/shared/search/search.component.ts
client/src/app/videos/video-list/video-list.component.scss
client/src/app/videos/video-list/video-list.component.ts
client/src/app/videos/video-list/video-miniature.component.html
client/src/app/videos/video-list/video-miniature.component.scss
client/src/sass/_variables.scss [new file with mode: 0644]
client/src/sass/application.scss
client/src/sass/pre-customizations.scss
client/tslint.json

index b7468b2feee74f39d6117004de9bccbcce9b8a03..d266656c14f65fed44103f3a03f68f4d2f552e1e 100644 (file)
@@ -10,9 +10,9 @@ useCustomIconFontPath: true
 
 # Webpack loaders, order matters
 styleLoaders:
-  - style
-  - css
-  - sass
+  - style-loader
+  - css-loader
+  - sass-loader
 
 # Extract styles to stand-alone css file
 # Different settings for different environments can be used,
@@ -94,7 +94,7 @@ styles:
   progress-bars: true
   media: true
   list-group: false
-  panels: false
+  panels: true
   wells: false
   responsive-embed: true
   close: true
index 80d77b400d132a849140a3ac5448f5c1115f9a60..6067d94e7757c6bad07f0f7bb67a7eaecb1852ea 100644 (file)
@@ -119,8 +119,25 @@ module.exports = function (options) {
 
         {
           test: /\.(sass|scss)$/,
-          use: ['css-to-string-loader', 'css-loader?sourceMap', 'resolve-url-loader', 'sass-loader?sourceMap'],
-          exclude: [ helpers.root('src', 'styles') ]
+          use: [
+            'css-to-string-loader',
+            'css-loader?sourceMap',
+            'resolve-url-loader',
+            {
+              loader: 'sass-loader',
+              options: {
+                sourceMap: true
+              }
+            },
+            {
+              loader: 'sass-resources-loader',
+              options: {
+                resources: [
+                  helpers.root('src/sass/_variables.scss')
+                ]
+              }
+            }
+          ]
         },
         { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'url-loader?limit=10000&minetype=application/font-woff' },
         { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: 'file-loader' },
@@ -133,7 +150,10 @@ module.exports = function (options) {
         {
           test: /\.html$/,
           loader: 'raw-loader',
-          exclude: [ helpers.root('src/index.html'), helpers.root('src/standalone/videos/embed.html') ]
+          exclude: [
+            helpers.root('src/index.html'),
+            helpers.root('src/standalone/videos/embed.html')
+          ]
         }
 
       ]
@@ -262,7 +282,8 @@ module.exports = function (options) {
       new LoaderOptionsPlugin({
         options: {
           sassLoader: {
-            precision: 10
+            precision: 10,
+            includePaths: [ helpers.root('src/sass') ]
           }
         }
       }),
index 3468dba7897390adc1b48a0e77634dd88815347f..5e0f36d7f688532b16b632e1f13f31505083dfcc 100644 (file)
@@ -90,23 +90,24 @@ module.exports = function (env) {
 
     module: {
 
-      rules: [
-        {
-          test: /\.ts$/,
-          use: [
-            {
-              loader: 'tslint-loader',
-              options: {
-                configFile: 'tslint.json'
-              }
-            }
-          ],
-          exclude: [
-            /\.(spec|e2e)\.ts$/,
-            /node_modules\//
-          ]
-        }
-      ]
+      // Too slow, life is short
+      // rules: [
+      //   {
+      //     test: /\.ts$/,
+      //     use: [
+      //       {
+      //         loader: 'tslint-loader',
+      //         options: {
+      //           configFile: 'tslint.json'
+      //         }
+      //       }
+      //     ],
+      //     exclude: [
+      //       /\.(spec|e2e)\.ts$/,
+      //       /node_modules\//
+      //     ]
+      //   }
+      // ]
     },
 
     plugins: [
@@ -202,6 +203,7 @@ module.exports = function (env) {
           tslint: {
             emitErrors: false,
             failOnHint: false,
+            typeCheck: true,
             resourcePath: 'src'
           },
 
index 84cb8e13ab06127f208884a39408ba4291ba8932..998ae8fcc6cb6e7c88d3f68804e3b8e65063a460 100644 (file)
   },
   "license": "GPLv3",
   "dependencies": {
-    "@angular/animations": "^4.0.2",
+    "@angular/animations": "~4.0.0",
     "@angular/common": "~4.0.0",
     "@angular/compiler": "~4.0.0",
-    "@angular/compiler-cli": "^4.0.0",
+    "@angular/compiler-cli": "~4.0.0",
     "@angular/core": "~4.0.0",
     "@angular/forms": "~4.0.0",
     "@angular/http": "~4.0.0",
     "assets-webpack-plugin": "^3.4.0",
     "awesome-typescript-loader": "3.0.0-beta.18",
     "bootstrap": "^3.3.6",
-    "bootstrap-loader": "2.0.0-beta.18",
+    "bootstrap-loader": "2.0.0",
     "bootstrap-sass": "^3.3.6",
     "copy-webpack-plugin": "^4.0.0",
     "core-js": "^2.4.1",
-    "css-loader": "^0.25.0",
+    "css-loader": "^0.28.0",
     "css-to-string-loader": "^0.1.2",
     "es6-shim": "^0.35.0",
-    "file-loader": "^0.9.0",
+    "file-loader": "^0.11.0",
     "html-webpack-plugin": "^2.19.0",
     "ie-shim": "^0.1.0",
     "intl": "^1.2.4",
@@ -59,7 +59,7 @@
     "ng2-file-upload": "^1.1.4-2",
     "ng2-smart-table": "1.0.3",
     "ng2-tag-input": "^1.0.5",
-    "ngc-webpack": "1.1.0",
+    "ngc-webpack": "2.0.0",
     "ngx-bootstrap": "1.6.6",
     "node-sass": "^4.1.1",
     "normalize.css": "^5.0.0",
     "reflect-metadata": "^0.1.9",
     "resolve-url-loader": "^1.6.0",
     "rxjs": "~5.0.0-rc.5",
-    "sass-loader": "^4.0.2",
+    "sass-loader": "^6.0.3",
+    "sass-resources-loader": "^1.2.1",
     "script-ext-html-webpack-plugin": "^1.3.2",
-    "source-map-loader": "^0.1.5",
+    "source-map-loader": "^0.2.1",
     "string-replace-loader": "^1.0.3",
-    "style-loader": "^0.13.1",
+    "style-loader": "^0.16.1",
     "tslib": "^1.5.0",
     "tslint": "~4.3.1",
     "tslint-loader": "^3.3.0",
     "videojs-dock": "^2.0.2",
     "webpack": "^2.2.0",
     "webpack-md5-hash": "0.0.5",
-    "webpack-merge": "~2.3.1",
+    "webpack-merge": "~4.1.0",
     "webpack-notifier": "^1.3.0",
     "webtorrent": "^0.98.0",
-    "zone.js": "~0.7.2"
+    "zone.js": "~0.8.5"
   },
   "devDependencies": {
     "add-asset-html-webpack-plugin": "^1.0.2",
-    "codelyzer": "^2.0.0",
+    "codelyzer": "^3.0.0-beta.4",
     "standard": "^10.0.0",
     "webpack-bundle-analyzer": "^2.2.1",
     "webpack-dll-bundles-plugin": "^1.0.0-beta.5"
index 254d0c65e34cead3498dda00d518ccfb757e8983..e15ecde14918fb2d2fd3568d8da478ae1f4186a8 100644 (file)
@@ -2,10 +2,10 @@
 
 <ng2-smart-table [settings]="tableSettings" [source]="friendsSource"></ng2-smart-table>
 
-<a *ngIf="hasFriends()" class="add-user btn btn-danger pull-left" (click)="quitFriends()">
+<a *ngIf="hasFriends()" class="btn btn-danger pull-left" (click)="quitFriends()">
   Quit friends
 </a>
 
-<a *ngIf="!hasFriends()" class="add-user btn btn-success pull-right" [routerLink]="['/admin/friends/add']">
+<a *ngIf="!hasFriends()" class="btn btn-success pull-right" [routerLink]="['/admin/friends/add']">
   Make friends
 </a>
index cb597e12b3ee3cf440d19457fd25c4c519d6c4c7..0a0f621c6f6eea9a58022f7f9b96f3b28b220651 100644 (file)
@@ -1,3 +1,3 @@
-table {
-  margin-bottom: 40px;
+.btn {
+  margin-top: 10px;
 }
index ca531258c3131abe4866717a720a4485d2d7ee58..f35da6535b10d0049ea2a81e54d6bac2deb86c94 100644 (file)
@@ -1,37 +1,38 @@
 <h3>Requests stats</h3>
 
-<div *ngFor="let requestSchedulerName of statsTitles | keys">
-  <div class="block" *ngIf="stats[requestSchedulerName] !== null">
-    <h4>{{ statsTitles[requestSchedulerName] }}</h4>
+<div *ngFor="let requestSchedulerName of statsTitles | keys" class="col-lg-4 col-md-12">
+  <div class="panel panel-default" *ngIf="stats[requestSchedulerName] !== null">
+    <div class="panel-heading">{{ statsTitles[requestSchedulerName] }}</div>
 
-    <div class="requests-general">
-      <div>
-        <span class="label-description">Remaining requests:</span>
-        {{ stats[requestSchedulerName].totalRequests }}
-      </div>
+    <div class="panel-body">
+      <div class="requests-general">
+        <div>
+          <span class="label-description">Remaining requests:</span>
+          {{ stats[requestSchedulerName].totalRequests }}
+        </div>
 
-      <div>
-        <span class="label-description">Interval seconds between requests:</span>
-        {{ stats[requestSchedulerName].secondsInterval }}
-      </div>
+        <div>
+          <span class="label-description">Interval seconds between requests:</span>
+          {{ stats[requestSchedulerName].secondsInterval }}
+        </div>
 
-      <div>
-        <span class="label-description">Remaining time before the scheduled request:</span>
-        {{ stats[requestSchedulerName].remainingSeconds }}
+        <div>
+          <span class="label-description">Remaining time before the scheduled request:</span>
+          {{ stats[requestSchedulerName].remainingSeconds }}
+        </div>
       </div>
-    </div>
 
-    <div class="requests-limit">
-      <div>
-        <span class="label-description">Maximum number of different pods for a scheduled request:</span>
-        {{ stats[requestSchedulerName].requestsLimitPods }}
-      </div>
+      <div class="requests-limit">
+        <div>
+          <span class="label-description">Maximum number of different pods for a scheduled request:</span>
+          {{ stats[requestSchedulerName].requestsLimitPods }}
+        </div>
 
-      <div>
-        <span class="label-description">Maximum number of requests per pod for a scheduled request:</span>
-        {{ stats[requestSchedulerName].requestsLimitPerPod }}
+        <div>
+          <span class="label-description">Maximum number of requests per pod for a scheduled request:</span>
+          {{ stats[requestSchedulerName].requestsLimitPerPod }}
+        </div>
       </div>
     </div>
-
   </div>
 </div>
index c9f724604943d1f554ca29fd51af9812a83e9dc0..b2c41325995a0494ddaa73cbb4158e5859de8649 100644 (file)
@@ -1,23 +1,8 @@
-.block {
-  margin-bottom: 40px;
-}
-
 .label-description {
-  display: inline-block;
   font-weight: bold;
   color: black;
 }
 
-.requests-general {
-  .label-description {
-    width: 320px;
-  }
-}
-
 .requests-limit {
   margin-top: 20px;
-
-  .label-description {
-    width: 430px;
-  }
 }
index 6f10e79cd212c79a61092d855256d7fc08cb1f5d..24bcdf947d3b19f4b4c51ab2e2194980657fe8f4 100644 (file)
@@ -1,11 +1,17 @@
 <h3>Account</h3>
 
-<div class="block">
-  <h4>Change password</h4>
-  <my-account-change-password></my-account-change-password>
+<div class="panel panel-default">
+  <div class="panel-heading">Change password</div>
+
+  <div class="panel-body">
+    <my-account-change-password></my-account-change-password>
+  </div>
 </div>
 
-<div class="block">
-  <h4>Update my informations</h4>
-  <my-account-details [user]="user"></my-account-details>
+<div class="panel panel-default">
+  <div class="panel-heading">Update my informations</div>
+
+  <div class="panel-body">
+    <my-account-details [user]="user"></my-account-details>
+  </div>
 </div>
index e0437e792490600f6e9f795180a12020a4ae4c1b..61b80d0a72174e7101ecd8afddd2d3348b538840 100644 (file)
@@ -1,3 +1,3 @@
-.block {
+.panel {
   margin-top: 40px;
 }
index 0c8e18a2fdba2a6f2b98d04e65cb7c9d28696a0e..f1eb6e021808de5ed196647edf46648a9029207d 100644 (file)
@@ -1,31 +1,31 @@
-<div class="container">
-
-  <header class="row">
-    <div class="col-md-2">
-      <h4 id="peertube-title">
+<div class="container-fluid">
+  <div class="row">
+    <div class="col-md-2 col-sm-3 col-xs-3 title-menu-left">
+      <h4 id="peertube-title" class="title-menu-left-block header">
         <a [routerLink]="['/videos/list']">PeerTube</a>
       </h4>
-    </div>
 
-    <div class="col-md-9">
-      <my-search></my-search>
+      <div class="title-menu-left-block menu">
+        <my-menu *ngIf="isInAdmin() === false"></my-menu>
+        <my-menu-admin *ngIf="isInAdmin() === true"></my-menu-admin>
+      </div>
     </div>
-  </header>
 
+    <div class="col-md-10 col-sm-9 col-xs-9 main-col">
+      <div class="header">
+        <my-search></my-search>
+      </div>
 
-  <div class="row">
-    <my-menu *ngIf="isInAdmin() === false"></my-menu>
-    <my-menu-admin *ngIf="isInAdmin() === true"></my-menu-admin>
-
-    <div class="col-md-9 col-sm-8 col-xs-8 router-outlet-container">
-      <router-outlet></router-outlet>
+      <div class="main-row">
+        <router-outlet></router-outlet>
+      </div>
     </div>
   </div>
 
-  <simple-notifications [options]="notificationOptions"></simple-notifications>
-  <my-confirm></my-confirm>
-
   <footer>
     PeerTube, CopyLeft 2015-2017
   </footer>
 </div>
+
+<my-confirm></my-confirm>
+<simple-notifications [options]="notificationOptions"></simple-notifications>
index 30d1bebde72aa9bc941877e0a3295dfe26d87e27..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,23 +0,0 @@
-#peertube-title a {
-  color: inherit !important;
-
-  &:hover {
-    color: inherit !important;
-    text-decoration: none !important;
-  }
-}
-
-header div {
-  line-height: 25px;
-  margin-bottom: 30px;
-}
-
-.router-outlet-container {
-  @media screen and (max-width: 400px) {
-    padding: 0 3px 0 3px;
-  }
-}
-
-[hidden] {
-  display: none !important;
-}
index ad7a7a1b4a67d3b4f5c27072d9e025d5cb2c4323..027799ee104eeba10d2ec1b71eb2cd936581e13a 100644 (file)
@@ -1,31 +1,31 @@
-<menu class="col-md-2 col-sm-3 col-xs-3">
+<menu>
 
   <div class="panel-block">
-    <div id="panel-users" class="panel-button">
+    <a routerLink="/admin/users/list" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-user"></span>
-      <a [routerLink]="['/admin/users/list']">List users</a>
-    </div>
+      List users
+    </a>
 
-    <div id="panel-friends" class="panel-button">
+    <a routerLink="/admin/friends/list" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-cloud"></span>
-      <a [routerLink]="['/admin/friends/list']">List friends</a>
-    </div>
+      List friends
+    </a>
 
-    <div id="panel-request-stats" class="panel-button">
+    <a routerLink="/admin/requests/stats" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-stats"></span>
-      <a [routerLink]="['/admin/requests/stats']">Request stats</a>
-    </div>
+      Request stats
+    </a>
 
-    <div id="panel-video-abuses" class="panel-button">
+    <a routerLink="/admin/video-abuses/list" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-alert"></span>
-      <a [routerLink]="['/admin/video-abuses/list']">Video abuses</a>
-    </div>
+      Video abuses
+    </a>
   </div>
 
   <div class="panel-block">
-    <div id="panel-quit-administration" class="panel-button">
+    <a routerLink="/videos/list" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-cog"></span>
-      <a [routerLink]="['/videos/list']">Quit admin.</a>
-    </div>
+      Quit admin.
+    </a>
   </div>
 </menu>
diff --git a/client/src/app/core/menu/menu-admin.component.scss b/client/src/app/core/menu/menu-admin.component.scss
new file mode 100644 (file)
index 0000000..4874612
--- /dev/null
@@ -0,0 +1,26 @@
+menu {
+  background-color: $black-background;
+  padding: 20px;
+  margin: 0;
+  height: 100%;
+
+  a {
+    display: block;
+    height: 30px;
+    color: #9cabb8;
+    cursor: pointer;
+
+    &:hover, &:focus {
+      text-decoration: none !important;
+      outline: none !important;
+    }
+
+    .glyphicon {
+      margin-right: 20px;
+    }
+
+    &:hover, &.active {
+      color: #fff;
+    }
+  }
+}
index 59ffccf9f6c9658689e257e88bd61672fd81b5d6..a3d920fdda27b05bdfe2862127867b3cdb152171 100644 (file)
@@ -2,6 +2,7 @@ import { Component } from '@angular/core';
 
 @Component({
   selector: 'my-menu-admin',
-  templateUrl: './menu-admin.component.html'
+  templateUrl: './menu-admin.component.html',
+  styleUrls: [ './menu-admin.component.scss' ]
 })
 export class MenuAdminComponent { }
index de17940a1daec6d723e8e634d9b7f3582e6b8bf8..0b093882f273969f94e9d676d15149daf471da96 100644 (file)
@@ -1,44 +1,44 @@
-<menu class="col-md-2 col-sm-3 col-xs-3">
+<menu>
   <div class="panel-block">
     <div id="panel-user-login" class="panel-button">
-      <span *ngIf="!isLoggedIn" >
+      <a *ngIf="!isLoggedIn" routerLink="/login" routerLinkActive="active">
         <span class="hidden-xs glyphicon glyphicon-log-in"></span>
-        <a [routerLink]="['/login']">Login</a>
-      </span>
+        Login
+      </a>
 
-      <span *ngIf="isLoggedIn">
+      <a *ngIf="isLoggedIn" (click)="logout()">
         <span class="hidden-xs glyphicon glyphicon-log-out"></span>
-        <a *ngIf="isLoggedIn" (click)="logout()">Logout</a>
-      </span>
+        Logout
+      </a>
     </div>
 
-    <div *ngIf="!isLoggedIn && isRegistrationEnabled()" id="panel-user-register" class="panel-button">
+    <a *ngIf="!isLoggedIn && isRegistrationEnabled()" routerLink="/signup" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-user"></span>
-      <a [routerLink]="['/signup']">Signup</a>
-    </div>
+      Signup
+    </a>
 
-    <div *ngIf="isLoggedIn" id="panel-user-account" class="panel-button">
+    <a *ngIf="isLoggedIn" routerLink="/account" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-user"></span>
-      <a [routerLink]="['/account']">My account</a>
-    </div>
+      My account
+    </a>
   </div>
 
   <div class="panel-block">
-    <div id="panel-get-videos" class="panel-button">
+    <a routerLink="/videos/list" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-list"></span>
-      <a [routerLink]="['/videos/list']">See videos</a>
-    </div>
+      See videos
+    </a>
 
-    <div id="panel-upload-video" class="panel-button" *ngIf="isLoggedIn">
+    <a *ngIf="isLoggedIn" routerLink="/videos/add" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-cloud-upload"></span>
-      <a [routerLink]="['/videos/add']">Upload a video</a>
-    </div>
+      Upload a video
+    </a>
   </div>
 
-  <div class="panel-block" *ngIf="isUserAdmin()">
-    <div id="panel-get-videos" class="panel-button">
+  <div class="panel-block">
+    <a *ngIf="isUserAdmin()" routerLink="/admin" routerLinkActive="active">
       <span class="hidden-xs glyphicon glyphicon-cog"></span>
-      <a [routerLink]="['/admin']">Administration</a>
-    </div>
+      Administration
+    </a>
   </div>
 </menu>
index d1f0fa80757fcb089c3dfc8e33db0eb28cd4cce9..e2b9987478f56f92f0923b054db247d02cf9eee2 100644 (file)
@@ -6,7 +6,8 @@ import { ConfigService } from '../config';
 
 @Component({
   selector: 'my-menu',
-  templateUrl: './menu.component.html'
+  templateUrl: './menu.component.html',
+  styleUrls: [ './menu-admin.component.scss' ]
 })
 export class MenuComponent implements OnInit {
   isLoggedIn: boolean;
index 0c7b5038a51b6aaa7fe08a7962dd0f381244eeb8..b03b977dc848472f5f07a4a372f57efa27b6872e 100644 (file)
@@ -1,17 +1,23 @@
+
 <div class="input-group">
-  <div class="input-group-btn" dropdown>
+
+  <span class="input-group-addon icon-addon">
+    <span class="glyphicon glyphicon-search"></span>
+  </span>
+
+  <input
+    type="text" id="search-video" name="search-video" class="form-control" placeholder="Search" class="form-control"
+    [(ngModel)]="searchCriterias.value" (keyup.enter)="doSearch()"
+  >
+
+  <div class="input-group-btn" dropdown placement="bottom right">
     <button id="simple-btn-keyboard-nav" type="button" class="btn btn-default" dropdownToggle>
       {{ getStringChoice(searchCriterias.field) }} <span class="caret"></span>
     </button>
-    <ul class="dropdown-menu" role="menu" aria-labelledby="simple-btn-keyboard-nav" *dropdownMenu>
+    <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="simple-btn-keyboard-nav" *dropdownMenu>
       <li *ngFor="let choice of choiceKeys" class="dropdown-item" role="menu-item">
         <a class="dropdown-item" href="#" (click)="choose($event, choice)">{{ getStringChoice(choice) }}</a>
       </li>
     </ul>
   </div>
-
-  <input
-    type="text" id="search-video" name="search-video" class="form-control" placeholder="Search a video..." class="form-control"
-    [(ngModel)]="searchCriterias.value" (keyup.enter)="doSearch()"
-  >
 </div>
diff --git a/client/src/app/shared/search/search.component.scss b/client/src/app/shared/search/search.component.scss
new file mode 100644 (file)
index 0000000..583f958
--- /dev/null
@@ -0,0 +1,51 @@
+.icon-addon {
+  background-color: #fff;
+  border-radius: 0;
+  border-color: $header-border-color;
+  border-width: 0 0 1px 0;
+  text-align: right;
+
+  .glyphicon-search {
+    width: 30px;
+    font-size: 20px;
+  }
+}
+
+input, button, .input-group {
+  height: 100%;
+}
+
+input, .input-group-btn {
+  border-radius: 0;
+  border-top: none;
+  border-left: none;
+}
+
+input {
+  height: $header-height;
+  border-right: none;
+  font-weight: bold;
+  box-shadow: none;
+
+  &, &:focus {
+    border-bottom: 1px solid $header-border-color !important;
+    outline: none !important;
+    box-shadow: none !important;
+  }
+}
+
+button {
+
+  &, &:hover, &:focus, &:active, &:visited {
+    background-color: #fff !important;
+    border-color: $header-border-color !important;
+    color: #858585 !important;
+    outline: none !important;
+
+    height: $header-height;
+    border-width: 0 0 1px 0;
+    font-weight: bold;
+    text-decoration: none;
+    box-shadow: none;
+  }
+}
index 9f7e156ecaeea7d77300cc293578e4d58686553e..48413b4f2332ab6c0454e039edfd40bb96977e8c 100644 (file)
@@ -7,7 +7,8 @@ import { SearchService } from './search.service';
 
 @Component({
   selector: 'my-search',
-  templateUrl: './search.component.html'
+  templateUrl: './search.component.html',
+  styleUrls: [ './search.component.scss' ]
 })
 
 export class SearchComponent implements OnInit {
index 010f0dbfecb13f0ecd50e98b9e6a58c7bdc09d74..5ece9d003db17e77752ddf429e6e6bfba7c0ee16 100644 (file)
 
 .videos-miniatures {
   min-height: 720px;
+  text-align: center;
 
   my-video-miniature {
+    text-align: left;
     transition: all 0.5s ease;
 
     &.ng-enter {
index b9f19b4f10abc5fd61d11f3c529738b0de2021cd..16e1b5bcc75c5af891e8a25fcf156d832114d0b9 100644 (file)
@@ -22,7 +22,7 @@ export class VideoListComponent implements OnInit, OnDestroy {
   loading: BehaviorSubject<boolean> = new BehaviorSubject(false);
   pagination: RestPagination = {
     currentPage: 1,
-    itemsPerPage: 9,
+    itemsPerPage: 25,
     totalItems: null
   };
   sort: SortField;
index b8b44863155240f5153131ef92881bd624958cba..0b0b0d944b774be9e11f54077a1f4d92a73319db 100644 (file)
@@ -1,4 +1,4 @@
-<div class="video-miniature col-md-4 col-sm-6 col-xs-6" (mouseenter)="onHover()" (mouseleave)="onBlur()">
+<div class="video-miniature" (mouseenter)="onHover()" (mouseleave)="onBlur()">
   <a
     [routerLink]="['/videos/watch', video.id]" [attr.title]="video.description"
     class="video-miniature-thumbnail"
@@ -8,18 +8,20 @@
       NSFW
     </div>
 
-    <span class="video-miniature-duration">{{ video.duration }}</span>
+    <div class="video-miniature-thumbnail-overlay">
+      <span class="video-miniature-thumbnail-overlay-views">{{ video.views }} views</span>
+      <span class="video-miniature-thumbnail-overlay-duration">{{ video.duration }}</span>
+    </div>
   </a>
 
+  <span
+    *ngIf="displayRemoveIcon()" (click)="removeVideo(video.id)"
+    class="video-miniature-remove glyphicon glyphicon-remove"
+  ></span>
+
   <div class="video-miniature-informations">
-    <span class="video-miniature-name-tags">
+    <span class="video-miniature-name">
       <a [routerLink]="['/videos/watch', video.id]" [attr.title]="getVideoName()" class="video-miniature-name">{{ getVideoName() }}</a>
-
-      <div class="video-miniature-tags">
-        <span *ngFor="let tag of video.tags" class="video-miniature-tag">
-          <a [routerLink]="['/videos/list', { field: 'tags', search: tag, sort: currentSort }]" class="label label-primary">{{ tag }}</a>
-        </span>
-      </div>
     </span>
 
     <a [routerLink]="['/videos/list', { field: 'author', search: video.author, sort: currentSort }]" class="video-miniature-author">{{ video.by }}</a>
index f88ced8190d391b3943728026fce1ab54f214e05..1a73648c47e9708a2647cb1c7d32df23c0d662c5 100644 (file)
@@ -1,15 +1,11 @@
 @import "../../../sass/pre-customizations.scss";
 
 .video-miniature {
-  @media screen and (max-width: 400px) {
-    padding: 0;
-  }
-
   margin-top: 30px;
   display: inline-block;
   position: relative;
-  min-width: 220px;
   height: 190px;
+  width: 220px;
 
   .video-miniature-thumbnail {
     display: inline-block;
       height: 110px;
     }
 
-    .video-miniature-duration {
+    img, .thumbnail-nsfw {
+      border-radius: 3px;
+    }
+
+    .video-miniature-thumbnail-overlay {
       position: absolute;
-      right: 5px;
-      bottom: 2px;
+      right: 0px;
+      bottom: 0px;
       display: inline-block;
-      background-color: rgba(0, 0, 0, 0.8);
-      color: rgba(255, 255, 255, 0.8);
-      padding: 2px;
+      background-color: rgba(0, 0, 0, 0.7);
+      color: #fff;
+      padding: 3px 5px;
       font-size: 11px;
+      font-weight: bold;
+      width: 100%;
+
+      .video-miniature-thumbnail-overlay-views {
+
+      }
+
+      .video-miniature-thumbnail-overlay-duration {
+        float: right;
+      }
     }
   }
 
   .video-miniature-informations {
     width: 200px;
 
-    .video-miniature-name-tags {
+    .video-miniature-name {
+      height: 23px;
       display: block;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      font-weight: bold;
+      transition: color 0.2s;
+      font-size: 15px;
+      color: $video-miniature-title-color;
 
-      .video-miniature-name {
-        height: 23px;
-        display: block;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        font-weight: bold;
-        transition: color 0.2s;
-        font-size: 15px;
-
-        &:hover {
-          text-decoration: none;
-        }
+      &:hover {
+        text-decoration: none;
       }
 
       .video-miniature-tags {
@@ -84,8 +91,8 @@
     .video-miniature-author, .video-miniature-views-created-at {
       display: block;
       margin-left: 1px;
-      font-size: 12px;
-      color: #337ab7;
+      font-size: 11px;
+      color: $video-miniature-other-infos;
       opacity: 0.9;
 
       .video-miniature-created-at::before {
diff --git a/client/src/sass/_variables.scss b/client/src/sass/_variables.scss
new file mode 100644 (file)
index 0000000..be57db3
--- /dev/null
@@ -0,0 +1,8 @@
+$black-background: #1d2125;
+$grey-background: #f6f2f2;
+
+$header-height: 60px;
+$header-border-color: #e9eff6;
+
+$video-miniature-title-color: #16a2b7;
+$video-miniature-other-infos: #686767;
index df3ee6c20830f077e97e389bd85486affe11fa97..25d79a0cb799ecdba2bc2ff650eee36d64156e3f 100644 (file)
@@ -1,44 +1,81 @@
 @import '../../node_modules/video.js/dist/video-js.css';
 
-body {
-  padding: 20px;
+[hidden] {
+  display: none !important;
+}
 
-  @media screen and (max-width: 400px) {
-    padding: 3px;
-  }
+input.readonly {
+  /* Force blank on readonly inputs */
+  background-color: #fff !important;
 }
 
-menu {
-  @media screen and (max-width: 600px) {
-    margin-right: 3px !important;
-    padding: 3px !important;
-    min-height: 400px !important;
-  }
+.form-control, .btn {
+  border-radius: 0;
+}
 
-  min-height: 600px;
-  margin-right: 20px;
-  border-right: 1px solid rgba(0, 0, 0, 0.2);
+.glyphicon-black {
+  color: black;
+}
+
+.header {
+  height: $header-height;
 
-  .panel-block:not(:last-child) {
-    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+  .search-col {
+    height: 100%;
+    margin-left: -15px;
+    padding: 0;
   }
+}
 
-  .panel-button {
-    margin: 8px;
-    cursor: pointer;
-    transition: margin 0.2s;
+.main-col {
+  padding: 0;
 
-    &:hover {
-      margin-left: 15px;
+  .main-row {
+    padding: 15px 30px;
+
+    @media screen and (min-width: 1400px) {
+      padding: 15px 40px;
     }
 
-    a {
-      color: #333333;
+    @media screen and (min-width: 1600px) {
+      padding: 15px 50px;
+    }
+
+    @media screen and (min-width: 1800px) {
+      padding: 15px 60px;
     }
   }
+}
 
-  .glyphicon {
-    margin: 5px;
+.title-menu-left {
+  height: calc(100vh - #{$header-height});
+  padding-right: 0;
+
+  .title-menu-left-block {
+    margin-left: -15px;
+
+    &.menu {
+      height: 100%;
+    }
+  }
+
+  #peertube-title {
+    background-color: #fff;
+    border-right: 2px solid $header-border-color;
+    font-size: 25px;
+    line-height: $header-height;
+    text-align: center;
+    margin-top: 0;
+    margin-bottom: 0;
+
+    a {
+      color: inherit !important;
+
+      &:hover {
+        color: inherit !important;
+        text-decoration: none !important;
+      }
+    }
   }
 }
 
@@ -63,19 +100,6 @@ ng2-smart-table {
   }
 }
 
-[hidden] {
-  display: none !important;
-}
-
-input.readonly {
-  /* Force blank on readonly inputs */
-  background-color: #fff !important;
-}
-
-.glyphicon-black {
-  color: black;
-}
-
 footer {
   border-top: 1px solid rgba(0, 0, 0, 0.2);
   padding-top: 10px;
index 0703b0c9a649307273d3c380c41f76e52be58519..693489828e8b31aaa4949a399459a7c836b036c1 100644 (file)
@@ -1,3 +1,5 @@
+@import '_variables.scss';
+
 $bootstrap-sass-asset-helper: false !default;
 //
 // Variables
index 5b2c1c5054ad5637c4c28d81ec2feea70432a297..50b90be65c5a8b9138780a3197b76a1b6a2cbe31 100644 (file)
@@ -46,7 +46,6 @@
     "pipe-naming": [true, "camelCase", "my"],
     "component-class-suffix": true,
     "directive-class-suffix": true,
-    "import-destructuring-spacing": true,
     "templates-use-public": true,
     "no-access-missing-member": true,
     "invoke-injectable": true,