mirror of https://github.com/Chocobozzz/PeerTube
Client: try to be responsive
parent
45ef55fccd
commit
3eeeb87fe6
|
@ -2,11 +2,11 @@
|
|||
<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="hamburger-block">
|
||||
<span (click)="toggleMenu()" class="glyphicon glyphicon-menu-hamburger"></span>
|
||||
<div class="hamburger-block" (click)="toggleMenu()">
|
||||
<span class="glyphicon glyphicon-menu-hamburger"></span>
|
||||
</div>
|
||||
|
||||
<div id="peertube-title" class="title-menu-left-block header">
|
||||
<div id="peertube-title">
|
||||
<a [routerLink]="['/videos/list']" title="Homepage"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -29,13 +29,14 @@
|
|||
margin-bottom: 0;
|
||||
display: flex;
|
||||
position: fixed;
|
||||
padding: 0;
|
||||
|
||||
&.border-bottom {
|
||||
border-bottom: 1px solid $header-border-color;
|
||||
}
|
||||
|
||||
.hamburger-block {
|
||||
margin-right: 20px;
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
|
||||
.glyphicon {
|
||||
|
@ -53,9 +54,9 @@
|
|||
background: url(/client/assets/logo.png) no-repeat;
|
||||
background-size: contain;
|
||||
background-position: center;
|
||||
width: 180px;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
width: 135px;
|
||||
|
||||
&:hover {
|
||||
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 {
|
||||
|
|
|
@ -45,6 +45,11 @@ export class AppComponent implements OnInit {
|
|||
this.videoService.loadVideoCategories();
|
||||
this.videoService.loadVideoLicences();
|
||||
this.videoService.loadVideoLanguages();
|
||||
|
||||
// Do not display menu on small screens
|
||||
if (window.innerWidth < 600) {
|
||||
this.isMenuDisplayed = false;
|
||||
}
|
||||
}
|
||||
|
||||
isInAdmin() {
|
||||
|
|
|
@ -3,6 +3,6 @@ import { Component } from '@angular/core';
|
|||
@Component({
|
||||
selector: 'my-menu-admin',
|
||||
templateUrl: './menu-admin.component.html',
|
||||
styleUrls: [ './menu-admin.component.scss' ]
|
||||
styleUrls: [ './menu.component.scss' ]
|
||||
})
|
||||
export class MenuAdminComponent { }
|
||||
|
|
|
@ -1,8 +1,19 @@
|
|||
menu {
|
||||
background-color: $black-background;
|
||||
padding: 25px;
|
||||
padding: 15px;
|
||||
margin: 0;
|
||||
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 {
|
||||
margin-bottom: 15px;
|
|
@ -7,7 +7,7 @@ import { ConfigService } from '../config';
|
|||
@Component({
|
||||
selector: 'my-menu',
|
||||
templateUrl: './menu.component.html',
|
||||
styleUrls: [ './menu-admin.component.scss' ]
|
||||
styleUrls: [ './menu.component.scss' ]
|
||||
})
|
||||
export class MenuComponent implements OnInit {
|
||||
isLoggedIn: boolean;
|
||||
|
|
|
@ -30,30 +30,30 @@
|
|||
|
||||
<div *ngIf="video !== null" id="video-info">
|
||||
<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 }}
|
||||
</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
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 }]">
|
||||
{{ video.by }}
|
||||
</a>
|
||||
</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">
|
||||
<span class="glyphicon glyphicon-share"></span>
|
||||
<span class="video-small-block-text">Share</span>
|
||||
</a>
|
||||
</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">
|
||||
<a class="option" title="Access to more options" dropdownToggle>
|
||||
<span class="glyphicon glyphicon-option-horizontal"></span>
|
||||
|
@ -94,7 +94,7 @@
|
|||
</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">
|
||||
<span
|
||||
class="glyphicon glyphicon-thumbs-up" title="Like this video"
|
||||
|
@ -120,7 +120,7 @@
|
|||
</div>
|
||||
|
||||
<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">
|
||||
Published on {{ video.createdAt | date:'short' }}
|
||||
</div>
|
||||
|
@ -130,7 +130,7 @@
|
|||
</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">
|
||||
<span class="video-details-attribute-label">
|
||||
Category:
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
// Keep a symmetry with the video name
|
||||
padding-right: $video-watch-info-padding-left
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.video-small-blocks {
|
||||
|
@ -66,6 +67,9 @@
|
|||
a {
|
||||
cursor: pointer;
|
||||
transition: color 0.3s;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
&, &:hover {
|
||||
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 {
|
||||
padding: 15px 30px;
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
padding: 15px 10px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1400px) {
|
||||
padding: 15px 40px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue