X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fsass%2Fapplication.scss;h=eacfad30bc93cc15573e75ae1dba7d7871f69a3d;hb=5abc96fca2496f33075796db208fccc3543e0f65;hp=f76ceaca1432239e297358d1377c25e5e78664ed;hpb=ac6ac4e2147d9e84d0f1b3fb39f931e7cb454ab3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index f76ceaca1..eacfad30b 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss @@ -8,7 +8,7 @@ $icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/'; @import '~video.js/dist/video-js.css'; -$assets-path: '../assets/'; +$assets-path: '../../assets/'; @import './player/index'; @import './loading-bar'; @@ -31,30 +31,42 @@ body { --mainForegroundColor: #{$fg-color}; --secondaryColor: #{$secondary-color}; + --greyForegroundColor: #{$grey-foreground-color}; + --greyBackgroundColor: #{$grey-background-color}; + --menuBackgroundColor: #{$menu-background}; --menuForegroundColor: #{$menu-color}; --submenuColor: #{$sub-menu-color}; + --inputForegroundColor: #{$input-foreground-color}; --inputBackgroundColor: #{$input-background-color}; --inputPlaceholderColor: #{$input-placeholder-color}; + --textareaForegroundColor: #{$textarea-foreground-color}; --textareaBackgroundColor: #{$textarea-background-color}; + --markdownTextareaBackgroundColor: #{$markdown-textarea-background-color}; --actionButtonColor: #{$grey-foreground-color}; --supportButtonBackgroundColor: #{transparent}; - --supportButtonColor: #{var(--actionButtonColor)}; + --supportButtonColor: #{pvar(--actionButtonColor)}; --supportButtonHeartColor: #{$support-button-heart}; + --activatedActionButtonColor: #{$activated-action-button-color}; + font-family: $main-fonts; font-weight: $font-regular; - color: var(--mainForegroundColor); - background-color: var(--mainBackgroundColor); + color: pvar(--mainForegroundColor); + background-color: pvar(--mainBackgroundColor); font-size: 14px; + // On desktop browsers, make sure vertical scroll bar is always visible + // Allow to disable the scrollbar instead of hide it when the content fit the body + // And not move the content and header horizontally sticked to right when the content is updating + overflow-y: scroll; } ::selection { - color: var(--mainBackgroundColor); - background-color: var(--mainHoverColor); + color: pvar(--mainBackgroundColor); + background-color: pvar(--mainHoverColor); } #incompatible-browser { @@ -71,12 +83,17 @@ strong { input.readonly { /* Force blank on readonly inputs */ - background-color: var(--inputBackgroundColor) !important; + background-color: pvar(--inputBackgroundColor) !important; } input, textarea { outline: none; - color: var(--mainForegroundColor); + color: pvar(--mainForegroundColor); +} + +button { + background: unset; + @include disable-outline; } label { @@ -120,15 +137,24 @@ label { flex-grow: 1; } + my-top-menu-dropdown + .margin-content { + padding-top: $sub-menu-height + $sub-menu-margin-bottom; + } + .sub-menu { - background-color: var(--submenuColor); + background-color: pvar(--submenuColor); width: 100%; - height: 81px; - margin-bottom: $sub-menu-margin-bottom; + height: $sub-menu-height; display: flex; align-items: center; padding-left: $not-expanded-horizontal-margins; padding-right: $not-expanded-horizontal-margins; + position: fixed; + z-index: #{z('header') - 1}; + + & + .margin-content { + padding-top: $sub-menu-height + $sub-menu-margin-bottom; + } } // Override some properties if the main content is expanded (no menu on the left) @@ -159,21 +185,23 @@ label { } .title-page { - color: var(--mainForegroundColor); + opacity: 0.6; + color: pvar(--mainForegroundColor); font-size: 16px; display: inline-block; margin-right: 55px; font-weight: $font-semibold; @include disable-default-a-behaviour; - &.active, &.title-page-single { + border-bottom: 2px solid transparent; + + &.title-page-single { margin-top: 30px; margin-bottom: 25px; } &.active { - font-weight: $font-bold; - border-bottom: 2px solid var(--mainColor); + border-bottom-color: pvar(--mainColor); } &.title-page-single { @@ -181,7 +209,12 @@ label { } &:hover, &:active, &:focus { - color: var(--mainForegroundColor); + color: pvar(--mainForegroundColor); + } + + &.active, &:hover, &:active, &:focus, &.title-page-single { + opacity: 1; + outline: 0px hidden !important; } @media screen and (max-width: $mobile-view) { @@ -193,11 +226,6 @@ label { .title-page-settings { white-space: nowrap; font-size: 115%; - font-weight: $font-regular; - - &.active { - font-weight: $font-semibold; - } } .admin-sub-header { @@ -213,14 +241,18 @@ label { @include disable-default-a-behaviour; font-size: 16px; - color: var(--mainForegroundColor); + color: pvar(--mainForegroundColor); padding: 5px 15px; border-radius: 0.25rem; + font-weight: $font-semibold; + opacity: 0.6; &.active { - font-weight: $font-semibold; background-color: #f0f0f0; - color: #000; + } + + &.active, &:hover, &:active, &:focus { + opacity: 1; } } } @@ -246,6 +278,8 @@ table { .no-results { height: 40vh; + max-height: 500px; + display: flex; align-items: center; justify-content: center; @@ -267,7 +301,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,9 +312,10 @@ 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 { + &, &.expanded { .margin-content { margin-left: $expanded-horizontal-margins/3; margin-right: $expanded-horizontal-margins/3; @@ -298,7 +333,7 @@ table { } } -@media screen and (max-width: #{$mobile-view + $menu-width}) { +@media screen and (min-width: $mobile-view) and (max-width: $small-view) { .main-col { width: 100%; } @@ -316,10 +351,14 @@ table { .sub-menu { width: 100vw; - overflow-x: auto; padding-left: 15px; padding-right: 15px; margin-bottom: $sub-menu-margin-bottom-small-view; + overflow-x: auto; + } + + .admin-sub-header { + @include admin-sub-header-responsive(15px*2); } my-markdown-textarea { @@ -331,8 +370,63 @@ table { input[type=text], input[type=password], input[type=email], - textarea { - width: 100% !important; + textarea, + .peertube-select-container { + flex-grow: 1; + } + + .caption input[type=text] { + width: unset !important; + flex-grow: 1; + } + } + } +} + +// overflow-databale responsive rules +@media screen and (min-width: #{breakpoint(lg)}) { + .main-col { + &.expanded { + @include overflow-datatable(breakpoint(lg), $expanded-horizontal-margins/2, $mobile-paginator: false); + } + + &:not(.expanded) { + @include overflow-datatable(breakpoint(lg), $not-expanded-horizontal-margins + $menu-width/2, $mobile-paginator: false); + } + } +} + +@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), $expanded-horizontal-margins/3 + $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) { + .admin-sub-header { + @include admin-sub-header-responsive($expanded-horizontal-margins/3 + $menu-width/2); + } + + .sub-menu { + overflow-x: auto; + width: calc(100vw - #{$menu-width}); } } }