Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jeff Balicki
/
FP_Canada
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ee6c8d0c
authored
2022-01-18 13:54:44 -0500
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
greensock
1 parent
22db71bb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
2 deletions
wp-content/themes/understrap-child/global-templates/numbers_hero.php
wp-content/themes/understrap-child/inc/enqueue.php
wp-content/themes/understrap-child/js/TweenMax.min.js
wp-content/themes/understrap-child/js/custom-javascript.js
wp-content/themes/understrap-child/js/gsap-latest-beta.min.js
wp-content/themes/understrap-child/style.css
wp-content/themes/understrap-child/global-templates/numbers_hero.php
View file @
ee6c8d0
...
...
@@ -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>
...
...
wp-content/themes/understrap-child/inc/enqueue.php
View file @
ee6c8d0
...
...
@@ -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'
);
...
...
wp-content/themes/understrap-child/js/TweenMax.min.js
0 → 100644
View file @
ee6c8d0
This diff could not be displayed because it is too large.
wp-content/themes/understrap-child/js/custom-javascript.js
View file @
ee6c8d0
...
...
@@ -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
...
...
wp-content/themes/understrap-child/js/gsap-latest-beta.min.js
0 → 100644
View file @
ee6c8d0
This diff is collapsed.
Click to expand it.
wp-content/themes/understrap-child/style.css
View file @
ee6c8d0
...
...
@@ -5,7 +5,7 @@
Author: the Understrap Contributors
Author URI: https://github.com/understrap/understrap-child/graphs/contributors
Template: understrap
Version: 1.1.0
5
Version: 1.1.0
6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap-child
...
...
Please
register
or
sign in
to post a comment