Live data from Hacker News

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

sky.dlazaro.ca

131–140 of 171 posts

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

#131
post #40
post #37

Earlier quoted context omitted.

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: const { latitude = "0", longitude = "0" } = Astro.locals.runtime.cf || {}; 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

Depending on how "approximate" is acceptable, I've found that using timezone names can be a good proxy for location. As most users have their timezones set correctly it's more consistent and private than IP or GPS.

I've made a library for my own use cases that does this (https://github.com/mcteamster/virgo), but it's also pretty straightforward to parse the city/state name out of the timezone and look it up somewhere.

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

#133
post #55

Earlier quoted context omitted.

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!

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

#134
post #13

Opened this up and sat there for a good 20 seconds waiting for something to happen... only to remember it's midnight here.

Suggestion for the author, I don't think there are any outdoor places where the sky is black. I don't know that gray would be any better. Stars? Some night clouds? or maybe even still a gradient?

https://www.google.com/search?sca_esv=58e7983bf9f21fcd&udm=2...

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

#136

Earlier quoted context omitted.

Yep, if you have to draw the Sun, you better draw it yellow. If you have to draw a cloudless day sky, you better draw it blue. That doesn't apply to every single instance of those, but if the sky isn't the focus of your application, a realistic one is just a distraction.

> Yep, if you have to draw the Sun, you better draw it yellow. This one always gets me in how dirty the sky must have been "back in the day" in order for people to see a yellow sun. I've never looked into what gas would be needed to make the sun look yellow, but it must have been hell to breathe.

The walls were black for a reason in big cities. All those chimneys and coal everywhere.

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

#138
This might be a stupid question, but is it the background of https://html.energy/html-day/2025/index.html that shows the current sky? I am a bit confused since neither the post or the github repo says so outright.

Edit: I think its this link: https://sky.dlazaro.ca/ OP - put it in the HN post and first on your github repo! Good work.

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

#140

Earlier quoted context omitted.

Whipping down the innovator with the stupidity whip. Great management

I've been in the developer's shoes. I've also been in the manager's shoes. It's not that simple. There's possibly better ways to deal with it, but for safety-critical stuff (like a navigation display in a vehicle), simple is much, much better. In many cases, there's actually laws and liability stuff involved. I once spent six months, developing an "un-asked-for" WiFi control app for a digital camera, and had it nuked…

There's so much decision making in companies that comes down to some dingus in management decided that it would Be Bad On Purpose. Fighting that battle is something you can try a few times in your career if you want, but it usually leads to burnout or a resume generating event.
Post reply on HN