Skip to content

Commit

Permalink
Sidebar menu theme styles
Browse files Browse the repository at this point in the history
Styles applied when the light gray sidebar menu style option is picked in the theme configuration.
Styles override basic options with new css file.
  • Loading branch information
jnicholCU committed Dec 11, 2024
1 parent b698d31 commit 062ebe2
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
9 changes: 8 additions & 1 deletion boulder_base.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ ucb-global:
css/bootstrap/bootstrap.min.css: {}
css/layout.css: {}
theme:
https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&family=Roboto:wght@400;500;700&display=swap: { type: external }
https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&family=Roboto:wght@400;500;700&display=swap:
{ type: external }
css/style-responsive.css: {}
css/styleguide/global.css: {}
css/styleguide/branding.css: {}
Expand Down Expand Up @@ -527,3 +528,9 @@ ucb-newsletter-list-block:
css:
theme:
css/block/ucb-newsletter-list-block.css: {}

ucb-sidebar-menu-style-gray:
version: 1.x
css:
theme:
css/menu-styles/ucb-sidebar-gray-styles.css: {weight: 50}
17 changes: 17 additions & 0 deletions css/menu-styles/ucb-sidebar-gray-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.ucb-page-content .ucb-menu {
border-width: 1px 0px 1px 1px;
border-style: solid;
border-color: var(--ucb-light-gray);
}

.ucb-page-content .ucb-menu li.menu-item a.nav-link.is-active, .ucb-page-content .ucb-menu .menu-item.active:last-child > a {
background-color: var(--ucb-light-gray);
}

.ucb-page-content .ucb-menu .expanded.active > a.nav-link, .ucb-page-content .ucb-menu .expanded.active > .ucb-menu {
border: none;
}

.ucb-page-content .ucb-menu li.menu-item {
border: none;
}
4 changes: 4 additions & 0 deletions templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
{% else %}
{{ attach_library('boulder_base/ucb-menu-style-default') }}
{% endif %}
{% set sidebar_menu_style = drupal_config('boulder_base.settings', 'ucb_sidebar_menu_style') %}
{% if sidebar_menu_style == 'light-gray' %}
{{ attach_library('boulder_base/ucb-sidebar-menu-style-gray') }}
{% endif %}
{% set header_color = 'black' %}
{% set campus_header_color = 'black' %}
{% set campus_header_text_color = 'white' %}
Expand Down

0 comments on commit 062ebe2

Please sign in to comment.