diff --git a/bulma.theme b/bulma.theme index 936f1e1..3344c51 100644 --- a/bulma.theme +++ b/bulma.theme @@ -169,6 +169,13 @@ function bulma_preprocess_block(&$variables) { } } + // Customize the ID and classes of the main menu block. + $main_menu = Bulma::singleSetting('bulma_general_menu'); + if (!empty($variables['elements']['#id']) && $variables['elements']['#id'] === 'bulma_' . $main_menu . '_menu') { + $variables['attributes']['id'] = 'nav-menu'; + $variables['attributes']['class'][] = 'nav-menu'; + $variables['attributes']['class'][] = 'nav-right'; + } } /** diff --git a/templates/system/page.html.twig b/templates/system/page.html.twig index b041f68..db4abbf 100644 --- a/templates/system/page.html.twig +++ b/templates/system/page.html.twig @@ -45,12 +45,13 @@ * @ingroup themeable */ #} -