Make admin sub-navs, selects, buttons responsive (#2702)

pull/2706/head
Kim 2020-05-01 00:51:09 +02:00 committed by GitHub
parent 0ac458bffb
commit 7a03209d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 0 deletions

View File

@ -5,3 +5,29 @@
flex-grow: 0;
margin-right: 30px;
}
@media screen and (max-width: $small-view) {
::ng-deep .plugins .plugin .first-row {
flex-wrap: wrap;
.plugin-name,
.plugin-version,
.plugin-icon {
margin-bottom: 10px;
}
.buttons {
my-edit-button,
my-delete-button,
my-button {
.action-button {
padding: 0 13px;
}
.button-label {
display: none;
}
}
}
}
}

View File

@ -18,6 +18,7 @@
}
.admin-sub-header {
flex-direction: row !important;
justify-content: flex-end;
.select-filter-block {

View File

@ -57,3 +57,38 @@
}
}
@media screen and (max-width: $small-view) {
.header {
flex-direction: column;
.peertube-select-container,
my-button {
width: 100% !important;
margin-left: 0px !important;
margin-bottom: 10px !important;
}
my-button {
text-align: center;
}
}
}
@media screen and (max-width: #{$small-view + $menu-width}) {
:host-context(.main-col:not(.expanded)) {
.header {
flex-direction: column;
.peertube-select-container,
my-button {
width: 100% !important;
margin-left: 0px !important;
margin-bottom: 10px !important;
}
my-button {
text-align: center;
}
}
}
}

View File

@ -322,6 +322,10 @@ table {
margin-bottom: $sub-menu-margin-bottom-small-view;
}
.admin-sub-header {
@include admin-sub-header-responsive(15px*2);
}
my-markdown-textarea {
.root {
max-width: 100% !important;
@ -338,3 +342,13 @@ table {
}
}
}
@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
.main-col {
&:not(.expanded) {
.admin-sub-header {
@include admin-sub-header-responsive($menu-width/2 + $expanded-horizontal-margins/3);
}
}
}
}

View File

@ -875,3 +875,26 @@
}
}
}
@mixin admin-sub-header-responsive ($horizontal-margins) {
flex-direction: column;
.form-sub-title {
margin-right: 0px !important;
margin-bottom: 10px;
text-align: center;
}
.admin-sub-nav {
display: block;
overflow-x: auto;
white-space: nowrap;
height: 50px;
padding: 10px 0;
width: calc(100vw - #{$horizontal-margins*2});
a {
margin-left: 5px;
}
}
}