Commit 24b989f9 authored by Marne's avatar Marne

Upload New File

parent e86baad6
Pipeline #2396 canceled with stages
var header = document.getElementById("header");
var title = document.getElementById("title");
var content = document.getElementById("container");
var minPad = 20;
header.style.position = "fixed";
function resize()
{
pad = window.innerHeight*.28 - title.clientHeight/2;
content.style.marginTop = window.innerHeight*2/3 + "px";
content.style.paddingTop = window.innerHeight*2/5 + "px";
scroll();
}
function scroll()
{
var scrolled = document.documentElement.scrollTop;
var top = pad - scrolled;
var bottom = pad*2 - scrolled;
header.style.paddingTop = ( top < minPad ? minPad : top ) + "px";
header.style.paddingBottom = ( bottom < minPad ? minPad : ( pad < bottom ? pad : bottom ) ) + "px";
}
onresize = resize;
onscroll = scroll;
resize();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment