Client: try to be responsive
This commit is contained in:
parent
45ef55fccd
commit
3eeeb87fe6
|
@ -2,11 +2,11 @@
|
||||||
<div class="row header">
|
<div class="row header">
|
||||||
|
|
||||||
<div class="col-md-2 col-sm-3 col-xs-3 top-left-block" [ngClass]="{ 'border-bottom': isMenuDisplayed === false }">
|
<div class="col-md-2 col-sm-3 col-xs-3 top-left-block" [ngClass]="{ 'border-bottom': isMenuDisplayed === false }">
|
||||||
<div class="hamburger-block">
|
<div class="hamburger-block" (click)="toggleMenu()">
|
||||||
<span (click)="toggleMenu()" class="glyphicon glyphicon-menu-hamburger"></span>
|
<span class="glyphicon glyphicon-menu-hamburger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="peertube-title" class="title-menu-left-block header">
|
<div id="peertube-title">
|
||||||
<a [routerLink]="['/videos/list']" title="Homepage"></a>
|
<a [routerLink]="['/videos/list']" title="Homepage"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,13 +29,14 @@
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
&.border-bottom {
|
&.border-bottom {
|
||||||
border-bottom: 1px solid $header-border-color;
|
border-bottom: 1px solid $header-border-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hamburger-block {
|
.hamburger-block {
|
||||||
margin-right: 20px;
|
margin-right: 15px;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
|
|
||||||
.glyphicon {
|
.glyphicon {
|
||||||
|
@ -53,9 +54,9 @@
|
||||||
background: url(/client/assets/logo.png) no-repeat;
|
background: url(/client/assets/logo.png) no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
width: 180px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
width: 135px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
|
@ -63,6 +64,63 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 500px) {
|
||||||
|
#peertube-title {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hamburger-block {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 500px) and (max-width: 600px) {
|
||||||
|
#peertube-title a {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 600px) and (max-width: 700px) {
|
||||||
|
#peertube-title a {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1000px) {
|
||||||
|
#peertube-title a {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1000px) {
|
||||||
|
#peertube-title a {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1200px) {
|
||||||
|
padding-left: 15px;
|
||||||
|
|
||||||
|
.hamburger-block {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#peertube-title a {
|
||||||
|
width: 135px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1600px) {
|
||||||
|
.hamburger-block {
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#peertube-title a {
|
||||||
|
width: 180px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
my-search {
|
my-search {
|
||||||
|
|
|
@ -45,6 +45,11 @@ export class AppComponent implements OnInit {
|
||||||
this.videoService.loadVideoCategories();
|
this.videoService.loadVideoCategories();
|
||||||
this.videoService.loadVideoLicences();
|
this.videoService.loadVideoLicences();
|
||||||
this.videoService.loadVideoLanguages();
|
this.videoService.loadVideoLanguages();
|
||||||
|
|
||||||
|
// Do not display menu on small screens
|
||||||
|
if (window.innerWidth < 600) {
|
||||||
|
this.isMenuDisplayed = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isInAdmin() {
|
isInAdmin() {
|
||||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-menu-admin',
|
selector: 'my-menu-admin',
|
||||||
templateUrl: './menu-admin.component.html',
|
templateUrl: './menu-admin.component.html',
|
||||||
styleUrls: [ './menu-admin.component.scss' ]
|
styleUrls: [ './menu.component.scss' ]
|
||||||
})
|
})
|
||||||
export class MenuAdminComponent { }
|
export class MenuAdminComponent { }
|
||||||
|
|
|
@ -1,8 +1,19 @@
|
||||||
menu {
|
menu {
|
||||||
background-color: $black-background;
|
background-color: $black-background;
|
||||||
padding: 25px;
|
padding: 15px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
@media screen and (max-width: 550px) {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1200px) {
|
||||||
|
padding: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
.panel-block {
|
.panel-block {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
|
@ -7,7 +7,7 @@ import { ConfigService } from '../config';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-menu',
|
selector: 'my-menu',
|
||||||
templateUrl: './menu.component.html',
|
templateUrl: './menu.component.html',
|
||||||
styleUrls: [ './menu-admin.component.scss' ]
|
styleUrls: [ './menu.component.scss' ]
|
||||||
})
|
})
|
||||||
export class MenuComponent implements OnInit {
|
export class MenuComponent implements OnInit {
|
||||||
isLoggedIn: boolean;
|
isLoggedIn: boolean;
|
||||||
|
|
|
@ -30,30 +30,30 @@
|
||||||
|
|
||||||
<div *ngIf="video !== null" id="video-info">
|
<div *ngIf="video !== null" id="video-info">
|
||||||
<div class="row video-name-views">
|
<div class="row video-name-views">
|
||||||
<div class="col-md-8 video-name">
|
<div class="col-xs-8 col-md-8 video-name">
|
||||||
{{ video.name }}
|
{{ video.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 pull-right video-views">
|
<div class="col-xs-4 col-md-4 pull-right video-views">
|
||||||
{{ video.views}} views
|
{{ video.views}} views
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row video-small-blocks">
|
<div class="row video-small-blocks">
|
||||||
<div class="col-md-3 video-small-block video-small-block-author">
|
<div class="col-xs-5 col-xs-3 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 }]">
|
<a title="Access to all videos of this user" [routerLink]="['/videos/list', { field: 'author', search: video.author }]">
|
||||||
{{ video.by }}
|
{{ video.by }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 video-small-block video-small-block-share">
|
<div class="col-xs-2 col-md-3 video-small-block video-small-block-share">
|
||||||
<a class="option" (click)="showShareModal()" title="Share the video">
|
<a class="option" (click)="showShareModal()" title="Share the video">
|
||||||
<span class="glyphicon glyphicon-share"></span>
|
<span class="glyphicon glyphicon-share"></span>
|
||||||
<span class="video-small-block-text">Share</span>
|
<span class="video-small-block-text">Share</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 video-small-block video-small-block-more">
|
<div class="col-xs-2 col-md-3 video-small-block video-small-block-more">
|
||||||
<div class="video-small-block-dropdown" dropdown dropup="true" placement="right">
|
<div class="video-small-block-dropdown" dropdown dropup="true" placement="right">
|
||||||
<a class="option" title="Access to more options" dropdownToggle>
|
<a class="option" title="Access to more options" dropdownToggle>
|
||||||
<span class="glyphicon glyphicon-option-horizontal"></span>
|
<span class="glyphicon glyphicon-option-horizontal"></span>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3 video-small-block video-small-block-rating">
|
<div class="col-xs-3 col-md-3 video-small-block video-small-block-rating">
|
||||||
<div class="video-small-block-like">
|
<div class="video-small-block-like">
|
||||||
<span
|
<span
|
||||||
class="glyphicon glyphicon-thumbs-up" title="Like this video"
|
class="glyphicon glyphicon-thumbs-up" title="Like this video"
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row video-details">
|
<div class="row video-details">
|
||||||
<div class="video-details-date-description col-md-9">
|
<div class="video-details-date-description col-xs-8 col-md-9">
|
||||||
<div class="video-details-date">
|
<div class="video-details-date">
|
||||||
Published on {{ video.createdAt | date:'short' }}
|
Published on {{ video.createdAt | date:'short' }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="video-details-attributes col-md-3">
|
<div class="video-details-attributes col-xs-4 col-md-3">
|
||||||
<div class="video-details-attribute">
|
<div class="video-details-attribute">
|
||||||
<span class="video-details-attribute-label">
|
<span class="video-details-attribute-label">
|
||||||
Category:
|
Category:
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
// Keep a symmetry with the video name
|
// Keep a symmetry with the video name
|
||||||
padding-right: $video-watch-info-padding-left
|
padding-right: $video-watch-info-padding-left
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-small-blocks {
|
.video-small-blocks {
|
||||||
|
@ -66,6 +67,9 @@
|
||||||
a {
|
a {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.3s;
|
transition: color 0.3s;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
&, &:hover {
|
&, &:hover {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
@ -181,4 +185,53 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 400px) {
|
||||||
|
.video-name-views {
|
||||||
|
font-size: 16px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
.video-name-views {
|
||||||
|
.video-name {
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-views {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-small-blocks {
|
||||||
|
a, .video-small-block-text {
|
||||||
|
font-size: 13px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glyphicon {
|
||||||
|
font-size: 18px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-small-block-author {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-details {
|
||||||
|
.video-details-date-description {
|
||||||
|
padding-left: 10px;
|
||||||
|
font-size: 13px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-details-attributes {
|
||||||
|
font-size: 11px !important;
|
||||||
|
|
||||||
|
.video-details-attribute-label {
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,10 @@ input.readonly {
|
||||||
.content-padding {
|
.content-padding {
|
||||||
padding: 15px 30px;
|
padding: 15px 30px;
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
|
padding: 15px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1400px) {
|
@media screen and (min-width: 1400px) {
|
||||||
padding: 15px 40px;
|
padding: 15px 40px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue