-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme-settings.php
78 lines (68 loc) · 1.91 KB
/
theme-settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* @file
* Settings for material_base theme.
*/
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_system_theme_settings_alter().
*/
function material_base_form_system_theme_settings_alter(&$form, FormStateInterface $form_state, $form_id = NULL) {
// Work-around for a core bug affecting admin themes. See issue #943212.
if (isset($form_id)) {
return;
}
$form['layout'] = [
'#type' => 'details',
'#title' => t('Layout'),
'#open' => TRUE,
];
$form['layout']['navbar_fixed'] = [
'#type' => 'checkbox',
'#title' => t('Sticky navbar'),
'#default_value' => theme_get_setting('navbar_fixed'),
];
$form['layout']['navbar_style'] = [
'#type' => 'select',
'#title' => t('Navbar style'),
'#options' => [
'standard' => t('Standard'),
'dense' => t('Dense'),
'prominent' => t('Prominent'),
],
'#default_value' => theme_get_setting('navbar_style'),
];
$form['layout']['drawer_style'] = [
'#type' => 'select',
'#title' => t('Drawer style'),
'#options' => [
'permanent' => t('Permanent'),
'dismissible' => t('Dismissible'),
'modal' => t('Modal'),
],
'#default_value' => theme_get_setting('drawer_style'),
];
$form['layout']['drawer_height'] = [
'#type' => 'select',
'#title' => t('Drawer height'),
'#options' => [
'full' => t('Full height'),
'below_navbar' => t('Below navbar'),
],
'#default_value' => theme_get_setting('drawer_height'),
];
$form['layout']['footer_style'] = [
'#type' => 'select',
'#title' => t('Footer style'),
'#options' => [
'standard' => t('Standard'),
'roomy' => t('Roomy'),
],
'#default_value' => theme_get_setting('footer_style'),
];
$form['layout']['messages_fixed'] = [
'#type' => 'checkbox',
'#title' => t('Messages in overlay'),
'#default_value' => theme_get_setting('messages_fixed'),
];
}