Skip to content

Commit

Permalink
Merge pull request #1068 from equalizedigital/hotfix/rss-feed
Browse files Browse the repository at this point in the history
Hotfix/rss feed
  • Loading branch information
SteveJonesDev authored Jan 5, 2024
2 parents de64269 + 9b64d98 commit 01cf7ef
Show file tree
Hide file tree
Showing 60 changed files with 1,853 additions and 658 deletions.
2 changes: 1 addition & 1 deletion assets/css/editor-style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/main.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/icons/search-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions assets/icons/utility/close-cross-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/js/global-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/menu-min.js

Large diffs are not rendered by default.

149 changes: 119 additions & 30 deletions assets/js/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ window.addEventListener("load", function () {
const tabbedContent = document.querySelector('.resource-links-container');
if (tabbedContent) {
// Grab all buttons with the class tabbed-content__nav-item
const tabButtons = document.querySelectorAll('.resource-links-container-links-link-button , .dropdown-li');
const tabButtons = document.querySelectorAll('button.resource-links-container-links-link-button , .dropdown-li');

tabButtons.forEach(button => {
// Add a click event listener to each button
Expand Down Expand Up @@ -398,40 +398,25 @@ document.addEventListener('DOMContentLoaded', function () {
var containerId = menuFooterContainer.id;
title.setAttribute('aria-controls', containerId);
}
});


widgetTitles.forEach(title => {
title.setAttribute('tabindex', '0');
title.setAttribute('role', 'button');
title.setAttribute('aria-expanded', 'false');
// Add click event listener to each .widget-title

// title.addEventListener('keypress', function () {

// // Check if there's a next sibling element
// this.classList.toggle('active');
// let sibling = this.nextElementSibling;
// if (sibling) {
// var isExpanded = title.getAttribute('aria-expanded') === 'true';
// // Add class to the sibling
// this.nextElementSibling.classList.toggle('active'); // Replace 'your-class-name-here' with your desired class name
// this.setAttribute('aria-expanded', isExpanded ? 'false' : 'true');

// }
// });

});
widgetTitles.forEach(function (title) {

title.addEventListener('click', function () {
// Check if there's a next sibling element
this.classList.toggle('active');
let sibling = this.nextElementSibling;
if (sibling) {
var isExpanded = title.getAttribute('aria-expanded') === 'true';
// Add class to the sibling
this.nextElementSibling.classList.toggle('active'); // Replace 'your-class-name-here' with your desired class name
// if (sibling) {
var isExpanded = title.getAttribute('aria-expanded');
this.nextElementSibling.classList.toggle('active');
this.setAttribute('aria-expanded', isExpanded ? 'false' : 'true');
}
});
// }
},true);
});

}
Expand All @@ -440,13 +425,16 @@ document.addEventListener('DOMContentLoaded', function () {

window.addEventListener('resize', function () {
if (window.innerWidth < 768) {
footerMenuFunctions()
setTimeout(() => {
footerMenuFunctions()
}, 500);
} else {
widgetTitlesRespo.forEach(title => {
title.removeAttribute('tabindex');
title.removeAttribute('role');
title.removeAttribute('aria-expanded');
title.removeAttribute('aria-controls');
title.removeEventListener('click',arguments.callee)
});
}
});
Expand Down Expand Up @@ -743,11 +731,11 @@ window.addEventListener("load", function () {
let initText = highlightButtonText.innerText;
let tabOpen = false;

if (items.length >= 4) {
if (items.length >= 6) {

if (windowWidth <= 768) {
items.forEach(function (item, index) {
if (index < 4) {
if (index < 6) {
item.tabIndex = 0;
} else {
item.tabIndex = -1;
Expand All @@ -760,7 +748,6 @@ window.addEventListener("load", function () {
item.tabIndex = 0;
});
}

}

highlightButton.addEventListener('click', function () {
Expand All @@ -771,7 +758,7 @@ window.addEventListener("load", function () {
item.classList.add('hidden');
item.classList.remove('animate');
items.forEach(function (item, index) {
if (index < 4) {
if (index < 6) {
item.tabIndex = 0;
} else {
item.tabIndex = -1;
Expand All @@ -789,7 +776,7 @@ window.addEventListener("load", function () {
var currentState = this.getAttribute('aria-expanded') === 'true';
this.setAttribute('aria-expanded', currentState ? 'false' : 'true');

for (var i = 0; i < 4 && i < items.length; i++) {
for (var i = 0; i < 6 && i < items.length; i++) {
items[i].classList.remove('hidden');
}

Expand Down Expand Up @@ -818,6 +805,104 @@ window.addEventListener("load", function () {



// Lender Table Show More
window.addEventListener("load", function () {

function checkIsTabletSizeLender() {
var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

teamLenderFunctionality(windowWidth);
}

// Initial check on page load
checkIsTabletSizeLender();

// Listen for window resize events and recheck
window.addEventListener('resize', checkIsTabletSizeLender);

function teamLenderFunctionality(windowWidth) {
let highlightButtonLender = document.querySelector('.refinance_lender_section__load_more button')
let highlightButtonLenderText = document.querySelector('.refinance_lender_section__load_more button .text')

if (highlightButtonLender) {
let items = document.querySelectorAll('.data-tr');
let initText = highlightButtonLenderText.innerText;
let tabOpen = false;



if (items.length >= 3) {



if (windowWidth <= 768) {
items.forEach(function (item, index) {
if (index < 3) {
item.tabIndex = 0;
} else {
item.tabIndex = -1;
}
});
items[0].tabIndex = 0;
}

highlightButtonLender.addEventListener('click', function () {
// Remove the "hidden" class and add an "animate" class for each item


items.forEach(function (item) {

if (tabOpen) {
item.classList.add('hidden');
item.classList.remove('animate');
items.forEach(function (item, index) {
if (index < 3) {
item.tabIndex = 0;
} else {
item.tabIndex = -1;
}
});

} else {
item.classList.remove('hidden');
item.classList.add('animate');
}

// item.tabIndex = 0;
});

var currentState = this.getAttribute('aria-expanded') === 'true';
this.setAttribute('aria-expanded', currentState ? 'false' : 'true');

for (var i = 0; i < 3 && i < items.length; i++) {
items[i].classList.remove('hidden');
}

items[0].focus()
// Hide the "Show All" button with a fade-out effect
this.classList.add('active');

tabOpen == false ? highlightButtonLenderText.innerText = 'Show Fewer' : highlightButtonLenderText.innerText = initText;

// After the animation is complete, remove the "animate" class
setTimeout(function () {
items.forEach(function (item) {
tabOpen ? item.classList.remove('animate') : item.classList.add('animate');
});
}, 500);

tabOpen ? tabOpen = false : tabOpen = true;
});

}

}

}
});



//

window.addEventListener('DOMContentLoaded', () => {
Expand Down Expand Up @@ -910,6 +995,10 @@ window.addEventListener('DOMContentLoaded', () => {
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
const id = entry.target.getAttribute('id');
let listItemCheck = document.querySelector(`.toc-nav li a`);
if (listItemCheck == null){
return;
}
if (entry.intersectionRatio > 0) {
// Remove 'active' class from the currently active list item
if (activeListItemMobile) {
Expand Down
5 changes: 4 additions & 1 deletion assets/js/src/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@
});
}

var mobileHelpBtn = document.getElementById('mobile_help_btn');
if (mobileHelpBtn) {

document.querySelector('.mobile_help_btn .btn').addEventListener('keydown', function(event) {
if (event.key === 'Tab') {
event.preventDefault();
Expand Down Expand Up @@ -174,7 +177,7 @@
$("html").toggleClass("overflow-hidden");
}
});

}



Expand Down
4 changes: 1 addition & 3 deletions assets/scss/blocks/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
.accordion-block-container-accordion__content {
padding: 20px 20px 0;
display: none;
color: var(--Black, #000);
font-size: 14px;
color: black;
font-style: normal;
font-weight: 400;
line-height: 24px;


&.active-content {
Expand Down
15 changes: 10 additions & 5 deletions assets/scss/blocks/columns-with-button.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.columns-with-button-block {
padding: 93px 0;


padding: 0 0 93px;
@include media(">tablet") {
padding: 93px 0;
}
&-container {
max-width: 1168px;
margin: 0 auto;
Expand All @@ -22,11 +23,15 @@

&__title {
color: #625089;
font-size: 35px;


font-style: normal;
font-weight: 700;
line-height: 40px;
margin: 0;
@include media(">tablet") {
font-size: 35px;
line-height: 40px;
}
}

&__rating {
Expand Down
6 changes: 4 additions & 2 deletions assets/scss/blocks/doctor-mortgages-map-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@

a.doctor-mortgages-block-cta {
width: 100%;
height: 45px;
min-height: 45px;
padding: 0 5px;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
Expand All @@ -217,7 +219,7 @@
font-size: 15px;
font-style: normal;
font-weight: 400;
line-height: 70px;
line-height: 1;
text-decoration: none;
margin-top: 40px;

Expand Down
2 changes: 1 addition & 1 deletion assets/scss/blocks/featured-in.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
grid-template-columns: 1fr 1fr;
align-items: center;
justify-content: center;
gap: 40px 10px;
gap: 20px 10px;
@include media(">tablet") {
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
}
Expand Down
11 changes: 6 additions & 5 deletions assets/scss/blocks/featured-post.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.featured-post{
.featured-post {
@include media("<tablet") {
padding: 0 10px;
margin-top: -40px!important;
padding: 0 10px;
// margin-top: -40px !important;
}

&-container {
max-width: 1168px;
margin: 0 auto;
Expand All @@ -15,7 +16,7 @@
min-height: 400px;
overflow: hidden;
text-decoration: none;

@include media(">tablet") {
grid-template-columns: 1fr 1fr;
margin-top: -80px;
Expand Down Expand Up @@ -84,11 +85,11 @@
border-right: 1px solid #547C2D;
padding-right: 10px;
margin-right: 10px;
max-width: calc(100% - 120px);
}

.featured-post-container-info .title {
color: #000;
font-family: Source Sans Pro;
font-size: 25px;
font-style: normal;
font-weight: 700;
Expand Down
7 changes: 3 additions & 4 deletions assets/scss/blocks/full-width-columns-cta-inner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@

.full-width-columns-cta-inner-container {
margin: 0 auto;
display: flex;
width: 100%;
// max-width: $container-width;

flex-direction: column;
display: grid;
grid-template-columns: 1fr 1fr;

@include media(">tablet") {
display: flex;
flex-direction: row-reverse;
}

Expand Down
2 changes: 2 additions & 0 deletions assets/scss/blocks/media-reviews-global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@

img {
max-height: 100%;
object-fit: contain;
object-position: center;
}
}
}
Loading

0 comments on commit 01cf7ef

Please sign in to comment.