-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1573 from ubyssey/nocturne
Nocturne
- Loading branch information
Showing
10 changed files
with
965 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
210 changes: 210 additions & 0 deletions
210
article/templates/article/supplements/article_page_supplement_2024_nocturne.html
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { gsap } from "gsap"; | ||
import { ScrollTrigger } from "gsap/ScrollTrigger"; | ||
|
||
gsap.registerPlugin(ScrollTrigger); | ||
|
||
let mm = gsap.matchMedia(); | ||
mm.add("(min-width: 1px), (min-height: 1px)", () => { | ||
var windowTriggers = gsap.utils.toArray('.window-trigger'); | ||
windowTriggers.forEach((wt) => { | ||
console.log(wt); | ||
gsap.to(wt, { | ||
scrollTrigger: {trigger: wt, start: "start center", end: "bottom center", scrub: true, | ||
onToggle: self => { | ||
document.getElementById("windows").children[parseInt(self.trigger.getAttribute("window"))].classList.toggle("lighted"); | ||
self.trigger.classList.toggle("highlight"); | ||
}, | ||
}, | ||
immediateRender: false, | ||
}); | ||
}) | ||
}); |
Oops, something went wrong.