diff --git a/astros/static/astros/css/registration_style.css b/astros/static/astros/css/registration_style.css index a86e690d..6cddda1b 100644 --- a/astros/static/astros/css/registration_style.css +++ b/astros/static/astros/css/registration_style.css @@ -10,6 +10,18 @@ border-color: #333; /* ending color (same as starting color) */ } } +#preloader { + background: #000 url('../images/cool_mars_gif.gif') no-repeat center center; + background-size: 15%; + height: 100vh; + width: 100vw; + position: fixed; + z-index:100; +} +#preloader.hide { + display: none; +} + .input-code { /* Initial border setup */ @@ -21,7 +33,7 @@ body.body { background-color: black !important; color:white; - overflow: hidden; /*To hide Scroll Bar*/ + overflow: visible; /*To hide Scroll Bar*/ } .landing-container { diff --git a/astros/static/astros/css/style.css b/astros/static/astros/css/style.css index db413703..b32c7283 100644 --- a/astros/static/astros/css/style.css +++ b/astros/static/astros/css/style.css @@ -8,6 +8,19 @@ src: url('../fonts/aileron-regular.otf') format('truetype'); /* Add additional src lines for other font formats if necessary */ } + +#preloader { + background: #000 url('../images/loader.gif') no-repeat center center; + background-size: 15%; + height: 100vh; + width: 100vw; + position: fixed; + z-index:100; +} +#preloader.hide { + display: none; +} + body.body { background-color: white !important; color:black; diff --git a/astros/static/astros/images/cool_gif.gif b/astros/static/astros/images/cool_gif.gif new file mode 100644 index 00000000..27792228 Binary files /dev/null and b/astros/static/astros/images/cool_gif.gif differ diff --git a/astros/static/astros/images/cool_mars_gif.gif b/astros/static/astros/images/cool_mars_gif.gif new file mode 100644 index 00000000..052aa755 Binary files /dev/null and b/astros/static/astros/images/cool_mars_gif.gif differ diff --git a/astros/static/astros/images/loader.gif b/astros/static/astros/images/loader.gif new file mode 100644 index 00000000..5c64db74 Binary files /dev/null and b/astros/static/astros/images/loader.gif differ diff --git a/astros/static/astros/images/preload_image.jpg b/astros/static/astros/images/preload_image.jpg new file mode 100644 index 00000000..dbbf6efb Binary files /dev/null and b/astros/static/astros/images/preload_image.jpg differ diff --git a/astros/static/astros/images/preloader_gif.gif b/astros/static/astros/images/preloader_gif.gif new file mode 100644 index 00000000..b1f75510 Binary files /dev/null and b/astros/static/astros/images/preloader_gif.gif differ diff --git a/astros/static/astros/js/registration.js b/astros/static/astros/js/registration.js index 3b13ae1d..29ccdb79 100644 --- a/astros/static/astros/js/registration.js +++ b/astros/static/astros/js/registration.js @@ -2,6 +2,7 @@ document.addEventListener('DOMContentLoaded',()=>{ const submitBtns = document.querySelectorAll('.submit-btn-register'); const forgotPLinks = document.querySelectorAll('.forgot-password-link'); +const preloader = document.querySelector('#preloader'); if(forgotPLinks != null){ forgotPLinks.forEach((fp)=>{ const mformDiv = fp.closest('.main-form'); @@ -85,6 +86,7 @@ submitBtns.forEach((submitBtn)=>{ } if(authenticationArea.classList.contains('closed')){ + preloader.classList.remove('hide'); fetch('/authentification/generate_code', { method: 'POST', headers: { 'X-CSRFToken': getCookie('csrftoken') }, @@ -94,13 +96,14 @@ submitBtns.forEach((submitBtn)=>{ }) .then(response => response.json()) .then(result => { + preloader.classList.add('hide'); alert(result.message); if(result.success){ authenticationArea.style.display='block'; authenticationArea.classList.remove('closed'); } }); - submitBtn.scrollIntoView({behavior: 'smooth'}); + submitBtn.scrollIntoView({behavior: 'smooth'}); }else { fetch('/authentification/validate_code', { method: 'POST', diff --git a/astros/templates/astros/layout.html b/astros/templates/astros/layout.html index 3ee2f909..87987bdc 100644 --- a/astros/templates/astros/layout.html +++ b/astros/templates/astros/layout.html @@ -14,6 +14,7 @@ +