X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fsass%2Fapplication.scss;h=c76e5db7b2c692fd418581a5c46ea403a108b6d8;hb=ed5bb517266c80904c44bf44a335f1003f5aa277;hp=f76a822434092f032ecc86d4775eb3868ab9fcaa;hpb=680b54969230a1d6b3cb56aa357db80b9b23e4f6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/application.scss b/client/src/sass/application.scss index f76a82243..c76e5db7b 100644 --- a/client/src/sass/application.scss +++ b/client/src/sass/application.scss @@ -25,33 +25,47 @@ body { // for css custom properties #{$var} --mainColor: #{$main-color}; --mainColorLighter: #{$main-color-lighter}; + --mainColorLightest: #{$main-color-lightest}; --mainHoverColor: #{$main-hover-color}; --mainBackgroundColor: #{$bg-color}; --mainForegroundColor: #{$fg-color}; --secondaryColor: #{$secondary-color}; + --greyForegroundColor: #{$grey-foreground-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 { @@ -68,16 +82,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); } -.btn-outline-secondary { - border-color: $input-border-color; +button { + background: unset; + @include disable-outline; } label { @@ -106,9 +121,14 @@ label { color: black; } +.row { + margin: 0 !important; +} + .main-col { margin-left: $menu-width; - width: auto; + width: calc(100% - #{$menu-width}); + outline: none; .margin-content { margin-left: $not-expanded-horizontal-margins; @@ -117,19 +137,21 @@ label { } .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: 1; } // Override some properties if the main content is expanded (no menu on the left) &.expanded { margin-left: 0; + width: 100%; .margin-content { margin-left: $expanded-horizontal-margins; @@ -141,24 +163,36 @@ label { padding-right: $expanded-horizontal-margins; } } + + &.lock-scroll .main-row > router-outlet + * { + // Lock and hide body scrollbars + position: fixed; + + // Lock and hide sub-menu scrollbars + .sub-menu { + overflow-x: hidden; + } + } } .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 { @@ -166,7 +200,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) { @@ -176,12 +215,8 @@ label { .title-page-about, .title-page-settings { + white-space: nowrap; font-size: 115%; - font-weight: $font-regular; - - &.active { - font-weight: $font-semibold; - } } .admin-sub-header { @@ -197,14 +232,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; } } } @@ -230,6 +269,8 @@ table { .no-results { height: 40vh; + max-height: 500px; + display: flex; align-items: center; justify-content: center; @@ -246,7 +287,12 @@ table { } } -@media screen and (max-width: #{map-get($grid-breakpoints, xxl)}) { +.anchor { + position: relative; + top: #{-($header-height + 20px)}; +} + +@media screen and (max-width: #{breakpoint(xxl)}) { .main-col { &.expanded { .margin-content { @@ -257,9 +303,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; @@ -267,6 +314,7 @@ table { .sub-menu { padding-left: 50px; + padding-right: 50px; .title-page { font-size: 17px; @@ -276,6 +324,12 @@ table { } } +@media screen and (min-width: $mobile-view) and (max-width: $small-view) { + .main-col { + width: 100%; + } +} + @media screen and (max-width: $small-view) { .main-col { margin-left: 0; @@ -288,15 +342,83 @@ table { .sub-menu { width: 100vw; - overflow-x: auto; padding-left: 15px; padding-right: 15px; - margin-bottom: 10px; + margin-bottom: $sub-menu-margin-bottom-small-view; + overflow-x: auto; + } + + .admin-sub-header { + @include admin-sub-header-responsive(15px*2); } - input[type=text], input[type=password] { + my-markdown-textarea { + .root { + max-width: 100% !important; + } + } + + input[type=text], + input[type=password], + input[type=email], + textarea, + .peertube-select-container { width: 100% !important; } + + .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}); + } } } }