Skip to content

Commit

Permalink
Make scroll reveal effects play only once
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWillCom committed Jul 25, 2024
1 parent 0fac982 commit 30cad68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/loud-lamps-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hexo-theme-cupertino': patch
---

Make scroll reveal effects play only once.
2 changes: 1 addition & 1 deletion layout/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<script src="https://unpkg.com/scrollreveal"></script>
<script>
window.addEventListener('load', () => {
ScrollReveal({ delay: 250, reset: true, easing: 'cubic-bezier(0, 0, 0, 1)' })
ScrollReveal({ delay: 250, easing: 'cubic-bezier(0, 0, 0, 1)' })
ScrollReveal().reveal('.post-list-item .cover-img img')
ScrollReveal().reveal('.post-list-item, .card, .content p img, .content .block-large img', { distance: '60px', origin: 'bottom', duration: 800 })
})
Expand Down

0 comments on commit 30cad68

Please sign in to comment.