mirror of
https://github.com/LBRYFoundation/lbryorg.git
synced 2025-08-23 20:47:23 +00:00
feat: drop parallax.js in favor of custom parallax code
This commit is contained in:
parent
c2b334d60b
commit
1455ac4a4f
2 changed files with 10 additions and 6 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
// Parallax
|
||||||
|
const depthFactor = 10; // Depth of the image wrt to the 0 z-index. 1 being at the same distance as the rest of the content and Infinity being as far away as possible.
|
||||||
|
$(window).on('scroll', () => {
|
||||||
|
const movedBy = window.scrollY;
|
||||||
|
|
||||||
|
$('.parallax .parallax-img').css({
|
||||||
|
transform: `translateY(${movedBy / depthFactor}px)` // Move differently than the rest of the window
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// /Parallax
|
6
lib/js/parallax.min.js
vendored
6
lib/js/parallax.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue