Skip to content

Commit

Permalink
Sync main branch from pricefx-eds-qa, excluding fstab.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 15, 2024
2 parents 2d76fcd + e21b553 commit e9d5931
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion blocks/cards/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function decorateCTA(cta, ctaTarget, isClickable) {
}
return cta.firstElementChild.firstElementChild;
}
cta.innerHTML = `<p>${link.textContent.trim()}</p>`;
cta.innerHTML = `<p>${link?.textContent.trim()}</p>`;
return cta;
}

Expand Down
1 change: 1 addition & 0 deletions blocks/carousel/carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ main .carousel:has(.carousel[data-carousel-type='carousel-quote']) .carousel > p
display: flex;
justify-content: center;
padding: 98px 0 98px 15px;
box-sizing: border-box;
}

.carousel[data-carousel-type='carousel-quote'] .carousel-content {
Expand Down
2 changes: 1 addition & 1 deletion blocks/carousel/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const isCarouselQuoteDesktopBreakpoint = window.matchMedia('(min-width: 768px)')
const setSlidesPosition = (slides, width, isCarouselImage) => {
slides.forEach((slide, index) => {
if (!isCarouselImage) {
slide.style.left = `${width * index}px`;
slide.style.left = `${(width + 5) * index}px`;
} else {
slide.style.left = `${(width + 20) * index}px`;
}
Expand Down
2 changes: 1 addition & 1 deletion blocks/footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ footer .footer {
}

/* Responsive Styles */
@media(width >= 768px) {
@media(width >= 986px) {
.footer-menu-wrapper {
padding: 20px var(--spacing-small) 56px var(--spacing-small);;
}
Expand Down
4 changes: 2 additions & 2 deletions blocks/footer/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function createMenuLink(childMenu) {
* @param {Element} navToggle The toggle that show/hide the mobile navigation
*/
function toggleMobileNavAccordion(navToggle) {
if (window.innerWidth > 767) {
if (window.innerWidth > 985) {
return;
}

Expand Down Expand Up @@ -154,7 +154,7 @@ export default async function decorate(block) {

// Resetting ADA attributes
window.addEventListener('resize', () => {
if (window.matchMedia('(min-width:768px)').matches) {
if (window.matchMedia('(min-width:986px)').matches) {
block.querySelectorAll('.footer-menu-title-mobile')?.forEach((ele) => {
ele.setAttribute('aria-expanded', false);
const navlist = ele.nextElementSibling;
Expand Down
2 changes: 1 addition & 1 deletion blocks/header/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ header nav {
}

.mobile-nav-list--expanded {
height: calc(100vh + 400px);
height: calc(100vh - 116px);
overflow-y: scroll;
}

Expand Down
1 change: 1 addition & 0 deletions blocks/hero/hero.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
.hero .hero-right-container .hero-image-container img {
aspect-ratio: 2 / 1;
object-fit: cover;
width: 100%;
}

/* Hero Button */
Expand Down
4 changes: 2 additions & 2 deletions blocks/hero/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export default async function decorate(block) {
const heroImageContainer = document.createElement('div');
heroImageContainer.classList.add('hero-image-container');
const heroImage = imageContainer;
if (heroImage !== undefined && window.matchMedia('(min-width:986px)').matches) {
if (heroImage?.querySelector('img') !== null) {
if (heroImage !== undefined) {
if (heroImage?.querySelector('img') !== null && window.matchMedia('(min-width:986px)').matches) {
const imageUrl = heroImage?.querySelector('img').src;
heroImageContainer.setAttribute('style', `background-image:url(${imageUrl})`);
}
Expand Down
6 changes: 6 additions & 0 deletions blocks/left-right-boxed/left-right-boxed.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
.left-right-boxed .boxed-right-container .embed .embed-play-title {
text-align: center;
}

.left-right-boxed .boxed-right-container .boxed-image-container img {
aspect-ratio: 2 / 1;
object-fit: cover;
width: 100%;
}

@media (width <= 985px) {
.left-right-boxed .boxed-right-container .boxed-image-container {
Expand Down
4 changes: 2 additions & 2 deletions blocks/left-right-boxed/left-right-boxed.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export default async function decorate(block) {
const boxedImageContainer = document.createElement('div');
boxedImageContainer.classList.add('boxed-image-container');
const boxedImage = imageContainer;
if (boxedImage !== undefined && window.matchMedia('(min-width:986px)').matches) {
if (boxedImage?.querySelector('img') !== null) {
if (boxedImage !== undefined) {
if (boxedImage?.querySelector('img') !== null && window.matchMedia('(min-width:986px)').matches) {
boxedImageContainer.setAttribute('style', `background-image:url(${boxedImage.querySelector('img').src})`);
}
boxedImageContainer.append(boxedImage);
Expand Down
2 changes: 2 additions & 0 deletions blocks/related-articles/related-articles.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
line-height: calc((28 / 16) * 1rem);
margin: 0 0 var(--spacing-micro);
text-transform: capitalize;
text-align: left;
}

.blog-articles .article-info {
Expand All @@ -194,6 +195,7 @@
line-height: calc((28 / 16) * 1rem);
padding: 0 var(--spacing-small);
margin-top: auto;
text-align: left;
}

.blog-articles .article-author-link {
Expand Down
2 changes: 1 addition & 1 deletion blocks/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export default async function decorate(block) {
count.innerHTML = currentSearchJSON.length;

const searchTerm = block.querySelector('.search-term');
searchTerm.innerHTML = `'${query}'`;
searchTerm.textContent = `'${query}'`;

if (currentSearchJSON.length === 0) {
resultWrapper.innerHTML = `<h4 class="search-no-results">${noResultTitle.textContent.trim()}</h4>`;
Expand Down
6 changes: 3 additions & 3 deletions blocks/tabbed-filter/tabbed-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const renderFilterOptions = (filterOptions) => {
let markup = '';
filterOptions.forEach((option) => {
markup += `
<option value="${option}">${option}</option>
<option value="${option}">${option.toUpperCase()}</option>
`;
});
return markup;
Expand Down Expand Up @@ -224,7 +224,7 @@ export default async function decorate(block) {
industriesFilterContainer.append(industriesFilter);

industriesFilter.innerHTML = `
<option value="all-industries" selected>${filterIndustryAllLabel.textContent.trim()}</option>
<option value="all-industries" selected>${filterIndustryAllLabel.textContent.trim().toUpperCase()}</option>
${renderFilterOptions(industriesFilterOptions)}
`;
}
Expand All @@ -247,7 +247,7 @@ export default async function decorate(block) {
regionsFilterContainer.append(regionsFilter);

regionsFilter.innerHTML = `
<option value="all-regions" selected>${filterRegionAllLabel.textContent.trim()}</option>
<option value="all-regions" selected>${filterRegionAllLabel.textContent.trim().toUpperCase()}</option>
${renderFilterOptions(regionsFilterOptions)}
`;
}
Expand Down

0 comments on commit e9d5931

Please sign in to comment.