diff options
| author | Bobby <[email protected]> | 2022-04-21 16:44:29 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-04-21 16:44:29 -0400 |
| commit | fba7b92e3bb57dfb0805773545a4b5d58104a983 (patch) | |
| tree | 5c40d945d6fe2c81e9cdd564bc970c6df3c19484 /static/assets/js/bootstrap-386.js | |
| parent | c0c3d6ef17574a8695121f8a6a63e8a521e54fef (diff) | |
| download | luciferreeves.github.io-fba7b92e3bb57dfb0805773545a4b5d58104a983.tar.xz luciferreeves.github.io-fba7b92e3bb57dfb0805773545a4b5d58104a983.zip | |
Coming soon page
Diffstat (limited to 'static/assets/js/bootstrap-386.js')
| -rw-r--r-- | static/assets/js/bootstrap-386.js | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/static/assets/js/bootstrap-386.js b/static/assets/js/bootstrap-386.js deleted file mode 100644 index f758634..0000000 --- a/static/assets/js/bootstrap-386.js +++ /dev/null @@ -1,111 +0,0 @@ -self._386 = self._386 || {}; - -$(function(){ - var character = { height: 20, width: 12.4 }; - - function scrollLock() { - var last = 0; - $(window).bind('scroll', function(e) { - var func, off = $(window).scrollTop(); - - console.log(off, last, off < last ? "up" : "down"); - - // this determines whether the user is intending to go up or down. - func = off < last ? "floor" : "ceil"; - - // make sure we don't run this from ourselves - if(off % character.height === 0) { - return; - } - last = off; - - window.scrollTo( - 0, - Math[func](off / character.height) * character.height - ); - - }); - } - - function loading() { - - if(_386.fastLoad) { - document.body.style.visibility='visible'; - return; - } - - var - onePass = _386.onePass, - speedFactor = 1 / (_386.speedFactor || 1) * 165000; - wrap = document.createElement('div'), - bar = wrap.appendChild(document.createElement('div')), - - cursor = document.createElement('div'), - // If the user specified that the visibility is hidden, then we - // start at the first pass ... otherwise we just do the - // cursor fly-by - pass = ($(document.body).css('visibility') == 'visible') ? 1 : 0, - height = $(window).height(), - width = $(window).width(), - - // this makes the loading of the screen proportional to the real-estate of the window. - // it helps keep the cool sequence there while not making it waste too much time. - rounds = (height * width / speedFactor), - column = width, row = height - character.height; - - wrap.id = "wrap386"; - bar.id = "bar386"; - cursor.id = "cursor386"; - - cursor.innerHTML = bar.innerHTML = '▄'; - - // only inject the wrap if the pass is 0 - if(pass === 0) { - document.body.appendChild(wrap); - document.body.style.visibility='visible'; - } else { - document.body.appendChild(cursor); - rounds /= 2; - character.height *= 4; - } - - var ival = setInterval(function(){ - for(var m = 0; m < rounds; m++) { - column -= character.width; - - if(column <= 0) { - column = width; - row -= character.height; - } - if(row <= 0) { - pass++; - row = height - character.height; - - if(pass == 2) { - document.body.removeChild(cursor); - clearInterval(ival); - } else { - wrap.parentNode.removeChild(wrap); - if(onePass) { - clearInterval(ival); - } else { - document.body.appendChild(cursor); - rounds /= 2; - character.height *= 4; - } - } - } - - if(pass === 0) { - bar.style.width = column + "px"; - wrap.style.height = row + "px"; - } else { - cursor.style.right = column + "px"; - cursor.style.bottom = row + "px"; - } - } - }, 1); - } - loading(); -}); - |
