Commit Graph

20 Commits

Author SHA1 Message Date
c7b67b909c Use Swell REST API for fetching products 2022-09-18 17:10:06 +02:00
b66db25942 🚧 Switch to swell-js to handle Shop cart
swell-node was relying too much on Node packages like crypto or events to be used with Cloudflare Pages or Vercel Edge Functions
2022-09-18 12:14:43 +02:00
07060c8661 Use copy email to clipboard as an action
Returns an event with the email to detect for value and timeouts
2022-09-14 13:28:58 +02:00
6e904850aa 🚧 Migrate env variables to use internal SvelteKit system
Some API fetching function rewriting needed as privates cannot be included into public code
2022-08-16 16:58:57 +02:00
5e5c08ddd1 🚧 Migrate to new SvelteKit routing system
A bit annoying but for the best I guess?
2022-08-16 15:54:15 +02:00
8524a83199 Move easings into global file 2022-08-13 23:38:59 +02:00
222db0c478 Move types to global app file 2022-08-13 23:38:06 +02:00
be0c58c744 Code cleanup and add types on stores 2022-07-26 23:42:41 +02:00
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
75f3e5f1d1 Get a category of products from Swell 2021-11-08 13:53:06 +01:00
378a64f2b0 Add product to cart from anywhere
Make a global function that adds a product to the current cart
2021-11-08 13:00:31 +01:00
5141198167 Move functions to directory 2021-11-08 12:14:39 +01:00