Skip to content

Commit

Permalink
feat(news): add animations to news page
Browse files Browse the repository at this point in the history
  • Loading branch information
SethBurkart123 committed Nov 29, 2024
1 parent 5ed3a05 commit 88d4d3a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/SEQTA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,16 @@ export async function SendNewsPage() {

// Single DOM update to append all articles
newscontainer?.append(fragment)

if (!settingsState.animations) return;

const articles = Array.from(document.querySelectorAll('.NewsArticle'))

animate(
articles.slice(0, 20),
{ opacity: [0, 1], y: [10, 0], scale: [0.99, 1] },
{ delay: stagger(0.1), type: 'spring', stiffness: 341, damping: 20, mass: 1 }
)
}

async function CheckForMenuList() {
Expand Down

0 comments on commit 88d4d3a

Please sign in to comment.