mirror of https://github.com/Chocobozzz/PeerTube
Fix tables width, paginators, button on mobile / touchscreens (#2695)
parent
7a03209d28
commit
165ee2929b
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
.row {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="dropdown-root" ngbDropdown [placement]="placement" *ngIf="areActionsDisplayed(actions, entry)">
|
||||
<div class="dropdown-root" ngbDropdown [placement]="placement" container="body" *ngIf="areActionsDisplayed(actions, entry)">
|
||||
<div
|
||||
class="action-button" [ngClass]="{ small: buttonSize === 'small', grey: theme === 'grey', orange: theme === 'orange', 'button-styled': buttonStyled }"
|
||||
ngbDropdownToggle role="button"
|
||||
|
|
|
@ -267,7 +267,7 @@ table {
|
|||
top: #{-($header-height + 20px)};
|
||||
}
|
||||
|
||||
@media screen and (max-width: #{map-get($grid-breakpoints, xxl)}) {
|
||||
@media screen and (max-width: #{breakpoint(xxl)}) {
|
||||
.main-col {
|
||||
&.expanded {
|
||||
.margin-content {
|
||||
|
@ -278,7 +278,7 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: #{map-get($grid-breakpoints, lg)}) {
|
||||
@media screen and (max-width: #{breakpoint(lg)}) {
|
||||
/* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
|
||||
.main-col {
|
||||
&, &.expanded {
|
||||
|
@ -343,6 +343,40 @@ table {
|
|||
}
|
||||
}
|
||||
|
||||
// overflow-databale responsive rules
|
||||
@media screen and (max-width: #{breakpoint(xxl)}) {
|
||||
.main-col {
|
||||
&.expanded {
|
||||
@include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/2);
|
||||
}
|
||||
|
||||
&:not(.expanded) {
|
||||
@include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: #{breakpoint(lg)}) {
|
||||
.main-col {
|
||||
&.expanded {
|
||||
@include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/3);
|
||||
}
|
||||
|
||||
&:not(.expanded) {
|
||||
@include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: $small-view) {
|
||||
.main-col {
|
||||
&:not(.expanded),
|
||||
&.expanded {
|
||||
@include overflow-datatable(breakpoint(lg), 15px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: $small-view) and (max-width: #{$small-view + $menu-width}) {
|
||||
.main-col {
|
||||
&:not(.expanded) {
|
||||
|
|
|
@ -66,7 +66,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
|
|||
}
|
||||
|
||||
|
||||
@media screen and (min-width: #{map-get($grid-breakpoints, md)}) {
|
||||
@media screen and (min-width: #{breakpoint(md)}) {
|
||||
.modal:before {
|
||||
vertical-align: middle;
|
||||
content: " ";
|
||||
|
|
|
@ -17,6 +17,10 @@ $grid-breakpoints: (
|
|||
xxl: 1600px
|
||||
);
|
||||
|
||||
@function breakpoint($label) {
|
||||
@return map-get($grid-breakpoints, $label);
|
||||
}
|
||||
|
||||
$container-max-widths: (
|
||||
sm: 420px,
|
||||
md: 720px,
|
||||
|
|
|
@ -80,7 +80,7 @@ p-table {
|
|||
my-edit-button,
|
||||
my-delete-button,
|
||||
my-button {
|
||||
display: block !important;
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,14 +160,20 @@ p-table {
|
|||
my-delete-button,
|
||||
my-button {
|
||||
display: none !important;
|
||||
margin-left: 5px;
|
||||
|
||||
&.show {
|
||||
display: block !important;
|
||||
}
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
my-edit-button + my-delete-button {
|
||||
margin-left: 5px;
|
||||
// keep displaying on touchscreen
|
||||
@media not all and (hover: hover) and (pointer: fine) {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
:first-child {
|
||||
margin-left: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,6 +272,33 @@ p-table {
|
|||
}
|
||||
}
|
||||
|
||||
// overflow data table
|
||||
@mixin overflow-datatable ($table-min-width, $horizontal-margins) {
|
||||
p-table {
|
||||
.ui-table-wrapper {
|
||||
overflow-x: auto;
|
||||
max-width: calc(100vw - #{$horizontal-margins * 2});
|
||||
|
||||
table {
|
||||
min-width: $table-min-width;
|
||||
}
|
||||
}
|
||||
|
||||
p-paginator .ui-paginator-bottom {
|
||||
display: block;
|
||||
|
||||
.ui-paginator-current {
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
a, .ui-paginator-pages {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// multiselect customizations
|
||||
p-multiselect {
|
||||
.ui-multiselect {
|
||||
|
|
Loading…
Reference in New Issue