Skip to content

Commit

Permalink
improve bgzoom anim, fix twice single img zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
haojiezhe12345 committed Jun 17, 2024
1 parent fb4c2c8 commit 97a7813
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ body>* {
17% {
opacity: 1;
transform: scale(1.15);
animation-timing-function: linear;
animation-timing-function: ease-out;
}

100% {
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,8 @@ const Theme = {
this.currentCaption = -1

this.getCurrentBgs()[0].classList.add('bgzoom')
this.timers.setTimeout(() => this.getCurrentBgs()[0].classList.remove('bgzoom'), 10500)
setOneTimeCSS(this.elements.captionContainer, { transition: 'none' })
this.elements.captionContainer.style.opacity = 0
setOneTimeCSS(this.elements.captionContainer, { transition: 'none' })

this.nextImg()
this.nextCaption()
Expand Down Expand Up @@ -1100,6 +1099,7 @@ const Theme = {
this.timers.setTimeout(() => {
bgs[prev].classList.remove('ready', 'animating')
bgs[next].classList.add('ready')
bgs[next].classList.remove('bgzoom')
bgs[next].firstElementChild.style.backgroundImage = `url("${bgurl}mainbg${next + 1}.jpg?2")`
}, 2500);
} catch (error) {
Expand Down

0 comments on commit 97a7813

Please sign in to comment.