Site URL: https://jhuynhdesign.com
Dear Squarespace team,On my website, I have set up a "splash screen", which is a GIF that animates off the page. I only want this animation to appear the first time the homepage is initially loaded.
My first problem was that this animation would appear anytime I tried to navigate to a new page on the website, but I then realized it was because I applied the code in the site wide code injector. I then removed it from there and injected it to just my "work" page, but it has a portfolio layout on the page. Which then leads to the animation being displayed every time a new project page is clicked on. Is there a way to just have it load on the first "work" page and not the corresponding project pages within it? Is there a better place to put the code and add additional code to have it play only once on the initial homepage load?
FYI to set up the splash screen, I currently use the code below injected into the advanced page settings of my "Work" page(which is the portfolio layout) .thanks!Jessica
<div class="splash-wrapper">
<img src="https://static1.squarespace.com/static/604960c8e5cc251ac72ff9f5/t/60b741b47e6b260d3ca3fb2b/1622622645566/wordmark-transparent-final.gif" width="500" height="auto"></img>
</div>
<style>
.splash-wrapper{
position: fixed;
z-index: 9999;
background-color: #ffffff;
height: 100vh;
width: 100vw;
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
animation-name: slideOut;
animation-fill-mode: forwards;
animation-duration: 2s;
animation-delay: 3.375s;
}
@keyframes slideOut{
from{margin-left: 0vw;}
to{margin-left: -150vw;}
}
</style>