Skip to content

Commit

Permalink
Merge pull request #1573 from ubyssey/nocturne
Browse files Browse the repository at this point in the history
Nocturne
  • Loading branch information
SamuelmdLow authored Dec 2, 2024
2 parents 81bfecd + 637610d commit 9964bf8
Show file tree
Hide file tree
Showing 10 changed files with 965 additions and 1 deletion.
3 changes: 3 additions & 0 deletions article/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,8 @@ def get_template(self, request):
return "article/article_page_supplement_2024_science.html"
elif self.layout == 'femme-2024':
return "article/supplements/article_page_supplement_2024_femme.html"
elif self.layout == 'nocturne-2024':
return "article/supplements/article_page_supplement_2024_nocturne.html"

return "article/article_page.html"

Expand Down Expand Up @@ -880,6 +882,7 @@ def get_template(self, request):
('guide-2024', 'Guide (2024 style)'),
('science-2024', 'Science Supplement (2024)'),
('femme-2024', 'Femme Culture Special Issue (2024)'),
('nocturne-2024', 'Nocturne Features Supplement (2024)'),
],
),
),
Expand Down

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
21 changes: 21 additions & 0 deletions ubyssey/static_src/src/js/nocturne-window-watching.js
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,
});
})
});
Loading

0 comments on commit 9964bf8

Please sign in to comment.