diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bf0911c..ba3897b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- ### Updates sidebar regions + Resolves CuBoulder/tiamat-theme#633 + + Sister PR in: [tiamat10-profile](https://github.com/CuBoulder/tiamat10-profile/pull/77), ~~[ucb_site_configuration](https://github.com/CuBoulder/ucb_site_configuration/pull/45)~~ +--- + - ### Class Note Enhancements Adjusts permissions for Class Notes, adds optional image field. Resolves https://github.com/CuBoulder/tiamat-theme/issues/622 diff --git a/boulder_base.info.yml b/boulder_base.info.yml index dc0f7b89..317c2cf9 100644 --- a/boulder_base.info.yml +++ b/boulder_base.info.yml @@ -17,9 +17,8 @@ regions: breadcrumb: "Breadcrumb Navigation" post_wide_title: "Post Wide Title" above_content: "Above Content" - left_sidebar: "Sidebar First" content: "Content" - right_sidebar: "Sidebar Second" + sidebar: "Sidebar" wide_post: "Wide Post" below_content: "After Content" second_below_content: "After Content 2" @@ -27,4 +26,3 @@ regions: footer: "Footer" site_information: 'Site Information' footer_menu: 'Footer Menu' - diff --git a/boulder_base.theme b/boulder_base.theme index 1776f56c..2d3258f2 100755 --- a/boulder_base.theme +++ b/boulder_base.theme @@ -84,6 +84,7 @@ function boulder_base_preprocess_page(array &$variables) { $variables['ucb_header_color'] = $headerColor = theme_get_setting('ucb_header_color'); $variables['ucb_be_boulder'] = theme_get_setting('ucb_be_boulder'); $variables['ucb_social_share_position'] = theme_get_setting('ucb_social_share_position'); + $variables['ucb_sidebar_position'] = theme_get_setting('ucb_sidebar_position'); $variables['ucb_rave_alerts'] = theme_get_setting('ucb_rave_alerts'); $variables['ucb_sticky_menu'] = theme_get_setting('ucb_sticky_menu'); $variables['ucb_heading_font'] = theme_get_setting('ucb_heading_font'); diff --git a/config/install/boulder_base.settings.yml b/config/install/boulder_base.settings.yml index f15d8ec6..28eb6013 100644 --- a/config/install/boulder_base.settings.yml +++ b/config/install/boulder_base.settings.yml @@ -11,7 +11,7 @@ favicon: mimetype: image/png ucb_campus_header_color: '1' ucb_header_color: '3' -ucb_sidebar_position: '0' +ucb_sidebar_position: right ucb_be_boulder: '1' ucb_rave_alerts: 1 ucb_sticky_menu: 0 diff --git a/templates/layout/page.html.twig b/templates/layout/page.html.twig index 44f94a01..ff8d6908 100644 --- a/templates/layout/page.html.twig +++ b/templates/layout/page.html.twig @@ -177,40 +177,26 @@ {% endif %} {# We are checking for length below to make sure that the sidebars have any content. This is so that sidebar menus don't render the sidebars if the menu is empty #} - {% if (page.left_sidebar|render|striptags|trim|length > 0) or (page.right_sidebar|render|striptags|trim|length > 0) %} - {% if page.left_sidebar|render and page.right_sidebar|render %} + {% if page.sidebar|render|striptags|trim|length > 0 %} + {% if ucb_sidebar_position == 'left' %}
- {{ page.left_sidebar }} -
-
- {{ page.content }} -
-
- {{ page.right_sidebar }} -
-
-
- {% elseif page.left_sidebar|render %} -
-
-
- {{ page.left_sidebar }} + {{ page.sidebar }}
{{ page.content }}
- {% elseif page.right_sidebar|render %} + {% else %}
{{ page.content }}
- {{ page.right_sidebar }} + {{ page.sidebar }}