Lots of fancy animations

- Tilt
- Parallax
- Animated Text
This commit is contained in:
Martin Prokoph
2025-01-04 19:14:05 +01:00
parent bee4d10f44
commit 7a0f88ee98
8 changed files with 104 additions and 12 deletions

View File

@@ -70,7 +70,6 @@ const {
// sticky footer on low content pages
html,
body {
height: 100%;
overflow-x: hidden;
}
@@ -110,3 +109,17 @@ const {
</style>
</body>
</html>
<script>
import Rellax from 'rellax';
function initRellax() {
var rellax = new Rellax('.rellax', {
center: true
});
}
initRellax();
document.addEventListener('astro:after-swap', () => {
initRellax();
})
</script>