Skip to content

Commit

Permalink
Merge pull request #650 from CuBoulder/issue/633
Browse files Browse the repository at this point in the history
Updates sidebar regions
  • Loading branch information
patrickbrown-io authored and web-flow committed Feb 6, 2024
2 parents 923cd4b + 001d79f commit f1d01c0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 23 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 1 addition & 3 deletions boulder_base.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ 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"
social: "Social Media Menu"
footer: "Footer"
site_information: 'Site Information'
footer_menu: 'Footer Menu'

1 change: 1 addition & 0 deletions boulder_base.theme
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion config/install/boulder_base.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 5 additions & 19 deletions templates/layout/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -177,40 +177,26 @@
</div>
{% 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' %}
<div class="ucb-layout-container container g-0">
<div class="layout-row row">
<div class="ucb-left-sidebar ucb-sidebar col-sm-12 col-md-4 col-lg-3">
{{ page.left_sidebar }}
</div>
<div class="ucb-layout-main col-sm-12 col-md-4 col-lg-6 ucb-has-sidebar">
{{ page.content }}
</div>
<div class="ucb-left-right ucb-sidebar col-sm-12 col-md-4 col-lg-3">
{{ page.right_sidebar }}
</div>
</div>
</div>
{% elseif page.left_sidebar|render %}
<div class="ucb-layout-container container g-0">
<div class="layout-row row">
<div class="ucb-left-sidebar ucb-sidebar col-sm-12 col-md-4 col-lg-3">
{{ page.left_sidebar }}
{{ page.sidebar }}
</div>
<div class="ucb-layout-main col-sm-12 col-md-8 col-lg-9 ucb-has-sidebar">
{{ page.content }}
</div>
</div>
</div>
{% elseif page.right_sidebar|render %}
{% else %}
<div class="ucb-layout-container container g-0">
<div class="layout-row row">
<div class="ucb-layout-main col-sm-12 col-md-8 col-lg-9 ucb-has-sidebar">
{{ page.content }}
</div>
<div class="ucb-left-right ucb-sidebar col-sm-12 col-md-4 col-lg-3">
{{ page.right_sidebar }}
{{ page.sidebar }}
</div>
</div>
</div>
Expand Down

0 comments on commit f1d01c0

Please sign in to comment.