A server is needed to calculate the sun's position from latitude + longitude + time, and then render the gradient. I could use HTML templating in some other language/framework, but I used Astro because that's what I'm familiar with and it's very easy to deploy to Cloudflare Pages.
To do it client-side, you would probably have to call some less-reputable IP geolocation service, or settle for navigator.geolocation which has a permission popup
A server is needed to calculate the sun's position from latitude + longitude + time, and then render the gradient. I could use HTML templating in some other language/framework, but I used Astro because that's what I'm familiar with and it's very easy to deploy to Cloudflare Pages.
it's beautiful. btw, could this be all done in client side js? didnt look at the implementation, probably server is used to resolve location?
(not author) from the source:
To do it client-side, you would probably have to call some less-reputable IP geolocation service, or settle for navigator.geolocation which has a permission popup
1 reply →
Astro is a great way to write HTML
I'm sure that's your totally unbiased opinion ;)
I was a fan of Astro long before I became a maintainer. That's why I joined!