This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Add extra CSS classes to animate the site-container | |
add_filter('genesis_attr_site-container', 'susanta_animate_site_container'); | |
function susanta_animate_site_container($attributes) { | |
$attributes['class'] .= ' animate-site-container fadeUp'; | |
return $attributes; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Animate Site Container - Keyframes | |
------------------------------------------------------------ */ | |
.animate-site-container { | |
animation-delay: .7s; | |
animation-duration: 1s; | |
animation-fill-mode: both; | |
} | |
/* fadeIn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
//* Make sure JS is enabled | |
document.documentElement.className = "js"; | |
$(document).ready( function() { | |
//* Run 0.25 seconds after document ready for any instances viewable on load | |
setTimeout( function() { | |
animateObject(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fadeup Effect | |
---------------------------------------------------------------------------------------------------- */ | |
.js .fadeup-effect { | |
opacity: 0; | |
overflow: hidden; | |
-webkit-animation-duration: 1s; | |
animation-duration: 1s; | |
-webkit-animation-fill-mode: both; | |
animation-fill-mode: both; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Register a new widget area (this code snippet should go in functions.php) | |
genesis_register_widget_area( | |
array( | |
'id' => "your-widget-area", | |
'name' => __( "Your Widget", 'your-theme-text-domain' ), | |
'description' => __( "This is Your Widget Area section.", 'your-theme-text-domain' ), | |
) | |
); | |
// Display Widget Area (this code snippet should go in front.php) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_enqueue_script( 'fadeup-script', get_stylesheet_directory_uri() . '/js/fadeup.js', array( 'jquery' ), '1.0.0', true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adding Classes and Attributes to HTML elements in Genesis | |
// Courtesy: https://wpbeaches.com/adding-attribute-html-section-genesis/ | |
//* Add class to .entry | |
add_filter( 'genesis_attr_entry', 'susanta_animate_entry' ); | |
function susanta_animate_entry( $attributes ) { | |
$attributes['class'] = $attributes['class']. ' animate-entry fadeUp'; | |
return $attributes; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Effect 2: Move Up */ | |
.animate-entry { | |
-webkit-transform: translateY(200px); | |
transform: translateY(200px); | |
-webkit-animation: moveUp 0.65s ease forwards; | |
animation: moveUp 0.65s ease forwards; | |
} | |
@-webkit-keyframes moveUp { |