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
| // codepen below | |
| // https://codepen.io/paulgwamanda/pen/EvbJzw | |
| // Initiate animations | |
| // @Todo: optimise | |
| var initAnimations = function() { | |
| var $animatable = $('.revealOnScroll'); | |
| $animatable.each( function() { | |
| var pathLength = this.getTotalLength(); |
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
| $('ul.nav li.dropdown').hover(function() { | |
| $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); | |
| }, function() { | |
| $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); | |
| }); |
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
| //Scroll progress bar | |
| $(document).ready(function() { | |
| $(window).on('scroll', function() { | |
| var docHeight = $(document).height(), | |
| winHeight = $(window).height(); | |
| var viewport = docHeight - winHeight, | |
| positionY = $(window).scrollTop(); | |
| var indicator = ( positionY / (viewport)) * 100; | |
| $('.scroll-bar').css('width', indicator + '%'); | |
| }); |
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 smooth scroll animation to page | |
| $(document).ready(function(){ | |
| $('a[href^="#"]').on('click',function (e) { | |
| e.preventDefault(); | |
| var target = this.hash, | |
| $target = $(target); | |
| $('html, body').stop().animate({ | |
| 'scrollTop': $target.offset().top |
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
| WOW.prototype.addBox = function(element) { | |
| this.boxes.push(element); | |
| }; | |
| // Init WOW.js and get instance | |
| var wow = new WOW(); | |
| wow.init(); | |
| // Attach scrollSpy to .wow elements for detect view exit events, | |
| // then reset elements and add again for animation |
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
| /** | |
| * Check for any theme dependencies | |
| * | |
| * @return array | |
| */ | |
| function M247_check_theme_dependencies() { | |
| $missing = array(); | |
| $plugins = array( | |
| 'contact-form-7/wp-contact-form-7.php' => 'Contact Form 7', | |
| 'advanced-custom-fields/acf.php' => 'Advanced Custom Fields', |
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
| /** | |
| * Display template for post meta information. | |
| * | |
| */ | |
| function THEME_posted_on() | |
| { | |
| printf(__('Posted on <a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="byline"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>','M247'), | |
| esc_url(get_permalink()), | |
| esc_attr(get_the_time()), | |
| esc_attr(get_the_date('c')), |