Delete main.js

This commit is contained in:
buffbears 2021-04-01 22:05:06 -04:00 committed by GitHub
parent d66cddc5dd
commit b81de8d728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 34 deletions

View File

@ -1,34 +0,0 @@
$(function(){
var $main = $("#main"),
$window = $( window ),
mainHeight = $main.outerHeight(),
mainWidth = $main.outerWidth(),
mainAspect = 4/3,
resizeTimer;
$(window).resize( function(e) {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(scaleWindow, 100);
});
function scaleWindow() {
var scale, windowAspect;
windowAspect = $window.width() / $window.height();
if (windowAspect>=mainAspect) {
scale = $window.height() / mainHeight;
} else {
scale = $window.width() / mainWidth;
}
$main.css({
transform: "translate(-50%, -50%) " + "scale(" + scale + ")"
});
}
scaleWindow(); // init
});