1
0
Fork 0
peertube/client/src/sass/application.scss

428 lines
8.7 KiB
SCSS
Raw Normal View History

$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2017-12-11 16:36:46 +00:00
@import '_bootstrap-variables';
2018-09-05 13:32:15 +00:00
@import '_variables';
@import '_mixins';
2018-06-06 17:21:02 +00:00
@import '_fonts';
2017-12-11 16:36:46 +00:00
2019-06-12 10:40:24 +00:00
@import './bootstrap';
@import './primeng-custom';
2021-04-28 14:41:07 +00:00
@import './ng-select';
2021-04-28 14:41:07 +00:00
@import './classes';
2021-03-29 13:56:01 +00:00
2017-04-21 09:06:33 +00:00
[hidden] {
display: none !important;
}
2017-12-01 08:20:19 +00:00
body {
2018-09-05 13:32:15 +00:00
/*** theme ***/
// now beware sass requires interpolation
2018-09-05 13:32:15 +00:00
// for css custom properties #{$var}
2020-03-11 12:50:53 +00:00
--mainColor: #{$main-color};
--mainColorLighter: #{$main-color-lighter};
--mainColorLightest: #{$main-color-lightest};
2020-03-11 12:50:53 +00:00
--mainHoverColor: #{$main-hover-color};
2018-09-05 13:32:15 +00:00
--mainBackgroundColor: #{$bg-color};
--mainForegroundColor: #{$fg-color};
2020-03-11 12:50:53 +00:00
--secondaryColor: #{$secondary-color};
2019-12-03 19:10:27 +00:00
2020-05-22 09:21:55 +00:00
--greyForegroundColor: #{$grey-foreground-color};
2020-07-24 15:21:25 +00:00
--greyBackgroundColor: #{$grey-background-color};
2020-05-22 09:21:55 +00:00
--menuBackgroundColor: #{$menu-background};
--menuForegroundColor: #{$menu-color};
2021-03-25 12:42:55 +00:00
--submenuBackgroundColor: #{$sub-menu-background-color};
2021-03-25 12:42:55 +00:00
--channelBackgroundColor: #{$channel-background-color};
2019-12-03 19:10:27 +00:00
--inputForegroundColor: #{$input-foreground-color};
2020-01-29 15:00:28 +00:00
--inputBackgroundColor: #{$input-background-color};
2018-09-05 13:32:15 +00:00
--inputPlaceholderColor: #{$input-placeholder-color};
--textareaForegroundColor: #{$textarea-foreground-color};
--textareaBackgroundColor: #{$textarea-background-color};
2020-05-20 11:52:12 +00:00
--markdownTextareaBackgroundColor: #{$markdown-textarea-background-color};
--actionButtonColor: #{$grey-foreground-color};
--supportButtonBackgroundColor: #{transparent};
--supportButtonColor: #{pvar(--actionButtonColor)};
--supportButtonHeartColor: #{$support-button-heart};
2019-12-03 19:10:27 +00:00
2020-05-22 09:15:31 +00:00
--activatedActionButtonColor: #{$activated-action-button-color};
2021-03-31 09:21:10 +00:00
--horizontalMarginContent: #{$not-expanded-horizontal-margins};
--videosHorizontalMarginContent: 6vw;
2021-03-31 09:21:10 +00:00
--mainColWidth: calc(100vw - #{$menu-width});
2020-08-07 13:39:25 +00:00
2018-02-22 17:32:31 +00:00
font-family: $main-fonts;
2017-12-01 08:20:19 +00:00
font-weight: $font-regular;
color: pvar(--mainForegroundColor);
background-color: pvar(--mainBackgroundColor);
2018-08-09 07:22:10 +00:00
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;
2017-12-01 08:20:19 +00:00
}
::selection {
color: pvar(--mainBackgroundColor);
background-color: pvar(--mainHoverColor);
}
noscript,
#incompatible-browser {
display: block;
font-size: 1.2rem;
max-width: 600px;
margin: 1rem auto;
}
2018-02-20 15:13:05 +00:00
strong {
font-weight: $font-semibold;
}
2017-04-21 09:06:33 +00:00
input.readonly {
/* Force blank on readonly inputs */
background-color: pvar(--inputBackgroundColor) !important;
2015-12-05 11:14:55 +00:00
}
2021-04-28 14:41:07 +00:00
input,
textarea {
outline: none;
2021-01-20 09:59:47 +00:00
color: pvar(--inputForegroundColor);
}
button {
@include disable-outline;
2021-04-28 14:41:07 +00:00
background: unset;
}
2017-12-05 15:48:26 +00:00
label {
font-weight: $font-bold;
font-size: 15px;
2017-04-21 14:40:45 +00:00
}
code {
background-color: pvar(--greyBackgroundColor);
color: pvar(--greyForegroundColor);
border-radius: 3px;
padding: .2em .4em;
margin: auto .4em;
font-size: 75%;
display: inline-block;
vertical-align: middle;
}
2017-12-06 08:19:25 +00:00
.form-error {
display: block;
2018-08-28 15:39:29 +00:00
color: $red;
2017-12-06 08:19:25 +00:00
margin-top: 5px;
}
2021-04-28 14:41:07 +00:00
.input-error,
my-input-toggle-hidden ::ng-deep input {
2018-08-28 15:39:29 +00:00
border-color: $red !important;
2017-12-06 08:19:25 +00:00
}
2021-04-28 14:41:07 +00:00
.full-width {
width: 100%;
margin-left: auto;
margin-right: auto;
max-width: initial;
}
2017-04-21 09:06:33 +00:00
.glyphicon-black {
2021-04-28 14:41:07 +00:00
color: #000;
2017-04-21 09:06:33 +00:00
}
.row {
margin: 0 !important;
}
2017-04-21 09:06:33 +00:00
.main-col {
2017-12-01 16:38:26 +00:00
margin-left: $menu-width;
width: calc(100% - #{$menu-width});
outline: none;
2017-12-01 13:46:22 +00:00
2017-12-01 16:38:26 +00:00
.margin-content {
2021-03-31 09:21:10 +00:00
margin-left: pvar(--horizontalMarginContent);
margin-right: pvar(--horizontalMarginContent);
2018-08-09 07:22:10 +00:00
flex-grow: 1;
2017-12-01 16:38:26 +00:00
}
.sub-menu {
background-color: pvar(--submenuBackgroundColor);
2017-12-01 16:38:26 +00:00
width: 100%;
display: flex;
align-items: center;
2021-03-31 09:21:10 +00:00
padding-left: pvar(--horizontalMarginContent);
padding-right: pvar(--horizontalMarginContent);
height: $sub-menu-height;
margin-bottom: $sub-menu-margin-bottom;
2021-03-31 09:21:10 +00:00
overflow-x: auto;
2020-08-10 07:42:50 +00:00
&.sub-menu-fixed {
position: fixed;
2020-08-19 09:35:01 +00:00
z-index: #{z('sub-menu') - 1};
2021-03-31 09:21:10 +00:00
max-width: pvar(--mainColWidth);
}
2017-12-01 16:38:26 +00:00
}
// Use an appropriate offset top when sub-menu fixed
.margin-content.offset-content {
padding-top: $sub-menu-height + $sub-menu-margin-bottom;
}
2017-12-01 16:38:26 +00:00
// Override some properties if the main content is expanded (no menu on the left)
&.expanded {
2021-03-31 09:21:10 +00:00
--horizontalMarginContent: #{$expanded-horizontal-margins};
--mainColWidth: 100vw;
2017-12-01 16:38:26 +00:00
margin-left: 0;
width: 100%;
}
2021-04-28 14:41:07 +00:00
&.lock-scroll .main-row > router-outlet + * { /* stylelint-disable-line selector-max-compound-selectors */
// Lock and hide body scrollbars
position: fixed;
// Lock and hide sub-menu scrollbars
2021-04-28 14:41:07 +00:00
.sub-menu { /* stylelint-disable-line */
overflow-x: hidden;
}
}
2017-04-21 09:06:33 +00:00
}
2017-12-07 09:33:16 +00:00
.title-page {
2021-04-28 14:41:07 +00:00
@include disable-default-a-behaviour;
opacity: 0.6;
color: pvar(--mainForegroundColor);
2017-12-07 09:33:16 +00:00
font-size: 16px;
display: inline-block;
margin-right: 55px;
font-weight: $font-semibold;
border-bottom: 2px solid transparent;
&.title-page-single {
2017-12-07 09:33:16 +00:00
margin-top: 30px;
margin-bottom: 25px;
}
2017-12-08 07:39:15 +00:00
&.active {
border-bottom-color: pvar(--mainColor);
}
&.title-page-single {
font-size: 125%;
}
2021-04-28 14:41:07 +00:00
&:hover,
&:active,
&:focus {
color: pvar(--mainForegroundColor);
2017-12-08 09:41:49 +00:00
}
2018-05-09 07:23:27 +00:00
2021-04-28 14:41:07 +00:00
&.active,
&:hover,
&:active,
&:focus,
&.title-page-single {
opacity: 1;
2021-04-28 14:41:07 +00:00
outline: 0 hidden !important;
}
@media screen and (max-width: $mobile-view) {
2019-04-11 09:18:19 +00:00
margin-right: 15px;
2018-05-09 07:23:27 +00:00
}
2017-12-08 07:39:15 +00:00
}
2017-12-08 09:41:49 +00:00
.title-page-about,
.title-page-settings {
white-space: nowrap;
font-size: 115%;
}
2017-12-08 13:34:17 +00:00
.admin-sub-header {
display: flex;
align-items: center;
margin-bottom: 30px;
2018-04-26 14:11:38 +00:00
.form-sub-title {
2017-12-08 13:34:17 +00:00
flex-grow: 1;
}
2018-08-14 14:01:54 +00:00
.admin-sub-nav a {
@include disable-default-a-behaviour;
font-size: 16px;
color: pvar(--mainForegroundColor);
2018-08-14 14:01:54 +00:00
padding: 5px 15px;
border-radius: 0.25rem;
font-weight: $font-semibold;
opacity: 0.6;
2018-08-14 14:01:54 +00:00
&.active {
background-color: pvar(--submenuBackgroundColor);
}
2021-04-28 14:41:07 +00:00
&.active,
&:hover,
&:active,
&:focus {
opacity: 1;
2018-08-14 14:01:54 +00:00
}
}
2017-12-08 13:34:17 +00:00
}
2018-04-26 14:11:38 +00:00
.form-sub-title {
2017-12-08 09:41:49 +00:00
font-size: 20px;
font-weight: bold;
2017-12-07 09:33:16 +00:00
}
2017-12-21 14:24:49 +00:00
// In tables, don't have a hover different background
table {
2021-04-28 14:41:07 +00:00
.action-button-edit,
.action-button-delete {
&:hover,
&:active,
&:focus,
&[disabled],
&.disabled {
background-color: $grey-background-color !important;
2017-12-21 14:24:49 +00:00
}
}
}
2018-08-30 12:58:00 +00:00
.no-results {
height: 40vh;
max-height: 500px;
2018-08-30 12:58:00 +00:00
display: flex;
flex-direction: column;
2018-08-30 12:58:00 +00:00
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: $font-semibold;
}
.dropdown-item {
@include dropdown-with-icon-item;
my-global-icon {
width: 22px;
height: 22px;
}
}
/* offsetTop for scrollToAnchor */
.anchor {
position: relative;
top: #{-($header-height + 20px)};
}
.offset-content { // if sub-menu fixed
.anchor {
top: #{-($header-height + $sub-menu-height + 20px)};
}
}
.form-group-description {
@extend .text-muted;
font-size: 90%;
margin-top: 10px;
}
2020-11-09 15:08:03 +00:00
ngx-loading-bar {
z-index: z(header) + 1 !important;
}
@media screen and (max-width: #{breakpoint(xxl)}) {
.main-col {
2021-04-28 14:41:07 +00:00
--horizontalMarginContent: #{$not-expanded-horizontal-margins / 2};
--videosHorizontalMarginContent: 30px;
&.expanded {
--horizontalMarginContent: #{$expanded-horizontal-margins / 2};
}
}
}
@media screen and (max-width: #{breakpoint(lg)}) {
.main-col {
--videosHorizontalMarginContent: #{pvar(--horizontalMarginContent)};
}
/* the following applies from 500px to 900px and is partially overriden from 500px to 800px by changes below to $small-view */
2021-03-31 09:21:10 +00:00
.main-col,
.main-col.expanded {
--horizontalMarginContent: #{$expanded-horizontal-margins / 3};
2021-03-31 09:21:10 +00:00
.sub-menu {
padding-left: 50px;
padding-right: 50px;
2018-08-21 14:18:59 +00:00
2021-03-31 09:21:10 +00:00
.title-page {
font-size: 17px;
}
2018-01-31 10:38:05 +00:00
}
}
}
@media screen and (min-width: $mobile-view) and (max-width: $small-view) {
.main-col {
width: 100%;
}
}
2018-09-05 09:20:44 +00:00
@media screen and (max-width: $small-view) {
2021-03-31 09:21:10 +00:00
.main-col,
.main-col.expanded {
--horizontalMarginContent: 15px;
2021-03-31 09:21:10 +00:00
margin-left: 0;
2021-03-31 09:21:10 +00:00
.sub-menu {
width: 100vw;
padding-left: 15px;
padding-right: 15px;
margin-bottom: $sub-menu-margin-bottom-small-view;
overflow-x: auto;
}
2021-03-31 09:21:10 +00:00
// Use an appropriate offset top when sub-menu fixed
.margin-content.offset-content {
padding-top: $sub-menu-height + $sub-menu-margin-bottom-small-view;
}
2021-03-31 09:21:10 +00:00
.admin-sub-header {
@include admin-sub-header-responsive;
}
2021-03-31 09:21:10 +00:00
my-markdown-textarea {
.root {
max-width: 100% !important;
}
}
2021-03-31 09:21:10 +00:00
input[type=text],
input[type=password],
input[type=email],
textarea,
.peertube-select-container {
flex-grow: 1;
}
2021-03-31 09:21:10 +00:00
.caption input[type=text] {
width: unset !important;
flex-grow: 1;
}
}
}