Last active
August 15, 2019 02:28
-
-
Save JoseSoteloCohen/28f217947ac187a7d811755efa971f66 to your computer and use it in GitHub Desktop.
Blackout Fix: for Authority Pro 1.2.0 child theme for the Genesis Framework 3.0.2
This file contains 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
<script> | |
var $=jQuery.noConflict(); | |
var blackoutFix = $('<style id="blackoutFix">.ab-block-post-grid-image a::before, .authority-featured-image::before, .featuredpost .has-post-thumbnail > a::before { display:none; }</style>'); | |
function darkmode_fix(){ | |
$('.darkmode-toggle').click( | |
function() { | |
if ($('body').hasClass('darkmode--activated')) { | |
$('head').append(blackoutFix); | |
$('body > div.site-container > div.site-inner > div.authority-featured-image').css('z-index', '501'); | |
$('.ab-block-post-grid a').css('z-index', '501'); | |
$('#search-2').css('margin-top', '0px'); | |
}else{ | |
$('#blackoutFix').remove(); | |
$('body > div.site-container > div.site-inner > div.authority-featured-image').css('z-index', '-1'); | |
$('.ab-block-post-grid a').css('z-index', '0'); | |
$('#search-2').css('margin-top', '-60px'); | |
} | |
} | |
); | |
} | |
jQuery(document).ready(function($){ | |
darkmode_fix(); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment