1208c5e6 by Jeff Balicki

stuff

1 parent a040243a
<div class="numbers-block" style="color:#fff;background-color:<?php block_field( 'color' ); ?>;">
<div class="numbers-block" data-aos-delay="300" data-aos="fade-up" style="color:#fff;background-color:<?php block_field( 'color' ); ?>;">
<h3><span class="number"><?php block_field( 'number' ); ?></span><span><?php block_field( 'header' ); ?></span></h3>
<p><?php block_field( 'paragraph' ); ?></p>
</div>
\ No newline at end of file
......
......@@ -36,7 +36,7 @@
&nbsp;
</td>
<td align="center" width="135">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/FPCanada_logo_tag_clr_pos-lg-1.jpg" class="img-fluid" alt="FP Canada">
</td>
<td align="center" width="40">
&nbsp;&nbsp;
......
......@@ -36,7 +36,7 @@
&nbsp;
</td>
<td align="center" width="135">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/FPCanada_logo_tag_clr_pos-lg-1.jpg" class="img-fluid" alt="FP Canada">
</td>
<td align="center" width="40">
&nbsp;&nbsp;
......
......@@ -36,7 +36,7 @@
&nbsp;
</td>
<td align="center" width="135">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/FPCanada_logo_tag_clr_pos-lg-1.jpg" class="img-fluid" alt="FP Canada">
</td>
<td align="center" width="40">
&nbsp;&nbsp;
......
......@@ -29,14 +29,18 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
$css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles );
wp_enqueue_style( 'fonts', get_stylesheet_directory_uri() .'/fonts/fonts.css', array(), $css_version );
wp_enqueue_style( 'aos', get_stylesheet_directory_uri() .'/css/aos.css', array(), $css_version );
wp_enqueue_style( 'understrap-styles', get_template_directory_uri() . $theme_styles, array(), $css_version );
wp_enqueue_script( 'jquery' );
$js_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_scripts );
wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . $theme_scripts, array(), $js_version, true );
wp_enqueue_script( 'aos', get_stylesheet_directory_uri() .'/js/aos.js', array(), $js_version, true );
wp_enqueue_script( 'TweenMaxt', get_stylesheet_directory_uri() .'/js/gsap-latest-beta.min.js', array(), $js_version, true );
wp_enqueue_script( 'custom-javascript', get_stylesheet_directory_uri() .'/js/custom-javascript.js', array(), $js_version, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
......
// Add your custom JS here.
jQuery( document ).ready(function($) {
AOS.init();
$('.wp-block-button__link').attr('tabindex', 0);
$('.cf7mls_btn').attr('tabindex', 0);
$('#Layer_1').appendTo('.n2-ss-slider-wrapper-inside');
......@@ -77,7 +80,9 @@ jQuery( document ).ready(function($) {
function updateContainer() {
var maxHeight = 0;
$(".numbers-block").each(function(){
$(".numbers-block").each(function(index){
delay = index * 200 + 300;
$(this).attr('data-aos-delay', delay);
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
});
......@@ -93,4 +98,62 @@ $(window).on('resize', function(){
function animateValue(id, start, end, duration) {
var start= 0 ;
// here we retrieve the text of the 'target' element by its 'id',
// and convert the returned value into a number, using
// parseInt(); the first argument is the string to convert and
// the second is the numeric base of the number into which you
// want to convert the given numeric string:
var end = parseInt(document.getElementById(id).textContent, 10);
var duration = 500;
var range = end - start;
var current = start;
var increment = end > start? 1 : -1;
var stepTime = Math.abs(Math.floor(duration / range));
var obj = document.getElementById(id);
var timer = setInterval(function() {
current += increment;
obj.innerHTML = current;
if (current == end) {
clearInterval(timer);
}
}, stepTime);
}
$(window).on('load resize scroll', function() {
// elementInViewport($('#number16'), 'number16');
// elementInViewport($('#number17'), 'number17');
elementInViewport($('#find-number'), 'find-number');
});
function elementInViewport(element, id) {
if (inViewport(element) && !$(element).hasClass('done')) {
animateValue(id ,0,0,5000);
$(element).addClass('done')
}
}
function inViewport(element) {
if (typeof jQuery === "function" && element instanceof jQuery) {
element = element[0];
}
var elementBounds = element.getBoundingClientRect();
return (
elementBounds.top >= 0 &&
elementBounds.left >= 0 &&
elementBounds.bottom <= $(window).height() &&
elementBounds.right <= $(window).width()
);
}
});
\ No newline at end of file
......
......@@ -5,7 +5,7 @@
Author: the Understrap Contributors
Author URI: https://github.com/understrap/understrap-child/graphs/contributors
Template: understrap
Version: 1.1.37
Version: 1.1.38
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
......