This commit is contained in:
2025-11-07 13:34:32 -08:00
commit 1e8c5a972b
436 changed files with 11000 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { Turbo } from "@hotwired/turbo-rails"
Turbo.StreamActions.scroll_into_view = function() {
const animation = this.getAttribute("animation")
const element = this.targetElements[0]
element.scrollIntoView({ behavior: "smooth", block: "center" })
if (animation) {
element.addEventListener("animationend", () => {
element.classList.remove(animation)
}, { once: true })
element.classList.add(animation)
}
}