I had found this solution for displaying Cards as squares (or rectangles) on each page. It was very Uniform. On a couple pages I even modified the code so that it would be 2:3 boxes instead of 1:1.
Here is the JavaScript:
jQuery(document).ready(function($){
$(window).on('load resize', function(){
$('.x-card-outer .x-card-inner').each(function(index, element){
var h = $(this).width();
$(this).css({'height': h});
});
});
});
Then I would use the following CSS for the pictures:
div.Card1 .x-face-outer.front {
background: url("/photodirectory/card1.jpg") no-repeat center !important;
}
div.Card2 .x-face-outer.front {
background: url("/photodirectory/card2.jpg") no-repeat center !important;
}
div.Card3 .x-face-outer.front {
background: url("/photodirectory/card3.jpg") no-repeat center !important;
}
div.Card4 .x-face-outer.front {
background: url("/photodirectory/card4.jpg") no-repeat center !important;
}
div.Card1 .x-face-outer.front,
div.Card2 .x-face-outer.front,
div.Card3 .x-face-outer.front,
div.Card4 .x-face-outer.front {
background-size: 100% auto !important;
}
I updated XTHEME and they all broke. I tinkered with a bunch of stuff and the only way to fixe it was to add this code to the individual pages. Basically calling the ENTIRE JQUERY library (again?).
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
When I add it to individual pages in a text element page loads great.
When I added it to the _header.php file the page loaded fine BUT it broke the cornerstone on page editor and would only let me edit in wireframe mode.
I really donât want to call the JQUERY file unless I really have to add it.
I also donât want to add it to the 40-50 pages that already exist across multiple sites (all using one child theme). Any help would be greatly appreciated.
Example of a broken page: http://syracusefca.org/about/
Example of a fixed page with in page JQUERY call: http://syracusefca.org/campus/ (The javascript size calculation is a little different but that isnât impacting the âcallâ of jquery. I added the JQUERY link in the âteam huddlesâ text element.
Thanks for any help anyone can provide. Iâve tried to provide as much documentation as I can.