Live data from Hacker News

Show HN: The current sky at your approximate location, as a CSS gradient

sky.dlazaro.ca

21–30 of 171 posts

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#22

Curious why a celebration of HTML needed a full stack javascript framework?

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.

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#24

Awesome. I remember much earlier in my career I was working on a 3D turn-by-turn navigation software, and one of my tasks was to draw the sky in the background. The more senior guy on the team said, just draw a blue rectangle during the day and a dark gray one at night and call it job done. Of course, I had to do it the hard way, so I looked up the relevant literature on sky rendering based on the environment, latitu…

A past coworker who worked on Cobalt[1] told me that they spent entirely too much time implementing stars in the sky of the game with some amount of real(ish) star system physics behind them.

I can understand people removing polish things like that if there are usability concerns, but those small things add up to a lot in an end product and are a joy to find and explore.

1: https://en.wikipedia.org/wiki/Cobalt_(video_game)

Re: Show HN: The current sky at your approximate location, as a CSS gradient

#26
post #20

@dlazaro, I believe that style={{backgroundColor: bottom}} is not needed in: is not needed.

I actually included that so the tab and status bars are themed on iOS/Safari. Here's someone else's writeup on that: https://medium.com/@evkirkiles/coloring-the-webkit-browser-b...

That's a cool thing to know, thanks for sharing. Great job on the sky site!
Post reply on HN