diff --git a/CHANGELOG.md b/CHANGELOG.md index 8514a89a..9a248c45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- ### Places first name and last name on the same line to prevent trimming of the space between them + [bug] An issue existed where a space was trimmed between the first name and last name on person pages due to the names being separated by a newline. This update resolves the issue. Resolves CuBoulder/tiamat-theme#1304 +--- + +- ### People List Page: Selecting 'Group by Job Type or Department' with Filters applied to that term, only shows allowed groupings + Previously if you had a People List Page with `Group by` set to Department or Job Type, and had filter on that term, you could possibly see groupings of people for terms not selected in the filter, if the Person pages had multiple terms. + + For example: on [https://www.colorado.edu/alc/our-people/undergraduate-advising](https://www.colorado.edu/alc/our-people/undergraduate-advising), the Faculty group should not show up as it is a term applied to every Person Page, but NOT included in the filters. + + This has been corrected so only the filtered groups in the `Includes` for that term show up as a Group. + + Resolves https://github.com/CuBoulder/tiamat-theme/issues/1259 +--- + +- ### Webform Block: Adds Required field indicator + Previously the required field indicator (red asterisk) was missing from Forms added as a `Webform block` (not to be confused with Form blocks). This has been corrected so they are visible. + + Resolves #1321 +--- + +- ### Fix for alignment of floated images with long captions + Add proper alignment on floated images. + Should only affect images with large amounts of caption text. + + Resolves #1314 + Resolves #1249 +--- + +- ### Remove Mega menu from Sticky menus and add default link color + Resolves #1317 and #1316. + Removes mega menus from the sticky menu and converts them into normal links. It also adds base default colors for links in mega menus to account for site settings. +--- + +- ### body template move + The basic page body block wasn't being rendered at the right level. This caused it not to be editable or removable at the layout builder level. If multiple body sections were added they couldn't be deleted and a "body" title was added to each new addition. + + Closes #1280 +--- + - ### Article Title Background Update Removed div displayed image and set it as a background image. Set the background image to use the `section_background` image style to avoid large image files. diff --git a/css/block/ucb-mega-menu.css b/css/block/ucb-mega-menu.css index f894dd69..59864b78 100644 --- a/css/block/ucb-mega-menu.css +++ b/css/block/ucb-mega-menu.css @@ -83,6 +83,14 @@ flex-wrap: wrap; } +.ucb-main-nav-container .ucb-mega-menu .menu-item .mega-menu-wrapper a{ + color: #0277bd; +} + +.ucb-main-nav-container .ucb-mega-menu .menu-item .mega-menu-wrapper a:hover{ + color: #B71C1C; +} + @media only screen and (max-width: 767px) { .ucb-mega-menu-column-3 div, diff --git a/css/style.css b/css/style.css index 53a6c8ac..ac404b84 100644 --- a/css/style.css +++ b/css/style.css @@ -709,6 +709,19 @@ article .align-left .media-image-caption p { font-size: 85%; } +/* Center image above caption that has been floated */ +.align-center .imageMediaStyle { + text-align: center; +} + +.align-left .imageMediaStyle{ + text-align: left; +} + +.align-right .imageMediaStyle { + text-align: right; +} + .align-right.image_style-large_image_style, .align-left.image_style-large_image_style { max-width: 100%; @@ -1029,6 +1042,15 @@ form label { display: inline; } +/* Required * for Webform */ +form.webform-submission-form .form-required::after { + display: inline-block; + margin-inline: 0.15em; + content: "*"; + color: #f00; + font-size: 0.875rem; +} + .form-type-checkbox .field-label-after label, .form-type-radio .field-label-after label { display: inline-block; diff --git a/css/ucb-sticky-menu.css b/css/ucb-sticky-menu.css index 153c6964..5a51a3e6 100644 --- a/css/ucb-sticky-menu.css +++ b/css/ucb-sticky-menu.css @@ -67,3 +67,8 @@ .sticky-menu-inner .ucb-menu li.menu-item a.nav-link:hover { color: var(--ucb-gold); } + +.sticky-menu-inner .ucb-mega-menu, +.sticky-menu-inner .ucb-mega-menu-icon { + display: none; +} \ No newline at end of file diff --git a/js/ucb-mega-menu.js b/js/ucb-mega-menu.js index d2c2c4e7..09a661d0 100644 --- a/js/ucb-mega-menu.js +++ b/js/ucb-mega-menu.js @@ -26,4 +26,16 @@ const megaMenuList = [...megaMenuElementList].map(collapseEl => new bootstrap.Co } } } -}) \ No newline at end of file +}) + +// Disable Sticky Menu Mega Menus +const stickyMenu = document.getElementsByClassName("ucb-sticky-menu"); +for (let i = 0; i < stickyMenu.length; i++) { + const allMegaMenus = stickyMenu[i].getElementsByClassName("ucb-mega-menu-outer-link"); + for (let j = 0; j < allMegaMenus.length; j++) { + allMegaMenus[j].removeAttribute("data-bs-toggle"); + allMegaMenus[j].removeAttribute("data-bs-target"); + allMegaMenus[j].removeAttribute("aria-expanded"); + allMegaMenus[j].removeAttribute("aria-controls"); + } +} \ No newline at end of file diff --git a/js/ucb-people-list.js b/js/ucb-people-list.js index 1cd96737..b7b221a7 100644 --- a/js/ucb-people-list.js +++ b/js/ucb-people-list.js @@ -229,16 +229,19 @@ if (groupingData && groupingData.length) { hasGroupingTaxonomy = true; } - ((person['relationships']['field_ucb_person_' + groupBy] || {})['data'] || []).forEach( - termData => { - const termId = termData['meta']['drupal_internal__target_id']; + + ((person['relationships']['field_ucb_person_' + groupBy] || {})['data'] || []).forEach(termData => { + const termId = termData['meta']['drupal_internal__target_id']; + // If there are filters applied to the current groupBy field (e.g., job_type), apply them so unwanted groups don't show up + if (!this._filters[groupBy] || this._filters[groupBy].includes.length === 0 || this._filters[groupBy].includes.map(Number).includes(termId)) { let termPeople = groupedPeople.get(termId); if (!termPeople) { termPeople = []; groupedPeople.set(termId, termPeople); } termPeople.push(person); - }); + } + }); }); if (!hasGroupingTaxonomy) { this.toggleMessageDisplay(this._messageElement, 'block', 'ucb-list-msg', `No results found for the '${groupBy}' grouping.`); diff --git a/templates/content/node--ucb-person.html.twig b/templates/content/node--ucb-person.html.twig index ec439187..6bfe81c5 100644 --- a/templates/content/node--ucb-person.html.twig +++ b/templates/content/node--ucb-person.html.twig @@ -14,11 +14,13 @@ ] %} {% set baseurlJSON = url('')|render|trim('/') %} +{% set firstName = content.field_ucb_person_first_name['#items'].0.value|trim %} +{% set lastName = content.field_ucb_person_last_name['#items'].0.value|trim %}

- {{ content.field_ucb_person_first_name }} {{ content.field_ucb_person_last_name }} + {{ firstName }} {{ lastName }}

{{ content.field_ucb_person_pronouns }} {% if content.field_ucb_person_title.0 or content.field_ucb_person_department.0 %} @@ -74,7 +76,7 @@