6a66cdaf22
Use options parameters with types and default on smoothScroll function
2022-07-19 13:43:25 +02:00
ae4ea7f4fa
✨ Use smooth scroll function to navigate to anchor
...
Using a eased RAF function to scroll to a specific target
Avoid using `scrollIntoView` or smooth behavior as it doesn't work on Safari and others.
2022-07-11 16:42:34 +02:00
b7a857e2e6
🔥 Get 11 random published photos on the Homepage collage
...
Thanks to Directus help, this works!
Concept: fetch all published photos IDs only, get 11 random items and query these 11 IDs
Only 2 queries, one for the IDs and one for the photos
2022-06-13 15:53:42 +02:00
cfd6173baf
Rename getRandomElement function to getRandomItem
2022-06-13 15:26:53 +02:00
d3f74be59e
Run page animations onMount instead of browser
2022-05-30 21:57:04 +02:00
cffef1835f
Fix Page transitions by using a hacky FOUC trick
...
Seems to work though!
2022-01-18 14:22:38 +01:00
7169faa3aa
Fix getRandomElement function
...
Now return an array item instead of an index
2021-11-28 23:06:22 +01:00
4c43e1458e
Don't scroll back to top when changing Photos and Shop products pages
2021-11-21 22:43:24 +01:00
52c1916c27
Rename Lerp function amount argument
2021-11-11 23:03:51 +01:00
5141198167
Move functions to directory
2021-11-08 12:14:39 +01:00