_header_menu.js 1.55 KB
import { Responsive } from "./_responsive";

var HeaderMenu = (function() {

    return {
        alignTheSideCaptions:function() {
            jQuery('.side-caption').each(function() {
                var that = this;
                var _bottom = jQuery(this).find('.image-side-caption').innerHeight();
                if(!Responsive.isDesktop()) {
                    if(jQuery(that).parent().is('.entry-header') && !jQuery(that).parent().is('.no-photo')) {
                        jQuery(that).css('margin-bottom', -_bottom);
                        var _bottom = jQuery(that).parent().find('.title-container').innerHeight();
                        jQuery(that).css('bottom', _bottom);
                        setTimeout(function() {
                            jQuery(that).addClass('ready');
                        }, 500);
                    } else {
                        jQuery(that).css('bottom', -_bottom);
                        setTimeout(function() {
                            jQuery(that).addClass('ready');
                        }, 500);
                    }
                } else {
                    jQuery(this).css('bottom', -_bottom);
                    setTimeout(function() {
                        jQuery(that).addClass('ready');
                    }, 500);
                }
            });
        }
    }

})();





jQuery(function($) {



    setInterval(function() {
        HeaderMenu.alignTheSideCaptions();
    }, 1000);

    $('.copy-link').on('click', function(e) {
        e.preventDefault();
        
    });



});

export { HeaderMenu };