1208c5e6 by Jeff Balicki

stuff

1 parent a040243a
1 <div class="numbers-block" style="color:#fff;background-color:<?php block_field( 'color' ); ?>;"> 1 <div class="numbers-block" data-aos-delay="300" data-aos="fade-up" style="color:#fff;background-color:<?php block_field( 'color' ); ?>;">
2 <h3><span class="number"><?php block_field( 'number' ); ?></span><span><?php block_field( 'header' ); ?></span></h3> 2 <h3><span class="number"><?php block_field( 'number' ); ?></span><span><?php block_field( 'header' ); ?></span></h3>
3 <p><?php block_field( 'paragraph' ); ?></p> 3 <p><?php block_field( 'paragraph' ); ?></p>
4 </div> 4 </div>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 &nbsp; 36 &nbsp;
37 </td> 37 </td>
38 <td align="center" width="135"> 38 <td align="center" width="135">
39 <img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada"> 39 <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">
40 </td> 40 </td>
41 <td align="center" width="40"> 41 <td align="center" width="40">
42 &nbsp;&nbsp; 42 &nbsp;&nbsp;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 &nbsp; 36 &nbsp;
37 </td> 37 </td>
38 <td align="center" width="135"> 38 <td align="center" width="135">
39 <img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada"> 39 <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">
40 </td> 40 </td>
41 <td align="center" width="40"> 41 <td align="center" width="40">
42 &nbsp;&nbsp; 42 &nbsp;&nbsp;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
36 &nbsp; 36 &nbsp;
37 </td> 37 </td>
38 <td align="center" width="135"> 38 <td align="center" width="135">
39 <img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada"> 39 <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">
40 </td> 40 </td>
41 <td align="center" width="40"> 41 <td align="center" width="40">
42 &nbsp;&nbsp; 42 &nbsp;&nbsp;
......
...@@ -29,14 +29,18 @@ if ( ! function_exists( 'understrap_scripts' ) ) { ...@@ -29,14 +29,18 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
29 29
30 $css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles ); 30 $css_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_styles );
31 wp_enqueue_style( 'fonts', get_stylesheet_directory_uri() .'/fonts/fonts.css', array(), $css_version ); 31 wp_enqueue_style( 'fonts', get_stylesheet_directory_uri() .'/fonts/fonts.css', array(), $css_version );
32 wp_enqueue_style( 'aos', get_stylesheet_directory_uri() .'/css/aos.css', array(), $css_version );
32 wp_enqueue_style( 'understrap-styles', get_template_directory_uri() . $theme_styles, array(), $css_version ); 33 wp_enqueue_style( 'understrap-styles', get_template_directory_uri() . $theme_styles, array(), $css_version );
33 34
35
34 wp_enqueue_script( 'jquery' ); 36 wp_enqueue_script( 'jquery' );
35 37
36 $js_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_scripts ); 38 $js_version = $theme_version . '.' . filemtime( get_template_directory() . $theme_scripts );
37 wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . $theme_scripts, array(), $js_version, true ); 39 wp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . $theme_scripts, array(), $js_version, true );
40 wp_enqueue_script( 'aos', get_stylesheet_directory_uri() .'/js/aos.js', array(), $js_version, true );
38 wp_enqueue_script( 'TweenMaxt', get_stylesheet_directory_uri() .'/js/gsap-latest-beta.min.js', array(), $js_version, true ); 41 wp_enqueue_script( 'TweenMaxt', get_stylesheet_directory_uri() .'/js/gsap-latest-beta.min.js', array(), $js_version, true );
39 wp_enqueue_script( 'custom-javascript', get_stylesheet_directory_uri() .'/js/custom-javascript.js', array(), $js_version, true ); 42 wp_enqueue_script( 'custom-javascript', get_stylesheet_directory_uri() .'/js/custom-javascript.js', array(), $js_version, true );
43
40 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { 44 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
41 wp_enqueue_script( 'comment-reply' ); 45 wp_enqueue_script( 'comment-reply' );
42 } 46 }
......
1 // Add your custom JS here. 1 // Add your custom JS here.
2 jQuery( document ).ready(function($) { 2 jQuery( document ).ready(function($) {
3 AOS.init();
4
5
3 $('.wp-block-button__link').attr('tabindex', 0); 6 $('.wp-block-button__link').attr('tabindex', 0);
4 $('.cf7mls_btn').attr('tabindex', 0); 7 $('.cf7mls_btn').attr('tabindex', 0);
5 $('#Layer_1').appendTo('.n2-ss-slider-wrapper-inside'); 8 $('#Layer_1').appendTo('.n2-ss-slider-wrapper-inside');
...@@ -77,7 +80,9 @@ jQuery( document ).ready(function($) { ...@@ -77,7 +80,9 @@ jQuery( document ).ready(function($) {
77 function updateContainer() { 80 function updateContainer() {
78 var maxHeight = 0; 81 var maxHeight = 0;
79 82
80 $(".numbers-block").each(function(){ 83 $(".numbers-block").each(function(index){
84 delay = index * 200 + 300;
85 $(this).attr('data-aos-delay', delay);
81 if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } 86 if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
82 }); 87 });
83 88
...@@ -93,4 +98,62 @@ $(window).on('resize', function(){ ...@@ -93,4 +98,62 @@ $(window).on('resize', function(){
93 98
94 99
95 100
101
102 function animateValue(id, start, end, duration) {
103 var start= 0 ;
104
105 // here we retrieve the text of the 'target' element by its 'id',
106 // and convert the returned value into a number, using
107 // parseInt(); the first argument is the string to convert and
108 // the second is the numeric base of the number into which you
109 // want to convert the given numeric string:
110 var end = parseInt(document.getElementById(id).textContent, 10);
111 var duration = 500;
112 var range = end - start;
113 var current = start;
114 var increment = end > start? 1 : -1;
115 var stepTime = Math.abs(Math.floor(duration / range));
116 var obj = document.getElementById(id);
117 var timer = setInterval(function() {
118 current += increment;
119 obj.innerHTML = current;
120 if (current == end) {
121 clearInterval(timer);
122 }
123 }, stepTime);
124 }
125
126 $(window).on('load resize scroll', function() {
127 // elementInViewport($('#number16'), 'number16');
128 // elementInViewport($('#number17'), 'number17');
129 elementInViewport($('#find-number'), 'find-number');
130 });
131
132 function elementInViewport(element, id) {
133 if (inViewport(element) && !$(element).hasClass('done')) {
134 animateValue(id ,0,0,5000);
135 $(element).addClass('done')
136 }
137 }
138
139 function inViewport(element) {
140 if (typeof jQuery === "function" && element instanceof jQuery) {
141 element = element[0];
142 }
143 var elementBounds = element.getBoundingClientRect();
144 return (
145 elementBounds.top >= 0 &&
146 elementBounds.left >= 0 &&
147 elementBounds.bottom <= $(window).height() &&
148 elementBounds.right <= $(window).width()
149 );
150 }
151
152
153
154
155
156
157
158
96 }); 159 });
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 Author: the Understrap Contributors 5 Author: the Understrap Contributors
6 Author URI: https://github.com/understrap/understrap-child/graphs/contributors 6 Author URI: https://github.com/understrap/understrap-child/graphs/contributors
7 Template: understrap 7 Template: understrap
8 Version: 1.1.37 8 Version: 1.1.38
9 License: GNU General Public License v2 or later 9 License: GNU General Public License v2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 Text Domain: understrap-child 11 Text Domain: understrap-child
......