From b6c429ba2dee65cec885483c572b3e5fb47a2eb0 Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Thu, 30 Nov 2023 09:20:19 -0600 Subject: [PATCH 1/2] Fix mobile icons and opening issue. (#174) --- blocks/header/header.css | 15 +++++++++++++-- blocks/header/header.js | 6 ++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/blocks/header/header.css b/blocks/header/header.css index c2264db7..398a5dd1 100644 --- a/blocks/header/header.css +++ b/blocks/header/header.css @@ -97,7 +97,7 @@ body.light-nav { font-family: var(--font-family-proxima); font-weight: var(--font-weight-normal); font-size: var(--body-font-size-s); - letter-spacing:var(--letter-spacing-reg); + letter-spacing: var(--letter-spacing-reg); line-height: var(--body-font-size-s); text-decoration: none; cursor: pointer; @@ -197,6 +197,7 @@ body.light-nav { } .header.block nav .nav-hamburger .nav-hamburger-icon { + position: relative; height: 24px; width: 24px; } @@ -208,9 +209,19 @@ body.light-nav { .header.block nav .nav-hamburger .close { display: none; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; } .header.block nav .nav-hamburger .open { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; filter: var(--hamburger-filter); } @@ -239,7 +250,7 @@ body.light-nav { height: var(--nav-height); background: transparent; } - + body.light-nav .header.block nav[aria-expanded="true"] { --logo-filter: invert(1); } diff --git a/blocks/header/header.js b/blocks/header/header.js index a59f69bc..d369cc32 100644 --- a/blocks/header/header.js +++ b/blocks/header/header.js @@ -2,7 +2,7 @@ import { BREAKPOINTS } from '../../scripts/scripts.js'; import { getMetadata, decorateIcons, decorateSections } from '../../scripts/aem.js'; // media query match that indicates mobile/tablet width -const isDesktop = BREAKPOINTS.medium; +const isDesktop = BREAKPOINTS.large; function closeOnEscape(e) { if (e.code === 'Escape') { @@ -230,7 +230,9 @@ export default async function decorate(block) { nav.setAttribute('aria-expanded', 'false'); // prevent mobile nav behavior on window resize toggleMenu(nav, navSections, isDesktop.matches); - isDesktop.addEventListener('change', () => toggleMenu(nav, navSections, isDesktop.matches)); + isDesktop.addEventListener('change', () => { + toggleMenu(nav, navSections, isDesktop.matches); + }); decorateIcons(nav); const navWrapper = document.createElement('div'); From 684dbcdb344baf8825c38781cafb86833ab1696f Mon Sep 17 00:00:00 2001 From: Bryan Stopp Date: Thu, 30 Nov 2023 09:21:30 -0600 Subject: [PATCH 2/2] Fix footer icons and a few other issues. (#175) --- blocks/footer/footer.css | 4 ++-- icons/bhhs_seal_blk.svg | 5 ++++- icons/heartempty.svg | 4 ++-- icons/saved-properties.svg | 9 +++++++++ scripts/scripts.js | 2 +- styles/bhhs_seal_favicon.ico | Bin 0 -> 413 bytes 6 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 icons/saved-properties.svg create mode 100644 styles/bhhs_seal_favicon.ico diff --git a/blocks/footer/footer.css b/blocks/footer/footer.css index c8ea6721..44381b8a 100644 --- a/blocks/footer/footer.css +++ b/blocks/footer/footer.css @@ -87,7 +87,7 @@ footer { margin-right: 10px; } -.icon-facebook svg, .icon-linkedin svg, .icon-instagram svg, .icon-youtube svg { +.icon-facebook img, .icon-linkedin img, .icon-instagram img, .icon-youtube img { height: 20px; width: 20px; margin-right: 5px; @@ -95,7 +95,7 @@ footer { } -.footer-container-flex > div:nth-child(1) svg { +.footer-container-flex > div:nth-child(1) img { position: relative; height: 68px; width: 68px; diff --git a/icons/bhhs_seal_blk.svg b/icons/bhhs_seal_blk.svg index 0e33facc..d1bdb900 100644 --- a/icons/bhhs_seal_blk.svg +++ b/icons/bhhs_seal_blk.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/icons/heartempty.svg b/icons/heartempty.svg index 08620870..5c92e930 100644 --- a/icons/heartempty.svg +++ b/icons/heartempty.svg @@ -1,9 +1,9 @@ - diff --git a/icons/saved-properties.svg b/icons/saved-properties.svg new file mode 100644 index 00000000..d2eed1c9 --- /dev/null +++ b/icons/saved-properties.svg @@ -0,0 +1,9 @@ + diff --git a/scripts/scripts.js b/scripts/scripts.js index ea0427af..659f4e50 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -279,7 +279,7 @@ async function loadLazy(doc) { loadCSS(`${window.hlx.codeBasePath}/styles/lazy-styles.css`); loadFonts(); - addFavIcon(`${window.hlx.codeBasePath}/styles/favicon.svg`); + addFavIcon(`${window.hlx.codeBasePath}/styles/bhhs_seal_favicon.ico`); sampleRUM('lazy'); sampleRUM.observe(main.querySelectorAll('div[data-block-name]')); sampleRUM.observe(main.querySelectorAll('picture > img')); diff --git a/styles/bhhs_seal_favicon.ico b/styles/bhhs_seal_favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..563f4189fb3786bba595bb3617e38ec1659d114f GIT binary patch literal 413 zcmV;O0b>4%P)2IChoeX8*#<}`gMX>Vq%H2J&==v&=K2@KtZ^}vJ|tm|0z z?4z0%@IlnKF6RrtRZMmXIiKW_jXU$n)N4>ZBR$rh)gTYFhXs>7Gs+va&~*)M)x=4( zSI0IWW7o9kImnf^18Ozc1w=-3^%2L8Ih8+E%{D9fty`Nh$bi}rbn9(jywUE(2>^@9 zn!EMSq)8|)Y*>{AY>GKn(dcvmo8;