From c2e5f7c8ec4d8d784505d9a8b386fb4dae97f810 Mon Sep 17 00:00:00 2001 From: conradolandia Date: Tue, 12 Mar 2024 16:56:38 -0500 Subject: [PATCH 1/3] Fix loading issue with hero-image on JS --- assets/static/js/main-singlelayout.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/static/js/main-singlelayout.js b/assets/static/js/main-singlelayout.js index a38b51b..471e100 100644 --- a/assets/static/js/main-singlelayout.js +++ b/assets/static/js/main-singlelayout.js @@ -36,7 +36,7 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt const setHeroHeight = function () { heroHeight(); - $(window).on("resize", heroHeight); + $(window).bind("resize", heroHeight); }; // Loading animation @@ -168,7 +168,6 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt // Document on DOM ready $(function () { - setHeroHeight(); loaderPage(); fh5coTabs(); parallax(); @@ -179,4 +178,9 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt setMailchimpEvent(); } }); + + // Document when all assets are fully loaded + $(window).bind("load", function () { + setHeroHeight(); + }); })(); From 4be5cc73da8a06a748d5437d71d5eb42622d391a Mon Sep 17 00:00:00 2001 From: conradolandia Date: Tue, 19 Mar 2024 18:30:44 -0500 Subject: [PATCH 2/3] Change the function to correct the hero size --- assets/static/js/main-singlelayout.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/assets/static/js/main-singlelayout.js b/assets/static/js/main-singlelayout.js index 471e100..d00eae8 100644 --- a/assets/static/js/main-singlelayout.js +++ b/assets/static/js/main-singlelayout.js @@ -36,7 +36,8 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt const setHeroHeight = function () { heroHeight(); - $(window).bind("resize", heroHeight); + $(window).on("load", heroHeight); + $(window).on("resize", heroHeight); }; // Loading animation @@ -171,6 +172,7 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt loaderPage(); fh5coTabs(); parallax(); + setHeroHeight(); scrolledWindow(); clickMenu(); navigationSection(); @@ -178,9 +180,4 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt setMailchimpEvent(); } }); - - // Document when all assets are fully loaded - $(window).bind("load", function () { - setHeroHeight(); - }); })(); From 0f623ea0c6e6ee808865c6644d699daaab167ed1 Mon Sep 17 00:00:00 2001 From: conradolandia Date: Wed, 20 Mar 2024 19:24:00 -0500 Subject: [PATCH 3/3] Fix issue with hero image, attempt 2 --- assets/static/js/main-singlelayout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/static/js/main-singlelayout.js b/assets/static/js/main-singlelayout.js index d00eae8..9a18070 100644 --- a/assets/static/js/main-singlelayout.js +++ b/assets/static/js/main-singlelayout.js @@ -169,10 +169,10 @@ https://github.com/spyder-ide/lektor-icon/blob/master/NOTICE.txt // Document on DOM ready $(function () { + setHeroHeight(); loaderPage(); fh5coTabs(); parallax(); - setHeroHeight(); scrolledWindow(); clickMenu(); navigationSection();