From 4386e0bf99d34b9da1eb50520bb8957af4d2cc6b Mon Sep 17 00:00:00 2001 From: hatuhay <alberto@siles.pe> Date: Mon, 12 Feb 2018 07:55:07 -0500 Subject: [PATCH] Several updates to match stable Bootstrap 4 release. --- bootstrap_barrio.theme | 128 ++++++++---------- config/install/bootstrap_barrio.settings.yml | 8 +- css/components/alerts.css | 10 +- templates/block/block--breadcrumb.html.twig | 2 +- templates/block/block.html.twig | 2 + templates/layout/page.html.twig | 12 +- templates/layout/region.html.twig | 1 + templates/misc/status-messages.html.twig | 1 + templates/navigation/breadcrumb.html.twig | 2 +- templates/navigation/menu--account.html.twig | 32 ++--- templates/navigation/menu--main.html.twig | 3 +- templates/navigation/pager.html.twig | 24 ++-- .../navigation/views-mini-pager.html.twig | 43 ++++++ templates/views/views-view.html.twig | 2 +- theme-settings.php | 40 ++++-- 15 files changed, 169 insertions(+), 141 deletions(-) create mode 100644 templates/navigation/views-mini-pager.html.twig diff --git a/bootstrap_barrio.theme b/bootstrap_barrio.theme index a19c85a..55bd148 100644 --- a/bootstrap_barrio.theme +++ b/bootstrap_barrio.theme @@ -66,6 +66,18 @@ function bootstrap_barrio_preprocess_html(&$variables) { } +function bootstrap_barrio_page_attachments_alter(&$page) { + $viewport = array( + '#type' => 'html_tag', + '#tag' => 'meta', + '#attributes' => array( + 'name' => 'viewport', + 'content' => 'width=device-width, initial-scale=1, shrink-to-fit=no', + ), + ); + $page['#attached']['html_head'][] = [$viewport, 'viewport']; +} + /** * Implements hook_preprocess_HOOK() for page templates. */ @@ -100,8 +112,9 @@ function bootstrap_barrio_preprocess_page(&$variables) { $variables['#attached']['library'][] = 'bootstrap_barrio/' . $system_messages; } - $width = _bootstrap_barrio_content_width(!empty($variables['page']['sidebar_first']), !empty($variables['page']['sidebar_second'])); - $content_width = 'col-md-' . $width; +// $width = _bootstrap_barrio_content_width(!empty($variables['page']['sidebar_first']), !empty($variables['page']['sidebar_second'])); +// $content_width = 'col-md-' . $width; + $content_width = 'col'; $sidebar_first_width = 'col-md-' . theme_get_setting('bootstrap_barrio_sidebar_first_width'); $sidebar_second_width = 'col-md-' . theme_get_setting('bootstrap_barrio_sidebar_second_width'); @@ -115,28 +128,27 @@ function bootstrap_barrio_preprocess_page(&$variables) { $variables['navbar_attributes'] = array( 'class' => array ( 'navbar', - theme_get_setting('bootstrap_barrio_navbar_toggle'), ), 'id' => array ( 'navbar-main' ), ); $variables['content_attributes'] = array( 'class' => array ( 'main-content', - $content_width ), + $content_width ), 'id' => array ( 'content' ), 'role' => array ( 'main' ), ); $variables['sidebar_first_attributes'] = array( 'class' => array ( 'sidebar', - $sidebar_first_width + $sidebar_first_width ), 'id' => array ( 'sidebar_first' ), ); $variables['sidebar_second_attributes'] = array( 'class' => array ( 'sidebar', - $sidebar_second_width ), + $sidebar_second_width ), 'id' => array ( 'sidebar_second' ), ); @@ -146,19 +158,19 @@ function bootstrap_barrio_preprocess_page(&$variables) { $affix_sidebar_first = theme_get_setting('bootstrap_barrio_sidebar_first_affix'); $affix_sidebar_second = theme_get_setting('bootstrap_barrio_sidebar_second_affix'); if ($affix_navbar_top || $affix_navbar || $affix_sidebar_first || $affix_sidebar_second) { - $variables['#attached']['library'][] = 'bootstrap_barrio/affix'; - if ($affix_navbar_top) { + $variables['#attached']['library'][] = 'bootstrap_barrio/affix'; + if ($affix_navbar_top) { $variables['navbar_top_attributes']['data-toggle'] = 'affix'; - } - if ($affix_navbar) { + } + if ($affix_navbar) { $variables['navbar_attributes']['data-toggle'] = 'affix'; - } - if ($affix_sidebar_first) { + } + if ($affix_sidebar_first) { $variables['sidebar_first_attributes']['data-toggle'] = 'affix'; - } - if ($affix_sidebar_second) { + } + if ($affix_sidebar_second) { $variables['sidebar_second_attributes']['data-toggle'] = 'affix'; - } + } } // Calculate widths @@ -175,82 +187,48 @@ function bootstrap_barrio_preprocess_page(&$variables) { // Define column layout classes switch (theme_get_setting('bootstrap_barrio_sidebar_position')) { case 'left': - $variables['content_attributes']['class'][] = 'float-right'; + $variables['sidebar_first_attributes']['class'][] = 'order-first'; + $variables['content_attributes']['class'][] = 'order-last'; break; case 'both': - if (!empty($variables['page']['sidebar_first'])) { - $variables['content_attributes']['class'][] = 'push-md-' . ( theme_get_setting('bootstrap_barrio_sidebar_first_width') + theme_get_setting('bootstrap_barrio_sidebar_first_offset') ); - } - $variables['sidebar_first_attributes']['class'][] = 'pull-md-' . ( $width + theme_get_setting('bootstrap_barrio_content_offset') ); + $variables['sidebar_first_attributes']['class'][] = 'order-first'; + $variables['sidebar_second_attributes']['class'][] = 'order-last'; break; case 'right': + $variables['sidebar_second_attributes']['class'][] = 'order-first'; + $variables['content_attributes']['class'][] = 'order-last'; break; } // Define navigation position - switch (theme_get_setting('bootstrap_barrio_navbar_top_position')) { - case 'fixed-top': - $variables['navbar_top_attributes']['class'][] = 'navbar-fixed-top'; - break; - case 'fixed-bottom': - $variables['navbar_top_attributes']['class'][] = 'navbar-fixed-bottom'; - break; - } - switch (theme_get_setting('bootstrap_barrio_navbar_position')) { - case 'fixed-top': - $variables['navbar_attributes']['class'][] = 'navbar-fixed-top'; - break; - case 'fixed-bottom': - $variables['navbar_attributes']['class'][] = 'navbar-fixed-bottom'; - break; - } + $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_barrio_navbar_top_position'); + $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_barrio_navbar_position'); // Define navigation color scheme - switch (theme_get_setting('bootstrap_barrio_navbar_top_color')) { - case 'light': - $variables['navbar_top_attributes']['class'][] = 'navbar-light'; - break; - case 'dark': - $variables['navbar_top_attributes']['class'][] = 'navbar-inverse'; - break; - default: - $variables['navbar_top_attributes']['class'][] = 'navbar-default'; - break; - } - switch (theme_get_setting('bootstrap_barrio_navbar_color')) { - case 'light': - $variables['navbar_attributes']['class'][] = 'navbar-light'; - break; - case 'inverse': - $variables['navbar_attributes']['class'][] = 'navbar-inverse'; - break; - default: - $variables['navbar_attributes']['class'][] = 'navbar-default'; - break; - } + $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_barrio_navbar_top_color'); + $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_barrio_navbar_color'); // Define navigation background classes - switch (theme_get_setting('bootstrap_barrio_navbar_top_background')) { - case 'primary': - $variables['navbar_top_attributes']['class'][] = 'bg-primary'; - break; - case 'faded': - $variables['navbar_top_attributes']['class'][] = 'bg-faded'; - break; - case 'inverse': - $variables['navbar_top_attributes']['class'][] = 'bg-inverse'; + $variables['navbar_top_attributes']['class'][] = theme_get_setting('bootstrap_barrio_navbar_top_background'); + $variables['navbar_attributes']['class'][] = theme_get_setting('bootstrap_barrio_navbar_background'); + + // Define navigation toggle size + switch (theme_get_setting('bootstrap_barrio_navbar_toggle')) { + case 'navbar-toggleable-lg': + $variables['navbar_attributes']['class'][] = 'navbar-expand-lg'; break; - } - switch (theme_get_setting('bootstrap_barrio_navbar_background')) { - case 'primary': - $variables['navbar_attributes']['class'][] = 'bg-primary'; + case 'navbar-toggleable-md': + $variables['navbar_attributes']['class'][] = 'navbar-expand-md'; break; - case 'faded': - $variables['navbar_attributes']['class'][] = 'bg-faded'; + case 'navbar-toggleable-sm': + $variables['navbar_attributes']['class'][] = 'navbar-expand-sm'; break; - case 'inverse': - $variables['navbar_attributes']['class'][] = 'bg-inverse'; + case 'navbar-toggleable-xs': + $variables['navbar_attributes']['class'][] = 'navbar-expand-xs'; break; + default: + $variables['navbar_attributes']['class'][] = 'navbar-expand-md'; + break; } if (theme_get_setting('bootstrap_barrio_sidebar_collapse')) { diff --git a/config/install/bootstrap_barrio.settings.yml b/config/install/bootstrap_barrio.settings.yml index 668810b..02bf00f 100644 --- a/config/install/bootstrap_barrio.settings.yml +++ b/config/install/bootstrap_barrio.settings.yml @@ -24,8 +24,8 @@ bootstrap_barrio_button_outline: 0 bootstrap_barrio_navbar_toggle: 1 bootstrap_barrio_navbar_container: 'navbar-toggleable-md' bootstrap_barrio_navbar_top_position: '' -bootstrap_barrio_navbar_top_color: 0 -bootstrap_barrio_navbar_top_background: 'faded' +bootstrap_barrio_navbar_top_color: 'navbar-light' +bootstrap_barrio_navbar_top_background: 'bg-dark' bootstrap_barrio_navbar_position: '' -bootstrap_barrio_navbar_color: 'dark' -bootstrap_barrio_navbar_background: 'inverse' +bootstrap_barrio_navbar_color: 'navbar-dark' +bootstrap_barrio_navbar_background: 'bg-primary' diff --git a/css/components/alerts.css b/css/components/alerts.css index 9533af8..ede6908 100644 --- a/css/components/alerts.css +++ b/css/components/alerts.css @@ -4,7 +4,9 @@ */ .alert { - position: fixed; - bottom: 0; - max-width: 50%; -} + position: fixed; + bottom: 0; + left: 0; + max-width: 100%; + z-index: 9999; +} \ No newline at end of file diff --git a/templates/block/block--breadcrumb.html.twig b/templates/block/block--breadcrumb.html.twig index c385987..6b650d1 100644 --- a/templates/block/block--breadcrumb.html.twig +++ b/templates/block/block--breadcrumb.html.twig @@ -10,7 +10,7 @@ {% set show_anchor = "show-" ~ attributes.id|clean_id %} {% set hide_anchor = "hide-" ~ attributes.id|clean_id %} {% block content %} - <div{{ content_attributes.addClass('content') }}> + <div{{ content_attributes.addClass('content col-12') }}> {# When rendering a menu without label, render a menu toggle. #} <div class="menu-toggle-target menu-toggle-target-show" id="{{ show_anchor }}"></div> <div class="menu-toggle-target" id="{{ hide_anchor }}"></div> diff --git a/templates/block/block.html.twig b/templates/block/block.html.twig index 9d8be22..59356be 100644 --- a/templates/block/block.html.twig +++ b/templates/block/block.html.twig @@ -34,6 +34,8 @@ 'block', 'block-' ~ configuration.provider|clean_class, 'block-' ~ plugin_id|clean_class, + plugin_id == 'system_main_block' ? 'col-12', + plugin_id == 'page_title_block' ? 'col-12', ] %} <div{{ attributes.addClass(classes) }}> diff --git a/templates/layout/page.html.twig b/templates/layout/page.html.twig index 335280e..b8ca8cd 100644 --- a/templates/layout/page.html.twig +++ b/templates/layout/page.html.twig @@ -76,10 +76,8 @@ {% if container_navbar %} <div class="container"> {% endif %} - <div class="navbar-nav"> - {{ page.secondary_menu }} - {{ page.top_header }} - </div> + {{ page.secondary_menu }} + {{ page.top_header }} {% if page.top_header_form %} <div class="form-inline navbar-form float-right"> {{ page.top_header_form }} @@ -136,8 +134,12 @@ <div id="main-wrapper" class="layout-main-wrapper clearfix"> {% block content %} <div id="main" class="{{ container }}"> + {% if page.breadcrumb %} + <div class="row"> + {{ page.breadcrumb }} + </div> + {% endif %} <div class="row row-offcanvas row-offcanvas-left clearfix"> - {{ page.breadcrumb }} <main{{ content_attributes }}> <section class="section"> <a id="main-content" tabindex="-1"></a> diff --git a/templates/layout/region.html.twig b/templates/layout/region.html.twig index cff654a..d4c26b5 100644 --- a/templates/layout/region.html.twig +++ b/templates/layout/region.html.twig @@ -15,6 +15,7 @@ {% set classes = [ 'region', + 'row', 'region-' ~ region|clean_class, ] %} diff --git a/templates/misc/status-messages.html.twig b/templates/misc/status-messages.html.twig index 61f006c..405a822 100644 --- a/templates/misc/status-messages.html.twig +++ b/templates/misc/status-messages.html.twig @@ -30,6 +30,7 @@ set classes = [ 'alert', 'alert-dismissible', + 'col-12', type == 'status' ? 'alert-success', type == 'warning' ? 'alert-warning', type == 'error' ? 'alert-danger', diff --git a/templates/navigation/breadcrumb.html.twig b/templates/navigation/breadcrumb.html.twig index 8c08db7..47a2980 100644 --- a/templates/navigation/breadcrumb.html.twig +++ b/templates/navigation/breadcrumb.html.twig @@ -10,7 +10,7 @@ {{ attach_library('bootstrap_barrio/breadcrumb') }} {% if breadcrumb %} - <nav role="navigation" aria-labelledby="system-breadcrumb"> + <nav role="navigation" aria-label="breadcrumb"> <h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2> <ol class="breadcrumb"> {% for item in breadcrumb %} diff --git a/templates/navigation/menu--account.html.twig b/templates/navigation/menu--account.html.twig index 260223f..3633708 100644 --- a/templates/navigation/menu--account.html.twig +++ b/templates/navigation/menu--account.html.twig @@ -31,28 +31,16 @@ {% if items %} {% if menu_level == 0 %} <ul{{ attributes.addClass('nav') }}> - {% else %} - <ul class="dropdown-menu"> + {% for item in items %} + {% + set classes = [ + 'nav-link', + item.in_active_trail ? 'active', + ] + %} + {{ link(item.title, item.url, {'class': classes}) }} + {% endfor %} + </ul> {% endif %} - {% for item in items %} - {% - set classes = [ - menu_level ? 'dropdown-item' : 'nav-item', - item.is_expanded ? 'menu-item--expanded', - item.is_collapsed ? 'menu-item--collapsed', - item.in_active_trail ? 'active', - item.below ? 'dropdown', - ] - %} - <li{{ item.attributes.addClass(classes) }}> - {% if item.below %} - {{ link(item.title, item.url, {'class': 'nav-link', 'data-target': '#', 'data-toggle': 'dropdown', 'aria-expanded': 'false'}) }} - {{ menus.menu_links(item.below, attributes, menu_level + 1) }} - {% else %} - {{ link(item.title, item.url, {'class': 'nav-link'}) }} - {% endif %} - </li> - {% endfor %} - </ul> {% endif %} {% endmacro %} diff --git a/templates/navigation/menu--main.html.twig b/templates/navigation/menu--main.html.twig index 58919dc..117f9d0 100644 --- a/templates/navigation/menu--main.html.twig +++ b/templates/navigation/menu--main.html.twig @@ -49,10 +49,11 @@ set link_classes = [ not menu_level ? 'nav-link', item.in_active_trail ? 'active', + item.below ? 'dropdown-toggle', ] %} {% if item.below %} - {{ link(item.title, item.url, {'class': link_classes, 'data-target': '#', 'data-toggle': 'dropdown', 'aria-expanded': 'false'}) }} + {{ link(item.title, item.url, {'class': link_classes, 'data-toggle': 'dropdown', 'aria-expanded': 'false', 'aria-haspopup': 'true' }) }} {{ menus.menu_links(item.below, attributes, menu_level + 1) }} {% else %} {{ link(item.title, item.url, {'class': link_classes}) }} diff --git a/templates/navigation/pager.html.twig b/templates/navigation/pager.html.twig index 0b738e7..5dd6e8d 100644 --- a/templates/navigation/pager.html.twig +++ b/templates/navigation/pager.html.twig @@ -30,13 +30,13 @@ */ #} {% if items %} - <nav role="navigation" aria-labelledby="pagination-heading"> + <nav aria-label="Page navigation"> <h4 id="pagination-heading" class="visually-hidden">{{ 'Pagination'|t }}</h4> <ul class="pagination"> {# Print first item if we are not on the first page. #} {% if items.first %} - <li class="pager__item--first"> - <a href="{{ items.first.href }}" title="{{ 'Go to first page'|t }}"{{ items.first.attributes|without('href', 'title') }}> + <li class="page-item"> + <a href="{{ items.first.href }}" title="{{ 'Go to first page'|t }}"{{ items.first.attributes|without('href', 'title') }} class="page-link"> <span aria-hidden="true">«</span> <span class="sr-only">{{ items.first.text|default('First'|t) }}</span> </a> @@ -44,8 +44,8 @@ {% endif %} {# Print previous item if we are not on the first page. #} {% if items.previous %} - <li class="pager__item--previous"> - <a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}> + <li class="page-item"> + <a href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }} class="page-link"> <span aria-hidden="true">‹</span> <span class="sr-only">{{ items.previous.text|default('Previous'|t) }}</span> </a> @@ -53,17 +53,17 @@ {% endif %} {# Add an ellipsis if there are further previous pages. #} {% if ellipses.previous %} - <li class="pager__item pager__item--ellipsis" role="presentation">…</li> + <li class="page-item" role="presentation">…</li> {% endif %} {# Now generate the actual pager piece. #} {% for key, item in items.pages %} - <li class="{{ current == key ? 'active' : '' }}"> + <li class="page-item {{ current == key ? 'active' : '' }}"> {% if current == key %} {% set title = 'Current page'|t %} {% else %} {% set title = 'Go to page @key'|t({'@key': key}) %} {% endif %} - <a href="{{ item.href }}" title="{{ title }}"{{ item.attributes|without('href', 'title') }}> + <a href="{{ item.href }}" title="{{ title }}"{{ item.attributes|without('href', 'title') }} class="page-link"> <span class="visually-hidden"> {{ current == key ? 'Current page'|t : 'Page'|t }} </span> @@ -73,12 +73,12 @@ {% endfor %} {# Add an ellipsis if there are further next pages. #} {% if ellipses.next %} - <li class="pager__item pager__item--ellipsis" role="presentation">…</li> + <li class="page-item" role="presentation">…</li> {% endif %} {# Print next item if we are not on the last page. #} {% if items.next %} <li class="pager__item--next"> - <a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}> + <a href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }} class="page-link"> <span aria-hidden="true">›</span> <span class="sr-only">{{ items.next.text|default('Next'|t) }}</span> </a> @@ -86,8 +86,8 @@ {% endif %} {# Print last item if we are not on the last page. #} {% if items.last %} - <li class="pager__item--last"> - <a href="{{ items.last.href }}" title="{{ 'Go to last page'|t }}"{{ items.last.attributes|without('href', 'title') }}> + <li class="page-item"> + <a href="{{ items.last.href }}" title="{{ 'Go to last page'|t }}"{{ items.last.attributes|without('href', 'title') }} class="page-link"> <span aria-hidden="true">»</span> <span class="sr-only">{{ items.last.text|default('Last'|t) }}</span> </a> diff --git a/templates/navigation/views-mini-pager.html.twig b/templates/navigation/views-mini-pager.html.twig new file mode 100644 index 0000000..f6caeb1 --- /dev/null +++ b/templates/navigation/views-mini-pager.html.twig @@ -0,0 +1,43 @@ + {# + /** + * @file + * Default theme implementation for a views mini-pager. + * + * Available variables: + * - items: List of pager items. + * + * @see template_preprocess_views_mini_pager() + * + * @ingroup themeable + */ + #} + {% if items.previous or items.next %} + <nav aria-label="Page navigation"> + <h4 class="visually-hidden">{{ 'Pagination'|t }}</h4> + <ul class="js-pager__items pagination"> + {% if items.previous %} + <li class="page-item"> + <a class="page-link" href="{{ items.previous.href }}" title="{{ 'Go to previous page'|t }}" rel="prev"{{ items.previous.attributes|without('href', 'title', 'rel') }}> + <span class="visually-hidden">{{ 'Previous page'|t }}</span> + <span aria-hidden="true">{{ items.previous.text|default('‹‹'|t) }}</span> + </a> + </li> + {% endif %} + {% if items.current %} + <li class="page-item"> + {% trans %} + Page {{ items.current }} + {% endtrans %} + </li> + {% endif %} + {% if items.next %} + <li class="page-item"> + <a class="page-link" href="{{ items.next.href }}" title="{{ 'Go to next page'|t }}" rel="next"{{ items.next.attributes|without('href', 'title', 'rel') }}> + <span class="visually-hidden">{{ 'Next page'|t }}</span> + <span aria-hidden="true">{{ items.next.text|default('››'|t) }}</span> + </a> + </li> + {% endif %} + </ul> + </nav> + {% endif %} diff --git a/templates/views/views-view.html.twig b/templates/views/views-view.html.twig index f0ed63c..523ebd1 100644 --- a/templates/views/views-view.html.twig +++ b/templates/views/views-view.html.twig @@ -62,7 +62,7 @@ {% endif %} {% if rows %} - <div class="view-content"> + <div class="view-content row"> {{ rows }} </div> {% elseif empty %} diff --git a/theme-settings.php b/theme-settings.php index 19bf79a..5900052 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -204,21 +204,29 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#collapsible' => TRUE, '#collapsed' => TRUE, ); + $form['components']['navbar']['bootstrap_barrio_navbar_container'] = array( + '#type' => 'checkbox', + '#title' => t('Navbar Width Container'), + '#description' => t('Check if Navbar width will be inside container or fluid width.'), + '#default_value' => theme_get_setting('bootstrap_barrio_navbar_container'), + ); $form['components']['navbar']['bootstrap_barrio_navbar_toggle'] = array( '#type' => 'select', - '#title' => t('Navbar top toggle size'), + '#title' => t('Navbar toggle size'), '#description' => t('Select size for navbar to collapse.'), '#default_value' => theme_get_setting('bootstrap_barrio_navbar_toggle'), '#options' => array( + 'navbar-toggleable-lg' => t('Large'), 'navbar-toggleable-md' => t('Medium'), 'navbar-toggleable-sm' => t('Small'), + 'navbar-toggleable-xs' => t('Extra Small'), ), ); - $form['components']['navbar']['bootstrap_barrio_navbar_container'] = array( + $form['components']['navbar']['bootstrap_barrio_navbar_top_navbar'] = array( '#type' => 'checkbox', - '#title' => t('Navbar Width Container'), - '#description' => t('Check if Navbar width will be inside container or fluid width.'), - '#default_value' => theme_get_setting('bootstrap_barrio_navbar_container'), + '#title' => t('Navbar Top is Navbar'), + '#description' => t('Check if Navbar Top .navbar class should be added.'), + '#default_value' => theme_get_setting('bootstrap_barrio_navbar_top_navbar'), ); $form['components']['navbar']['bootstrap_barrio_navbar_top_position'] = array( '#type' => 'select', @@ -228,6 +236,7 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#options' => array( 'fixed-top' => t('Fixed Top'), 'fixed-bottom' => t('Fixed Bottom'), + 'sticky-top' => t('Sticky Top'), ), '#empty_option' => t('Normal'), ); @@ -237,8 +246,8 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#description' => t('Select a color for links in navbar top.'), '#default_value' => theme_get_setting('bootstrap_barrio_navbar_top_color'), '#options' => array( - 'light' => t('Light'), - 'inverse' => t('Inverse'), + 'navbar-light' => t('Light'), + 'navbar-dark' => t('Dark'), ), '#empty_option' => t('Default'), ); @@ -248,9 +257,9 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#description' => t('Select a color for background in navbar top.'), '#default_value' => theme_get_setting('bootstrap_barrio_navbar_top_background'), '#options' => array( - 'primary' => t('Primary'), - 'faded' => t('Faded'), - 'inverse' => t('Inverse'), + 'bg-primary' => t('Primary'), + 'bg-light' => t('Light'), + 'bg-dark' => t('Dark'), ), '#empty_option' => t('Default'), ); @@ -262,6 +271,7 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#options' => array( 'fixed-top' => t('Fixed Top'), 'fixed-bottom' => t('Fixed Bottom'), + 'sticky-top' => t('Sticky Top'), ), '#empty_option' => t('Normal'), ); @@ -271,8 +281,8 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#description' => t('Select a color for links in navbar style.'), '#default_value' => theme_get_setting('bootstrap_barrio_navbar_color'), '#options' => array( - 'light' => t('Light'), - 'inverse' => t('Inverse'), + 'navbar-light' => t('Light'), + 'navbar-dark' => t('Dark'), ), '#empty_option' => t('Default'), ); @@ -282,9 +292,9 @@ function bootstrap_barrio_form_system_theme_settings_alter(&$form, FormStateInte '#description' => t('Select a color for background in navbar.'), '#default_value' => theme_get_setting('bootstrap_barrio_navbar_background'), '#options' => array( - 'primary' => t('Primary'), - 'faded' => t('Faded'), - 'inverse' => t('Inverse'), + 'bg-primary' => t('Primary'), + 'bg-light' => t('Light'), + 'bg-dark' => t('Dark'), ), '#empty_option' => t('Default'), ); -- GitLab