Eddie Hinkle


Adding weather effects

It's only November and Maryland already has snow in the forecast for the next 24 hours! The last couple of weeks I worked on a new feature that has been enabled on my website today. Every 20 minutes my location and the weather at my current location is saved locally on my server. My website is then able to utilize my location and weather information throughout my website.

The first feature using this information are weather effects. Initially, I'm just starting by darkening the website background and adding snow falling if my current location's weather is said to be snowing. It looks like the image below!

I am able to do this because my iPhone logs it's current location to my own instance of a server running the Compass software. My website retrieves that location and uses it to query the Dark Sky API and save that information to my server.

I currently restrict the weather effects to the homepage, although since individual posts also contain weather data from when the post was made, it's not outside the realm of possibility that I could have posts that I make during snow could have this snow effect on the post's page. A fun little way to prepare my website for the winter!

30.62 ℉🌧techcolophon
posted using quill.p3k.io


Please note: This site is in an active redesign. Some things might be a little off 🧐