-
Notifications
You must be signed in to change notification settings - Fork 1
/
archipelago_subtheme_barnard.theme
47 lines (42 loc) · 1.37 KB
/
archipelago_subtheme_barnard.theme
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
<?php
/**
* @file
* Functions to support theming in the SASS Starterkit subtheme.
*/
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_system_theme_settings_alter() for settings form.
*
* Replace Barrio setting options with subtheme ones.
*/
function archipelago_subtheme_barnard_form_system_theme_settings_alter(&$form, FormStateInterface $form_state) {
$form['components']['navbar']['bootstrap_barrio_navbar_top_background']['#options'] = array(
'bg-primary' => t('Primary'),
'bg-secondary' => t('Secondary'),
'bg-tertiary' => t('Tertiary'),
'bg-quaternary' => t('Quaternary'),
'bg-light' => t('Light'),
'bg-dark' => t('Dark'),
'bg-white' => t('White'),
'bg-transparent' => t('Transparent'),
);
$form['components']['navbar']['bootstrap_barrio_navbar_background']['#options'] = array(
'bg-primary' => t('Primary'),
'bg-secondary' => t('Secondary'),
'bg-tertiary' => t('Tertiary'),
'bg-quaternary' => t('Quaternary'),
'bg-light' => t('Light'),
'bg-dark' => t('Dark'),
'bg-white' => t('White'),
'bg-transparent' => t('Transparent'),
);
}
/**
* Prepares variables for `breadcrumb.html.twig`.
*/
function archipelago_subtheme_barnard_preprocess_breadcrumb(&$variables){
// Remove 'Home' from breadcrumb trail.
if (count($variables['breadcrumb'])) {
array_shift($variables['breadcrumb']);
}
}