[arcade] Cards now tilt!

This commit is contained in:
Max Wofford 2024-05-30 20:29:48 -04:00
parent 0a0f80b634
commit 4628de630e
2 changed files with 9 additions and 0 deletions

View file

@ -49,6 +49,12 @@
document.querySelector('.item-list').appendChild(el)
})
const elements = document.querySelectorAll(".cell");
VanillaTilt.init(elements, {
scale: 1.05,
easing: "cubic-bezier(.03,.98,.52,.99)",
})
document.querySelector('.item-list > .loading').classList.add('display-none')
})
</script>
@ -108,5 +114,7 @@
</div>
</div>
</body>
<!-- Intentionally loaded last -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-tilt/1.8.1/vanilla-tilt.js" integrity="sha512-0eckjEcIDNlyXFNRAL2Kecw71G5Df+nI2kazjvQrH/DZEHYOdy0UnP0gAlQGZMq4ZOOHpc2eYG15N3JZDA6pGg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</html>

View file

@ -141,6 +141,7 @@ button {
position: relative;
display: inline-block;
margin: 0.5em;
cursor: pointer;
}
.name {