main
|
Last change
on this file since 91c0a39 was 8453812, checked in by roboburr <roboburr@…>, 3 months ago |
|
Branding: 100% PrutCMS/PrutFolio-free — Klonkt as original product
All fork/lineage references (README, package description, server/comments,
PrutFolio-as-noun -> Klonkt-site) removed. Plus a small, mysterious wink
at a certain Bart in CircleFederation.js. Internal package name (prutfolio)
+ PWA id + server paths left untouched (stability).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>
|
-
Property mode
set to
100644
|
|
File size:
641 bytes
|
| Rev | Line | |
|---|
| [8453812] | 1 | /* Klonkt — Lenis smooth wheel scroll init (desktop only) */
|
|---|
| [b5bae24] | 2 | (function () {
|
|---|
| 3 | if (typeof Lenis === "undefined") return;
|
|---|
| 4 | // Skip op touch/mobile — native momentum is beter dan JS lib
|
|---|
| 5 | var isMobile = window.matchMedia("(pointer: coarse)").matches || window.innerWidth < 1024;
|
|---|
| 6 | if (isMobile) return;
|
|---|
| 7 | var lenis = new Lenis({
|
|---|
| 8 | duration: 1.0,
|
|---|
| 9 | easing: function (t) { return Math.min(1, 1.001 - Math.pow(2, -10 * t)); },
|
|---|
| 10 | smoothWheel: true,
|
|---|
| 11 | wheelMultiplier: 1.0,
|
|---|
| 12 | touchMultiplier: 2.0,
|
|---|
| 13 | });
|
|---|
| 14 | function raf(time) { lenis.raf(time); requestAnimationFrame(raf); }
|
|---|
| 15 | requestAnimationFrame(raf);
|
|---|
| 16 | window.lenis = lenis;
|
|---|
| 17 | })();
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.