Skip to content

Commit

Permalink
Merge pull request #920 from equalizedigital/feature/local-dev-branch
Browse files Browse the repository at this point in the history
Feature/local dev branch
  • Loading branch information
tronsymphony authored Nov 7, 2023
2 parents f0b172e + d22031c commit 75a68ec
Show file tree
Hide file tree
Showing 22 changed files with 143 additions and 51 deletions.
5 changes: 5 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function eqd_archive_recommended_post() {
$post_recommened = get_field('recommendedfeatured_posts',$term);

if(!empty($post_recommened)):
if (!is_paged()) :
?>
<section class="archive_template_recommended_post">
<div class="archive_template_recommended_post_header">
Expand Down Expand Up @@ -162,6 +163,8 @@ function eqd_archive_recommended_post() {
</section>
<?php
endif;
endif;

}
add_action( 'tha_content_before_container', 'eqd_archive_recommended_post' );

Expand All @@ -170,6 +173,7 @@ function eqd_archive_recommended_cta(){
$cta = get_field('cta',$term);

if($cta):
if(!is_paged()):
?>
<section class="archive_cta">
<div class="archive_cta_container">
Expand All @@ -193,6 +197,7 @@ function eqd_archive_recommended_cta(){
</section>
<?php
endif;
endif;
}
add_action( 'tha_content_before_container', 'eqd_archive_recommended_cta' );

Expand Down
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.

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

Large diffs are not rendered by default.

60 changes: 45 additions & 15 deletions assets/js/src/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ window.addEventListener("load", function () {

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

function teamHighlightFunctionality(windowWidth) {
let highlightButton = document.querySelector('.team-hightlight-block-container-team-hightlight__load_more button')
let highlightButtonText = document.querySelector('.team-hightlight-block-container-team-hightlight__load_more button .text')
Expand Down Expand Up @@ -764,6 +764,7 @@ window.addEventListener("load", function () {
}

highlightButton.addEventListener('click', function () {
console.log('eee')
// Remove the "hidden" class and add an "animate" class for each item
items.forEach(function (item) {

Expand Down Expand Up @@ -797,7 +798,7 @@ window.addEventListener("load", function () {
// Hide the "Show All" button with a fade-out effect
this.classList.add('active');

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

// After the animation is complete, remove the "animate" class
setTimeout(function () {
Expand All @@ -822,11 +823,11 @@ window.addEventListener("load", function () {

window.addEventListener('DOMContentLoaded', () => {

let toc_container_entry_content = document.querySelectorAll('.post_type_layout_standard .entry-content');
let toc_container_entry_content = document.querySelectorAll('.single .post_type_layout_standard .entry-content');
let toc_container = document.querySelectorAll('.toc_container');

if (toc_container.length > 0 || toc_container_entry_content.length>0) {

if (toc_container.length > 0 || toc_container_entry_content.length > 0) {
// Get all <h2> elements within .toc_container
let tocContainer;
let h2Elements;
Expand Down Expand Up @@ -901,17 +902,16 @@ window.addEventListener('DOMContentLoaded', () => {
}
}


let activeListItem = null;
let activeListItemMobile = null;
let activeListItemSidebar = null;
let toc_content_load_point = document.querySelector('.toc_content_load_point');


const observer = new IntersectionObserver(entries => {

console.log(observer)
entries.forEach(entry => {
const id = entry.target.getAttribute('id');

if (entry.intersectionRatio > 0) {
// Remove 'active' class from the currently active list item
if (activeListItemMobile) {
Expand All @@ -923,6 +923,7 @@ window.addEventListener('DOMContentLoaded', () => {
if (activeListItemSidebar) {
activeListItemSidebar.classList.remove('active');
}


// Add 'active' class to the one corresponding to the current entry
const listItem = document.querySelector(`.toc-nav li a[href="#${id}"]`).parentElement;
Expand All @@ -948,15 +949,19 @@ window.addEventListener('DOMContentLoaded', () => {

});


// Track all sections that have an `id` applied
const targetElements = document.querySelectorAll('.toc_container h2');
let targetElements;
if (toc_container.length > 0) {
targetElements = document.querySelectorAll('.toc_container h2');
} else if( toc_container_entry_content.length > 0 ) {
targetElements = document.querySelectorAll('.single .post_type_layout_standard .entry-content h2');
}

targetElements.forEach(element => {
observer.observe(element);
});




window.addEventListener('scroll', function () {
// Get the .inner-hero element and its bottom position relative to the viewport
var heroElement = document.querySelector('.inner-hero');
Expand All @@ -979,8 +984,6 @@ window.addEventListener('DOMContentLoaded', () => {

});



// click toc menu links
const elementsWithHref = document.querySelectorAll('.contents-nav-mobile-menu a, .toc-nav a');

Expand Down Expand Up @@ -1021,6 +1024,7 @@ window.addEventListener('DOMContentLoaded', () => {

// vendor information block
document.addEventListener('DOMContentLoaded', function () {

const accordionButton = document.querySelectorAll('.vendor_information_block_container_column_two_link_more_info');
if (accordionButton.length > 0) {

Expand All @@ -1042,4 +1046,30 @@ document.addEventListener('DOMContentLoaded', function () {

}

});
const tabletChevron = document.querySelectorAll('.tablet_chevron');
if (tabletChevron.length > 0) {

document.querySelector('.tablet_chevron').addEventListener('click', function() {
var list = document.querySelector('.tabbed-content__nav-list');
var items = list.querySelectorAll('.tabbed-content__nav-item');

// Find the currently active item
var activeItem = list.querySelector('.active');
var activeIndex = Array.from(items).indexOf(activeItem);

// Determine the next item to scroll into view
var nextItem = items[activeIndex + 1] || items[0]; // Loop back to first if at the end

if (nextItem) {
// Scroll the next item into view
nextItem.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });

// Update the active class if needed
activeItem.classList.remove('active');
nextItem.classList.add('active');
}
});
}

});

9 changes: 9 additions & 0 deletions assets/scss/blocks/calculator-signup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
border-radius: 10px;
overflow: hidden;

&.calculator-signup-container-footer{
border-radius: 0;
}

@include media(">tablet") {
margin: 0 0;
}
Expand All @@ -35,6 +39,7 @@
margin: 0 auto;
display: flex;
position: relative;


@include media("<tablet") {
flex-direction: column;
Expand Down Expand Up @@ -77,6 +82,10 @@
padding: 40px 10%;
}

@include media(">1600px") {
padding: 80px 10%;
}

.btn {
margin-top: 20px;
display: inline-block;
Expand Down
5 changes: 5 additions & 0 deletions assets/scss/blocks/tabbed-content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
position: absolute;
bottom: 0;
right: 0;
border: none;
-webkit-appearance: none;
background-color: transparent;
padding: 0;
display: flex;
@include media(">tablet") {
display: none;
Expand Down Expand Up @@ -211,6 +215,7 @@
max-width: 510px;
margin: 0 auto;
position: relative;
min-width: 100%;

figure {
display: flex;
Expand Down
12 changes: 6 additions & 6 deletions assets/scss/blocks/team-hightlight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

.team-hightlight-block-container-team-hightlight-member__photo img{
@include media("<tablet") {
height: 80vw;
border-radius: 10px 0 0 10px;
height: 33vw;

}
}
Expand Down Expand Up @@ -67,13 +66,14 @@

img {
width: 100%;

object-fit: cover;
object-position: center;
border-radius: 10px;
border-radius: 0px;

@include media(">tablet") {
height: 220px;
border-radius: 10px;

}
}
}
Expand Down Expand Up @@ -111,8 +111,8 @@
&-hightlight {
padding: 0 !important;
display: grid;
grid-template-columns: repeat(1, 1fr);

grid-template-columns: repeat(2, 1fr);
gap: 0 20px;
@include media(">tablet") {
gap: 20px;
grid-template-columns: repeat(3, 1fr);
Expand Down
1 change: 1 addition & 0 deletions assets/scss/blocks/vendor-information-block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@

@include media("<tablet") {
flex-direction: column;
margin-top: 20px;
}

&.btn {
Expand Down
3 changes: 3 additions & 0 deletions assets/scss/blocks/vendor-repeater.scss
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@
max-width: 160px;
margin: 0 auto;
display: inline-flex;
@include media("<tablet") {
margin: 0;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/partials/_blocks-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ margin-bottom: 20px;
border: 1px solid #A1A5A5;
font-size: 14px;
font-style: normal;
font-weight: 300;
font-weight: 400;
line-height: 18px;
padding: 10px 20px;
}
Expand Down
6 changes: 2 additions & 4 deletions assets/scss/partials/_blocks-core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@
border: 1px solid transparent;
color: $black;
text-align: center;
font-size: 15px;
font-size: 20px;
font-style: normal;
font-weight: 400;
line-height: 15px;
min-width: 148px;
cursor: pointer;
border-radius: 4px;
color: black;

&:focus{
color: black;
}
Expand Down Expand Up @@ -60,9 +61,6 @@
}
}

&:hover,
&:focus {}

@each $name in $gutenberg_colors {
&.has-#{$name}-background-color {

Expand Down
4 changes: 4 additions & 0 deletions assets/scss/partials/_editor-class.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ blockquote.wp-block-quote {
background-repeat: no-repeat;
}

> * {
color: #fff;
}

p {
color: #FFF;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/partials/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ header.site-header {
color: black;
font-size: 16px;
font-style: normal;
font-weight: 300;
font-weight: 400;
line-height: 22px;
text-decoration: none;

Expand Down
Loading

0 comments on commit 75a68ec

Please sign in to comment.