123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- $(() => {
- const skip = localStorage.getItem('skip-splash');
- if (skip && skip == 'true') {
- unsplash();
- } else {
- if (skip == null) {
- localStorage.setItem('skip-splash', true);
- }
- $('#splash-logo').removeClass('hide');
- const loaderInterval = loader();
- setTimeout(() => {
- $('#splash-loader').removeClass('hide');
- }, 200);
-
- $('#splash-line-1').removeClass('hide').addClass('anim-typewriter');
- $('#splash-line-1').one('animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function() {
- $('#splash-line-2').removeClass('hide').addClass('anim-typewriter');
- });
- $('#splash-line-2').one('animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function() {
- $('#splash-line-3').removeClass('hide').addClass('anim-typewriter');
- });
- $('#splash-line-3').one('animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function() {
- clearInterval(loaderInterval);
- unsplash();
- });
- }
- });
- const spinner = {
- interval:80,
- frames:[
- "[ ]",
- "[= ]",
- "[== ]",
- "[=== ]",
- "[==== ]",
- "[===== ]",
- "[ ===== ]",
- "[ ===== ]",
- "[ =====]",
- "[ ====]",
- "[ ===]",
- "[ ==]",
- "[ =]",
- "[ ]",
- "[ =]",
- "[ ==]",
- "[ ===]",
- "[ ====]",
- "[ =====]",
- "[ ===== ]",
- "[ ===== ]",
- "[===== ]",
- "[==== ]",
- "[=== ]",
- "[== ]",
- "[= ]"]
- }
- function loader() {
- const grid = document.getElementById('splash-loader')
- const spin = document.createElement('div');
- spin.innerText = spinner.frames[0];
- grid.appendChild(spin);
- let i = 0;
- return setInterval(() => {
- requestAnimationFrame(() => {
- spin.innerHTML = spinner.frames[++i % spinner.frames.length];
- });
- }, spinner.interval);
- }
- function unsplash() {
- const showPage = localStorage.getItem('show-page');
- if (showPage && showPage == 'true') {
- $('#splash').addClass('none');
- } else {
- if (showPage == null) {
- localStorage.setItem('show-page', false);
- }
- fullscreen(false);
- setTimeout(() => {
- $('#splash').addClass('none');
- $('#close-fs').toggleClass('hide');
- }, 200);
- }
- }
|