From 88d4d3aa11cedec7c950eccfca3f1b9aabecd54c Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Fri, 29 Nov 2024 14:57:17 +1100 Subject: [PATCH] feat(news): add animations to news page --- src/SEQTA.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 74d9825..3e73108 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -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() {