Lee Martin (@leemartin) on X

4 min read Original article ↗

user avatar

While the experience might feel like a video broadcast, it is still all HTML, CSS, and Javascript. It was developed with

@vuejs

3 and

@nuxt_js

4.

user avatar

Each "screen" is it's own component in

@nuxt_js

and actually had it's own page which allowed for easier debugging during development.

user avatar

All of the data comes from the

@weatherchannel

API. I had A LOT of fun finding the best endpoint setup to build out the screens efficiently. There's something so nice when reverse engineering and knowing the API you're using has everything you need. developer.weather.com

user avatar

My original version had a lot of smart caching built in but then the

@weatherchannel

reminded me it was their API and we could hit it as hard as we needed. 🥲 I was like, oh yeah... I think we still do a little browser caching though.

user avatar

In order to adapt the classic 4:3 design to be responsive for mobile, I relied on pencil, paper, and very strong coffee. I tried my best to respect the original design but aim for something more usable on mobile devices.

user avatar

I brought that work into

@figma

and very carefully laid out the screen evolutions alongside screenshots from the original broadcast.

user avatar

You truly don't understand the power of

@tailwindcss

until you try and tackle a problem like this. The way it is able to adapt to the interface's needs it just outstanding.

user avatar

This really became obvious when I added RTL support for Arabic.

@tailwindcss

has incredible RTL support and when I saw those shadows shift from the left to right, I shed one tear. 🥲

user avatar

In order to pull off the vintage CRT aesthetic, I simply added a blur to the entire page and then overlaid a retro TV video texture. I'm always trying to accomplish the most with the least if possible.

user avatar

My original idea was to render the entire experience in WebGL (using

@PixiJS

or

@threejs

) in order to make those effects more dynamic but I just couldn't part with HTML and CSS ability to lay out things responsively. I have so many interesting experiments though.

user avatar

I developed a sort of broadcast engine powered by

@greensock

which handles the entire broadcast playback timeline. Each screen can have it's own duration and cue up its own voiceover intros.

user avatar

But the real interesting bit is how

@greensock

allowed me to recreate the "Local on the 8s" scheduling. The experience autoplays on the 8s of the hour (08, 18, 28, 38, 48, 58) and if you arrive at say 6:19, you would be put 1 minute into a broadcast.

user avatar

This allows the HTML site to feel a bit more like a live TV broadcast when in reality we're just carefully managing time. At one point, I allowed the user to touch and hold to pause the

@greensock

timeline like an

@instagram

story but that feature did not make the cut.

user avatar

Since date and time are so important to the interface, I found the

@date_fns

library also very helpful.

user avatar

Both of the maps are powered by

@Mapbox

and I designed new styles in Mapbox Studio for both the regional forecast and current radar screens.

user avatar

To choose which regional locations were shown on the regional forecast and the latest observations screens, I actually created a local database of major cities. This allowed for a more controlled visualization. Then I just used

@turfjs

to find the best locations near the user.

user avatar

The TV turn on effect is just come careful CSS animating. And, the countdown screen was inspired by classic

@weatherchannel

bumper/intro graphics.

user avatar

The countdown visualization is actually a

@PixiJS

powered element because I knew I wanted it to be fullscreen and it allowed handling the animation a bit easier.

user avatar

All of the music and voiceovers are powered by

@GoldFireStudios

Howler.js. It's just easier that way.

user avatar

I was able to add 20 languages (so far) using the

@nuxt_js

i18n module, which ended up being a lot of fun.

user avatar

Special shout out to

@evilmartians

for their Martian Mono font. It ended up being the perfect alternative to the original typeface and had the benefits of variability.

user avatar

user avatar

An early architecture diagram of the build for the curious types.

user avatar

If you made it this far, you might be wondering how this project came to be. I wrote more words about that.