ee6c8d0c by Jeff Balicki

greensock

1 parent 22db71bb
......@@ -14,7 +14,10 @@ defined( 'ABSPATH' ) || exit;
<defs>
<style>
.cls-1 {
fill: rgba(255,255,255,0.07);
fill: rgb(255,255,255);
}
g{
opacity:0.07;
}
</style>
</defs>
......
......@@ -35,6 +35,7 @@ if ( ! function_exists( 'understrap_scripts' ) ) {
$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( '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' );
......
This diff could not be displayed because it is too large.
......@@ -19,4 +19,36 @@ jQuery( document ).ready(function($) {
}
}, false );
var boxes = document.querySelectorAll("g");
var box = getShuffledArr(boxes);
function getShuffledArr (arr){
return [...arr].map( (_, i, arrCopy) => {
var rand = i + ( Math.floor( Math.random() * (arrCopy.length - i) ) );
[arrCopy[rand], arrCopy[i]] = [arrCopy[i], arrCopy[rand]]
return arrCopy[i]
})
}
box.forEach((element,i) => {
setTimeout(
function(){
animateMe(element)
}
, i * 1500);
});
function animateMe(box){
let tl = gsap.timeline();
tl.to(box, 1.5, {opacity:0.6})
.to(box, 1.5,{opacity:0.07})
}
function randomNumber(min, max) {
return Math.random() * (max - min) + min;
}
});
\ 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.05
Version: 1.1.06
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
......