diff --git a/assets/vendor/astroid/scss/utilities/_animations.scss b/assets/vendor/astroid/scss/utilities/_animations.scss index ab63bfd7..44e223d2 100644 --- a/assets/vendor/astroid/scss/utilities/_animations.scss +++ b/assets/vendor/astroid/scss/utilities/_animations.scss @@ -1,3 +1,7 @@ +.as-transition-body { + transition: all 300ms; +} + @-webkit-keyframes slideInUp { from { -webkit-transform: translate3d(0, 100%, 0); diff --git a/js/colortransform.js b/js/colortransform.js index 932f8aba..fc6b1107 100644 --- a/js/colortransform.js +++ b/js/colortransform.js @@ -1,5 +1,8 @@ (function ($) { - window.addEventListener("load", (event) => { + $(document).ready(function (){ + $('body').addClass('as-transition-body'); + }) + $(window).on('load', function () { window.onscroll = function(ev) { if ((window.innerHeight + window.scrollY) >= document.body.scrollHeight * (ASTROID_COLOR_TRANSFORM.offset/100)) { if ($('html').attr('data-bs-theme') === ASTROID_COLOR_TRANSFORM.from) { @@ -11,5 +14,5 @@ } } }; - }); + }) }(jQuery)); \ No newline at end of file diff --git a/js/colortransform.min.js b/js/colortransform.min.js index fddabdcd..e10b3032 100644 --- a/js/colortransform.min.js +++ b/js/colortransform.min.js @@ -1 +1 @@ -(function($){window.addEventListener("load",event=>{window.onscroll=function(ev){if(window.innerHeight+window.scrollY>=document.body.scrollHeight*(ASTROID_COLOR_TRANSFORM.offset/100)){if($("html").attr("data-bs-theme")===ASTROID_COLOR_TRANSFORM.from){$("html").attr("data-bs-theme",ASTROID_COLOR_TRANSFORM.to)}}else{if($("html").attr("data-bs-theme")===ASTROID_COLOR_TRANSFORM.to){$("html").attr("data-bs-theme",ASTROID_COLOR_TRANSFORM.from)}}}})})(jQuery); \ No newline at end of file +(function($){$(document).ready(function(){$("body").addClass("as-transition-body")});$(window).on("load",function(){window.onscroll=function(ev){if(window.innerHeight+window.scrollY>=document.body.scrollHeight*(ASTROID_COLOR_TRANSFORM.offset/100)){if($("html").attr("data-bs-theme")===ASTROID_COLOR_TRANSFORM.from){$("html").attr("data-bs-theme",ASTROID_COLOR_TRANSFORM.to)}}else{if($("html").attr("data-bs-theme")===ASTROID_COLOR_TRANSFORM.to){$("html").attr("data-bs-theme",ASTROID_COLOR_TRANSFORM.from)}}}})})(jQuery); \ No newline at end of file