Portfolio light mode

I pulled in suncalc.js, and updated the latest iteration of my portfolio with a light mode! This covered not only the homepage, but loading states, articles, and mobile.

Your current location is determined by querying your IP against freegeoip.net, an awesome open-source tool. Your rough latitude and longitude are then run through a calculator to determine (to some degree of accuracy), whether it's dark or light outside.

To reduce API throughput, I'm also locally storing your calculated latitude and longitude. This has the added benefit of speeding up day/night calculations in future visits.

Check it out at alexprice.co, just make sure it's sunny out! ☀️

I'm looking for a job! Are you hiring product designers? Check out more of my work, and case studies here.

Alex Price
Product Design at Mercury 🌱
Get in touch

More by Alex Price

View profile