Fix video filters responsive

Signed-off-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
Chocobozzz 2024-11-27 14:38:16 +01:00
parent f27beec235
commit 88d50474d2
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
5 changed files with 26 additions and 19 deletions

View File

@ -11,7 +11,7 @@
</div> </div>
<div class="d-flex flex-wrap-reverse align-items-start justify-content-between"> <div class="d-flex flex-wrap-reverse align-items-start justify-content-between">
<div class="me-3"> <div class="gap-3">
<div class="scope-info" *ngIf="totalFollowing && !hideScope"> <div class="scope-info" *ngIf="totalFollowing && !hideScope">
@if (filters.scope === 'local') { @if (filters.scope === 'local') {
<ng-container i18n>Videos on <strong>{{ instanceName }}</strong></ng-container> <ng-container i18n>Videos on <strong>{{ instanceName }}</strong></ng-container>
@ -20,7 +20,7 @@
} }
</div> </div>
<div class="filters-summary d-inline-block"> <div class="filters-summary">
<div class="d-inline-block active-filters"> <div class="d-inline-block active-filters">
@for (filter of filters.getActiveFilters(); track filter.key + (filter.value || '')) { @for (filter of filters.getActiveFilters(); track filter.key + (filter.value || '')) {
@if (filter.key !== 'scope') { @if (filter.key !== 'scope') {

View File

@ -51,9 +51,10 @@ $filters-background: pvar(--bg-secondary-400);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
background-color: $filters-background; background-color: $filters-background;
padding: 1.5rem;
border-radius: 14px; border-radius: 14px;
@include rfs(1.5rem, padding);
input[type=radio] + label { input[type=radio] + label {
font-weight: $font-regular; font-weight: $font-regular;
} }
@ -116,8 +117,9 @@ $filters-background: pvar(--bg-secondary-400);
} }
my-select-languages, my-select-languages,
my-select-categories { my-select-categories,
width: 300px; my-select-options {
max-width: 300px;
display: inline-block; display: inline-block;
} }
@ -132,7 +134,19 @@ my-select-categories {
} }
@media screen and (max-width: $small-view) { @media screen and (max-width: $small-view) {
.filters-row { .filters-toggle {
margin-top: 0.5rem;
@include margin-left(0);
}
.filters-summary {
display: flex;
flex-direction: column; flex-direction: column;
} }
.filters {
border-start-start-radius: 0;
border-start-end-radius: 0;
}
} }

View File

@ -65,7 +65,7 @@ body {
--support-btn-heart-bg: var(--supportButtonHeartColor, #{$support-button-heart}); --support-btn-heart-bg: var(--supportButtonHeartColor, #{$support-button-heart});
--x-margin-content: 2rem; --x-margin-content: 2rem;
--x-videos-margin-content: 2rem;
--main-col-width: calc(100vw - #{$menu-width}); --main-col-width: calc(100vw - #{$menu-width});
--secondary-icon-color: #{pvar(--fg-50)}; --secondary-icon-color: #{pvar(--fg-50)};

View File

@ -111,20 +111,14 @@
color: #E9DFDF; color: #E9DFDF;
} }
// Use margin by default, or padding if $margin is false @mixin grid-videos-miniature-margins {
@mixin grid-videos-miniature-margins ($margin: true, $min-margin: 0) { --grid-videos-miniature-margins: #{pvar(--x-margin-content)};
--gridVideosMiniatureMargins: #{pvar(--x-videos-margin-content)};
@if $margin { @include margin-left(var(--grid-videos-miniature-margins) !important);
@include margin-left(var(--gridVideosMiniatureMargins) !important); @include margin-right(var(--grid-videos-miniature-margins) !important);
@include margin-right(var(--gridVideosMiniatureMargins) !important);
} @else {
@include padding-left(var(--gridVideosMiniatureMargins) !important);
@include padding-right(var(--gridVideosMiniatureMargins) !important);
}
@media screen and (max-width: $mobile-view) { @media screen and (max-width: $mobile-view) {
--gridVideosMiniatureMargins: #{$min-margin}; --grid-videos-miniature-margins: 0;
width: auto; width: auto;
} }

View File

@ -84,7 +84,6 @@ $variables: (
--embed-big-play-background-color: var(--embed-big-play-background-color), --embed-big-play-background-color: var(--embed-big-play-background-color),
--x-margin-content: var(--x-margin-content), --x-margin-content: var(--x-margin-content),
--x-videos-margin-content: var(--x-videos-margin-content),
--main-col-width: var(--main-col-width), --main-col-width: var(--main-col-width),
--header-height: var(--header-height), --header-height: var(--header-height),