Commit 750d0f2f authored by Robert Ragas's avatar Robert Ragas Committed by Jochem van Nieuwenhuijsen
Browse files

SHN-310 by robertragas: add range slider to social blue to control th… (#1282)

* SHN-310 by robertragas: add range slider to social blue to control the opacity of the gradient

* SHN-310 by jochemvn: Refactoring

* SHN-310 by jochemvn: Coding standards

* SHN-310 by jochemvn: Setting should be an integer

* SHN-310 by jochemvn: Cast value as an integer
parent 1086a7e1
font_primary: 'Montserrat'
card_radius: '10'
hero_gradient_opacity: 70
form_control_radius: '5'
button_radius: '10'
color_primary: '#29abe2'
......
......@@ -102,6 +102,24 @@ function socialblue_form_system_theme_settings_alter(&$form, FormStateInterface
// Ensure we save the file permanently.
$form['#submit'][] = 'socialblue_save_email_logo';
$form['os_hero_settings'] = [
'#type' => 'details',
'#group' => 'open_social_settings',
'#title' => t('Hero'),
'#weight' => 30,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
];
$form['os_hero_settings']['hero_gradient_opacity'] = [
'#type' => 'range',
'#title' => t('Hero gradient'),
'#default_value' => $config->get('hero_gradient_opacity'),
'#description' => t('Define the percentage of darkness of the hero gradient from 0 to 100.'),
'#min' => 0,
'#max' => 100,
];
// Font tab.
$fonts = [];
if (\Drupal::service('module_handler')->moduleExists('social_font')) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment