under_construction/js/resizible.js

40 lines
910 B
JavaScript
Raw Normal View History

2023-11-02 17:48:06 +00:00
// JavaScript Document
$(document).ready(function(){
var $ka = 4.6055;
var $kc = 3.15;
var $h = $(window).height();
var $a = $('#uc-block');
var $b = $('#uc-block .block-height');
var $c = $('#wrap-pages');
var $i = $('#social-icons');
function resize() {
var $ha = Math.round($h / $ka);
if($ha < 128) { $ha = 128; }
var $pb = Math.round(($ha - $b.height()) / 2 - 4);
var $hc = Math.round($h / $kc);
if($hc < 250) { $hc = 250; }
$a.height($ha);
$b.css('padding-top', $pb);
$c.height($hc);
if($h < 565) {
$i.removeClass('social-icons-absolute').css('margin-left', 'auto');
}
else {
$i.addClass('social-icons-absolute').css('margin-left', -1 * Math.round($i.width() / 2));
}
}
$(window).resize(function(){
$h = $(window).height();
resize();
});
resize();
});