2018-01-04 19:35:56 +03:00
|
|
|
/** Calculate luma as it is also used in OCA\Theming\Util::calculateLuma */
|
|
|
|
@function luma($c) {
|
|
|
|
$-local-red: red(rgba($c, 1.0));
|
|
|
|
$-local-green: green(rgba($c, 1.0));
|
|
|
|
$-local-blue: blue(rgba($c, 1.0));
|
|
|
|
|
|
|
|
@return (0.2126 * $-local-red + 0.7152 * $-local-green + 0.0722 * $-local-blue) / 255;
|
|
|
|
}
|
|
|
|
|
2019-11-25 18:29:29 +03:00
|
|
|
@mixin faded-background {
|
2020-06-03 10:17:15 +03:00
|
|
|
background-color: $color-primary;
|
|
|
|
|
|
|
|
@if ($color-primary == #0082C9) {
|
|
|
|
background-image: linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%);
|
|
|
|
} @else {
|
|
|
|
/** This will be overwritten by the faded-background-image mixin if needed */
|
|
|
|
background-image: none;
|
|
|
|
}
|
2019-11-25 18:29:29 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin faded-background-image {
|
2020-06-03 10:17:15 +03:00
|
|
|
@include faded-background;
|
|
|
|
background-size: contain;
|
|
|
|
|
|
|
|
@if ($color-primary == #0082C9) {
|
2019-11-25 18:29:29 +03:00
|
|
|
background-image: $image-login-background, linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%);
|
2020-06-03 10:17:15 +03:00
|
|
|
}
|
2020-01-05 02:14:28 +03:00
|
|
|
|
2020-06-03 10:17:15 +03:00
|
|
|
@if($has-custom-background == true) {
|
|
|
|
background-size: cover;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-image: $image-login-background;
|
2019-11-25 18:29:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-05 02:14:28 +03:00
|
|
|
$has-custom-background: variable_exists('theming-background-mime') and $theming-background-mime != '';
|
2018-08-28 19:21:17 +03:00
|
|
|
$has-custom-logo: variable_exists('theming-logo-mime') and $theming-logo-mime != '';
|
|
|
|
$invert: luma($color-primary) > 0.6;
|
|
|
|
|
|
|
|
@if ($has-custom-logo == false) {
|
|
|
|
@if ($invert) {
|
2018-08-30 21:00:13 +03:00
|
|
|
$image-logo: url(icon-color-path('logo', 'logo', #000000, 1, true));
|
2018-08-28 19:21:17 +03:00
|
|
|
} @else {
|
2018-08-30 21:00:13 +03:00
|
|
|
$image-logo: url(icon-color-path('logo', 'logo', #ffffff, 1, true));
|
2018-08-28 19:21:17 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-17 18:42:07 +03:00
|
|
|
.nc-theming-main-background {
|
|
|
|
background-color: $color-primary;
|
|
|
|
}
|
|
|
|
|
|
|
|
.nc-theming-main-text {
|
|
|
|
color: $color-primary-text;
|
|
|
|
}
|
|
|
|
|
|
|
|
.nc-theming-contrast {
|
|
|
|
color: $color-primary-text;
|
|
|
|
}
|
|
|
|
|
2018-08-28 19:21:17 +03:00
|
|
|
@if ($invert) {
|
2019-09-11 12:27:59 +03:00
|
|
|
// too bright, use dark text to mix the primary
|
|
|
|
$color-primary-light: mix($color-primary, $color-main-text, 10%);
|
|
|
|
|
2018-01-10 11:11:17 +03:00
|
|
|
#appmenu:not(.inverted) svg {
|
2018-01-04 19:36:24 +03:00
|
|
|
filter: invert(1);
|
|
|
|
}
|
2018-01-10 11:11:17 +03:00
|
|
|
#appmenu.inverted svg {
|
|
|
|
filter: none;
|
|
|
|
}
|
2017-02-17 18:42:07 +03:00
|
|
|
.searchbox input[type="search"] {
|
2018-07-31 01:10:34 +03:00
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: 6px center;
|
|
|
|
background-color: transparent;
|
|
|
|
@include icon-color('search', 'actions', $color-black, 1, true);
|
2017-02-17 18:42:07 +03:00
|
|
|
}
|
2017-08-03 18:27:24 +03:00
|
|
|
#contactsmenu .icon-contacts {
|
2018-07-31 01:10:34 +03:00
|
|
|
@include icon-color('contacts', 'places', $color-black, 1, true);
|
2017-04-27 18:52:09 +03:00
|
|
|
}
|
|
|
|
#settings .icon-settings-white {
|
2018-07-31 01:10:34 +03:00
|
|
|
@include icon-color('settings', 'actions', $color-black, 1, true);
|
2017-04-27 18:52:09 +03:00
|
|
|
}
|
2017-06-17 11:08:31 +03:00
|
|
|
#appmenu .icon-more-white {
|
2018-07-31 01:10:34 +03:00
|
|
|
@include icon-color('more', 'actions', $color-black, 1, true);
|
2017-06-17 11:08:31 +03:00
|
|
|
}
|
2018-01-04 19:36:24 +03:00
|
|
|
} @else {
|
2018-01-10 11:11:17 +03:00
|
|
|
#appmenu:not(.inverted) svg {
|
|
|
|
filter: none;
|
|
|
|
}
|
|
|
|
#appmenu.inverted svg {
|
|
|
|
filter: invert(1);
|
|
|
|
}
|
2017-02-17 18:42:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Colorized svg images */
|
|
|
|
.icon-file, .icon-filetype-text {
|
2017-04-27 18:52:09 +03:00
|
|
|
background-image: url(./img/core/filetypes/text.svg?v=#{$theming-cachebuster});
|
2017-02-17 18:42:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.icon-folder, .icon-filetype-folder {
|
|
|
|
background-image: url(./img/core/filetypes/folder.svg?v=#{$theming-cachebuster});
|
|
|
|
}
|
|
|
|
|
|
|
|
.icon-filetype-folder-drag-accept {
|
|
|
|
background-image: url(./img/core/filetypes/folder-drag-accept.svg?v=#{$theming-cachebuster}) !important;
|
|
|
|
}
|
|
|
|
|
2018-08-28 13:01:32 +03:00
|
|
|
#theming-preview-logo,
|
|
|
|
#header .logo {
|
|
|
|
background-image: $image-logo;
|
|
|
|
}
|
|
|
|
|
2019-11-25 18:29:29 +03:00
|
|
|
#body-user #header, #body-settings #header, #body-public #header {
|
|
|
|
@include faded-background;
|
|
|
|
}
|
|
|
|
|
2020-06-03 10:17:15 +03:00
|
|
|
#body-login,
|
|
|
|
#firstrunwizard .firstrunwizard-header,
|
|
|
|
#theming-preview {
|
|
|
|
@include faded-background-image;
|
|
|
|
}
|
|
|
|
|
2017-02-17 18:42:07 +03:00
|
|
|
/* override styles for login screen in guest.css */
|
2018-08-28 19:21:17 +03:00
|
|
|
@if ($has-custom-logo) {
|
|
|
|
// custom logo
|
2018-03-28 13:24:10 +03:00
|
|
|
#theming-preview-logo,
|
|
|
|
#header .logo {
|
2017-06-30 14:27:33 +03:00
|
|
|
background-size: contain;
|
|
|
|
}
|
2018-08-28 13:01:32 +03:00
|
|
|
|
2018-02-02 14:56:54 +03:00
|
|
|
#body-login #header .logo {
|
|
|
|
margin-bottom: 22px;
|
|
|
|
}
|
2018-08-28 19:21:17 +03:00
|
|
|
} @else {
|
|
|
|
// default logo
|
|
|
|
@if ($invert) {
|
|
|
|
#theming-preview-logo,
|
|
|
|
#header .logo {
|
|
|
|
opacity: .6;
|
|
|
|
}
|
|
|
|
}
|
2017-02-17 18:42:07 +03:00
|
|
|
}
|
|
|
|
|
2018-02-26 16:04:00 +03:00
|
|
|
@if variable_exists('theming-logoheader-mime') and $theming-logoheader-mime != '' {
|
|
|
|
#theming .advanced-option-logoheader .image-preview,
|
|
|
|
body:not(#body-login) #header .logo {
|
2019-08-21 18:18:23 +03:00
|
|
|
background-image: $image-logoheader;
|
2018-02-26 16:04:00 +03:00
|
|
|
}
|
|
|
|
} @else {
|
|
|
|
#theming .advanced-option-favicon .image-preview {
|
|
|
|
background-image: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@if variable_exists('theming-favicon-mime') and $theming-favicon-mime != '' {
|
|
|
|
#theming .advanced-option-favicon .image-preview {
|
2019-08-21 18:18:23 +03:00
|
|
|
background-image: $image-favicon;
|
2018-02-26 16:04:00 +03:00
|
|
|
}
|
|
|
|
} @else {
|
|
|
|
#theming .advanced-option-favicon .image-preview {
|
|
|
|
background-image: none;
|
|
|
|
}
|
2017-02-17 18:42:07 +03:00
|
|
|
}
|
|
|
|
|
2017-09-05 19:46:57 +03:00
|
|
|
input.primary,
|
|
|
|
#alternative-logins li a {
|
2017-08-11 16:11:47 +03:00
|
|
|
background-color: $color-primary-element;
|
|
|
|
border: 1px solid $color-primary-text;
|
2017-02-17 18:42:07 +03:00
|
|
|
color: $color-primary-text;
|
|
|
|
}
|
|
|
|
|
2018-08-28 19:21:17 +03:00
|
|
|
@if ($invert) {
|
2019-03-27 18:41:46 +03:00
|
|
|
#body-login {
|
|
|
|
.body-login-container {
|
2020-07-24 09:59:28 +03:00
|
|
|
background-color: transparentize(nc-lighten($color-primary, 30%), 0.2);
|
|
|
|
color: $color-primary-text !important;
|
|
|
|
|
2019-03-27 18:41:46 +03:00
|
|
|
h2 {
|
2020-07-24 09:59:28 +03:00
|
|
|
color: $color-primary-text;
|
2019-03-27 18:41:46 +03:00
|
|
|
}
|
|
|
|
.icon-search.icon-white {
|
|
|
|
// CSS variable is not used here since it is on the public page layout,
|
|
|
|
// where the dark theme doesn't apply at the moment
|
|
|
|
background-image: url('../../../core/img/actions/search.svg');
|
|
|
|
}
|
|
|
|
}
|
2020-07-24 09:59:28 +03:00
|
|
|
|
|
|
|
input,
|
|
|
|
#alternative-logins li a {
|
|
|
|
border: 1px solid nc-lighten($color-primary-text, 50%);
|
|
|
|
}
|
|
|
|
input.primary,
|
|
|
|
button.primary,
|
|
|
|
#alternative-logins li a {
|
|
|
|
background-color: $color-primary;
|
|
|
|
color: $color-primary-text;
|
|
|
|
}
|
|
|
|
a,
|
|
|
|
label,
|
|
|
|
footer p,
|
|
|
|
#alternative-logins legend,
|
|
|
|
.lost-password-container #lost-password,
|
|
|
|
.warning, .update, .error {
|
|
|
|
color: $color-primary-text !important;
|
|
|
|
}
|
|
|
|
input[type='checkbox'].checkbox--white + label:before {
|
|
|
|
border-color: nc-darken($color-primary-element, 40%) !important;
|
|
|
|
}
|
|
|
|
input[type='checkbox'].checkbox--white:not(:disabled):not(:checked) + label:hover:before,
|
|
|
|
input[type='checkbox'].checkbox--white:focus + label:before {
|
|
|
|
border-color: nc-darken($color-primary-element, 30%) !important;
|
|
|
|
}
|
|
|
|
input[type='checkbox'].checkbox--white:checked + label:before {
|
|
|
|
border-color: nc-darken($color-primary-element, 30%) !important;
|
|
|
|
background-color: nc-darken($color-primary-element, 30%) !important;
|
|
|
|
@include icon-color('checkbox-mark', 'actions', $color-white, 1, true);
|
|
|
|
}
|
|
|
|
#submit-wrapper .icon-confirm-white {
|
|
|
|
background-image: url('../../../core/img/actions/confirm.svg');
|
|
|
|
}
|
|
|
|
|
|
|
|
.two-factor-provider {
|
|
|
|
&:hover, &:focus {
|
|
|
|
border-color: $color-primary-text;
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
filter: invert(1);
|
|
|
|
}
|
|
|
|
}
|
2019-03-27 18:41:46 +03:00
|
|
|
}
|
|
|
|
#body-public #header .icon-more-white {
|
|
|
|
background-image: var(--icon-more-000);
|
2017-02-17 18:42:07 +03:00
|
|
|
}
|
2016-10-12 17:45:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// plain background color for login page
|
|
|
|
@if $image-login-plain == 'true' {
|
|
|
|
#body-login, #firstrunwizard .firstrunwizard-header, #theming-preview {
|
|
|
|
background-image: none !important;
|
|
|
|
}
|
|
|
|
#body-login {
|
|
|
|
|
|
|
|
a, label, p {
|
2019-03-14 00:09:36 +03:00
|
|
|
color: $color-primary-text;
|
2016-10-12 17:45:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2017-05-16 16:53:54 +03:00
|
|
|
}
|
2017-08-11 12:04:22 +03:00
|
|
|
|
2019-03-27 18:03:31 +03:00
|
|
|
/** Handle primary buttons for bright colors */
|
|
|
|
@if (luma($color-primary) > 0.8) {
|
|
|
|
select,
|
|
|
|
button, .button,
|
|
|
|
input:not([type='range']),
|
|
|
|
textarea,
|
|
|
|
div[contenteditable=true],
|
|
|
|
.pager li a {
|
|
|
|
&.primary:not(:disabled) {
|
|
|
|
background-color: var(--color-background-dark);
|
|
|
|
color: var(--color-main-text);
|
2019-03-27 18:11:57 +03:00
|
|
|
border-color: var(--color-text-lighter);
|
2019-03-27 18:03:31 +03:00
|
|
|
|
|
|
|
&:hover, &:focus, &:active {
|
|
|
|
background-color: var(--color-background-darker);
|
|
|
|
color: var(--color-main-text);
|
2019-03-27 18:11:57 +03:00
|
|
|
border-color: var(--color-text);
|
2019-03-27 18:03:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-08-11 12:04:22 +03:00
|
|
|
@if ($color-primary == #ffffff) {
|
|
|
|
/* show grey border below header */
|
|
|
|
#body-user #header,
|
|
|
|
#body-settings #header,
|
|
|
|
#body-public #header {
|
|
|
|
border-bottom: 1px solid #ebebeb;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* show triangle in header in grey */
|
|
|
|
#appmenu li a.active:before,
|
|
|
|
.header-right #settings #expand:before {
|
|
|
|
border-bottom-color:#ebebeb;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* show border around quota bar in files app */
|
|
|
|
.app-files #quota .quota-container {
|
|
|
|
border: 1px solid #ebebeb;
|
|
|
|
}
|
|
|
|
}
|
2018-05-24 16:21:35 +03:00
|
|
|
|
|
|
|
@if ($has-legal-links == 'true') {
|
|
|
|
footer {
|
|
|
|
height: 92px;
|
|
|
|
}
|
|
|
|
}
|