Skip to content

Instantly share code, notes, and snippets.

@maxcraftsman
Created March 29, 2018 10:13
Show Gist options
  • Save maxcraftsman/5016efdecbc82c5a0b3bf3edc2c64f9f to your computer and use it in GitHub Desktop.
Save maxcraftsman/5016efdecbc82c5a0b3bf3edc2c64f9f to your computer and use it in GitHub Desktop.
function displayCalc(e){
catetA = document.documentElement.clientWidth;
catetB = document.documentElement.clientHeight;
gipotenuza = Math.sqrt(Math.pow(catetA,2)+Math.pow(catetB,2));
alpha = Math.asin(catetB/gipotenuza);
degrees = alpha * 180 / Math.PI;
$("#top-cover, #bottom-cover").css('transform','rotate(-'+ degrees +'deg)');
var all = document.getElementsByTagName("*");
}
Pace.on('start',function(){
displayCalc();
$(".pace:before, .pace-progress").css("z-index","99999 !important");
})
Pace.on('done',function(){
$("#top-cover,#bottom-cover").css("transition","all 0.25s ease-in-out");
})
Pace.on('hide',function(){
$("#top-cover").css("bottom","100%");
$("#bottom-cover").css("bottom","-200%");
$(".pace").hide();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment