Hi all, I am trying to import these codes for a loading screen on the Dawn theme. Can anyone help me with this?
Sample code: https://codepen.io/chrisgannon/pen/WNNJqXz
Website: www.ourthirsttrap.com
Password: ilovethirsttrap
Hi all, I am trying to import these codes for a loading screen on the Dawn theme. Can anyone help me with this?
Sample code: https://codepen.io/chrisgannon/pen/WNNJqXz
Website: www.ourthirsttrap.com
Password: ilovethirsttrap
Hi @thirsttrap ,
This is Amelia from PageFly - a Landing Page Builder App,
You can try to do some steps below to embed the loading animation to your page.
Navigate to Online Store > Themes.
Click on Actions > Edit code next to your Dawn theme.
Paste the HTML code into the loading-screen.liquid snippet.
In the Assets folder, open the theme.css or base.css file.
Add the CSS code from the CodePen example to the bottom of the file.
{% include 'loading-screen' %}
Note: When you add the Javascript from Codepen to the loading-screen.js file. You need to copy this code to the end of that file to make this work.
document.addEventListener('DOMContentLoaded', function() {
var loadingScreen = document.querySelector('.mainSVG');
window.addEventListener('load', function() {
loadingScreen.style.display = 'none';
});
});
I hope that my solution works for you.
Best regards,
Amelia | PageFly
off sitewide
July sale — 45% off at checkout, applied automatically. Valid for 60 minutes. One per customer.
Offer ends in