Add Option for Radial Gradient (#5140)
Adds ability to set the background to be a centered circular radial gradient If the following is set: theme > background_radial_gradient > text Then the radial gradient will be enabled. If not set, it will use linear gradient to preserve previous behavior.
This commit is contained in:
parent
c2e8f7cfd1
commit
9f2ef85f95
|
|
@ -151,6 +151,11 @@ $default_login = ($_REQUEST['login'] == 'default') ? true : false;
|
|||
else if ($background_colors[0] == '' && $background_colors[1] != '') { // use color 2
|
||||
$background_color = "background: ".$background_colors[1].";";
|
||||
}
|
||||
else if ($background_colors[0] != '' && $background_colors[1] != '' && isset($_SESSION['theme']['background_radial_gradient']['text'])) { // radial gradient
|
||||
$background_color = "background: ".$background_colors[0].";\n";
|
||||
$background_color .= "background: -ms-radial-gradient(center, circle, ".$background_colors[0]." 0%, ".$background_colors[1]." 100%);\n";
|
||||
$background_color .= "background: radial-gradient(circle at center, ".$background_colors[0]." 0%, ".$background_colors[1]." 100%);\n";
|
||||
}
|
||||
else if ($background_colors[0] != '' && $background_colors[1] != '') { // vertical gradient
|
||||
$background_color = "background: ".$background_colors[0].";\n";
|
||||
$background_color .= "background: -ms-linear-gradient(top, ".$background_colors[0]." 0%, ".$background_colors[1]." 100%);\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue