Only use background fade if nextcloud blue is set

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-06-03 09:17:15 +02:00 committed by backportbot[bot]
parent b876658d70
commit 69de44ecab
1 changed files with 24 additions and 31 deletions

View File

@ -8,20 +8,28 @@
} }
@mixin faded-background { @mixin faded-background {
background-color: $color-primary;
@if ($color-primary == #0082C9) {
background-image: linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%); 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;
}
} }
@mixin faded-background-image { @mixin faded-background-image {
@if ($color-primary == #0082C9) or ($has-custom-background == true) { @include faded-background;
background-size: contain;
@if ($color-primary == #0082C9) {
background-image: $image-login-background, linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%); background-image: $image-login-background, linear-gradient(40deg, $color-primary 0%, lighten($color-primary, 20%) 100%);
}
@if($has-custom-background == true) { @if($has-custom-background == true) {
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
} background-image: $image-login-background;
} @else {
@include faded-background;
background-size: contain;
} }
} }
@ -138,6 +146,12 @@ $invert: luma($color-primary) > 0.6;
@include faded-background; @include faded-background;
} }
#body-login,
#firstrunwizard .firstrunwizard-header,
#theming-preview {
@include faded-background-image;
}
/* override styles for login screen in guest.css */ /* override styles for login screen in guest.css */
@if ($has-custom-logo) { @if ($has-custom-logo) {
// custom logo // custom logo
@ -159,22 +173,6 @@ $invert: luma($color-primary) > 0.6;
} }
} }
@if variable_exists('theming-background-mime') and $theming-background-mime != '' {
#body-login,
#firstrunwizard .firstrunwizard-header,
#theming-preview {
background-image: $image-login-background;
background-color: $color-primary;
@include faded-background-image;
}
} @else {
#theming-preview {
background-image: $image-login-background;
background-color: $color-primary;
@include faded-background-image;
}
}
@if variable_exists('theming-logoheader-mime') and $theming-logoheader-mime != '' { @if variable_exists('theming-logoheader-mime') and $theming-logoheader-mime != '' {
#theming .advanced-option-logoheader .image-preview, #theming .advanced-option-logoheader .image-preview,
body:not(#body-login) #header .logo { body:not(#body-login) #header .logo {
@ -231,7 +229,6 @@ input.primary,
@if $image-login-plain == 'true' { @if $image-login-plain == 'true' {
#body-login, #firstrunwizard .firstrunwizard-header, #theming-preview { #body-login, #firstrunwizard .firstrunwizard-header, #theming-preview {
background-image: none !important; background-image: none !important;
background-color: $color-primary;
} }
#body-login { #body-login {
@ -240,10 +237,6 @@ input.primary,
} }
} }
} @else {
#body-login {
@include faded-background-image;
}
} }
/** Handle primary buttons for bright colors */ /** Handle primary buttons for bright colors */