How we put the sky over Jávea in our homepage.
If you visit our homepage at lunchtime, the circle sits high above the headline. Come back after dark and it's the moon, in tonight's phase, with any planets that are up beside it. And on the day of a solar eclipse, it turns into our logo. Here's how a circle in a hero became a live view of the sky above Jávea.
Listen to this article
6 min · Read aloud by your browser
6:00

It started as a circle.
When we rebuilt the site, the homepage hero had one big orange circle sitting over the headline, multiplied into the type like ink on paper. It came straight from our mark: two overlapping circles, design in orange and code in teal, meeting in a dark green lens.
A few days later we made it gently follow your cursor on a soft spring. That was fun, but it didn’t mean anything. And the more I looked at it, the more it looked like a sun sitting just above a horizon.
Why not the real one?
The studio is in Jávea, on the Costa Blanca, and the sun is a big part of life here. So the question became simple: what if the circle was the actual sun over Jávea, at its actual height, right now?
That turned into a list. The sun should climb in the morning, sit highest at midday and sink towards the line under the headline through the afternoon. It should move east to west. It should set. And after it sets, something should take its place, because the circle is our mark and it should never be missing. That’s where the moon came in, and once we had the moon, the planets weren’t far behind.
No API, nothing to fetch.
The obvious way to build this would be to call a weather or astronomy API. We didn’t. Everything is worked out in your browser, from the date, the time and Jávea’s coordinates (38.79° N, 0.17° E). There’s nothing to fetch, no API key, nothing to break if a service goes down, and it keeps the site cookie-free.
Three things do the work:
- SunCalc, a tiny open-source JavaScript library by Vladimir Agafonkin. Give it a time and a place and it tells you where the sun and moon are in the sky, when they rise and set, and how much of the moon is lit.
- A small planet calculator of our own, about 50 lines long. It uses NASA JPL’s published orbital elements for the planets, works out where each one is around the sun, then where that puts it in the sky from Jávea. It’s accurate to well under a degree, which is plenty for placing a dot in a hero.
- Astronomy Engine, an open-source astronomy library by Don Cross, for eclipses. This one runs when the site is built rather than in your browser. It finds every solar eclipse visible from Jávea over the next 12 years and works out exactly where the moon sits against the sun, every 2 minutes, from the first bite to the last. That becomes a small table baked into the page.
The page redraws once a minute, so if you leave it open you can watch the sun slowly move.
By day, the sun.
The circle’s height follows the sun’s real altitude, measured against how high it gets at midday today. That way it reaches the top of the hero at noon in December just as it does in June. Its position left to right follows the compass direction, as if you were looking south from Jávea.
As the sun gets lower, the orange warms and the circle swells a touch, because a low sun really does look bigger. In the last few minutes before sunset it slips behind the line, and a small note underneath tells you what you’re looking at, like “Sunset in Jávea at 17:52”.
By night, the moon.
As soon as the sun has set, the moon takes over. It’s smaller, teal instead of orange, and drawn in tonight’s real phase. We shade it as a sphere lit from the sun’s direction, so a crescent has a soft edge rather than a hard cut. The dark side always shows faintly, so even a new moon is still a circle. If the moon hasn’t risen yet, it waits on the line and the note tells you when it will.
Through dusk the whole hero fades through a dusky blue into night, the type flips to a light stone colour, and the circles glow in our true brand colours.
And the planets.
At night, Venus, Jupiter, Mars, Saturn and Mercury appear as small coloured dots wherever they really are, once they’re a couple of degrees above the horizon. The note names them too, so tonight it reads “Waxing crescent moon over Jávea · with Saturn”. Go outside and look, it’ll be there.

And on eclipse days.
Reading the first draft of this post, I wondered what the hero would do in a solar eclipse. Spain is in the middle of a run of three: one last August, one next August and one in January 2028. So we taught it.
On the day, the note under the line gives you a heads-up: “Sun over Jávea · solar eclipse today from 09:46”. Then the moon starts to cross the sun, on its real path and on time. It’s drawn in our teal, and where it covers the sun the two multiply into the dark green of our logo. So as the eclipse builds, the hero slowly turns into our mark. The note counts it up as it goes (“Solar eclipse over Jávea · 62% covered”), and once most of the sun is gone the light on the page goes flat and grey-blue, the way it does outside.
Here’s what that means for Jávea:
- 12 August 2026. We missed this one on the site. The sun set during it, 99.9% covered, just outside the path of totality.
- 2 August 2027. A partial eclipse from 09:46 to 12:09, peaking at 10:55 with 93% of the sun covered, high in the morning sky. At the peak the hero is almost exactly our logo.
- 26 January 2028. An annular eclipse, right on sunset. From 17:54 to 18:00 the moon sits inside the sun and leaves a ring of fire, about 2 degrees above the horizon. The hero shows the ring, and the note says so.

If Jávea ever gets a total eclipse, the hero is ready for that too: the page goes dark, the moon goes black with a glow round it, and the planets come out. Not in the next 12 years, though.
Because the table is worked out each time the site is built, it always looks 12 years ahead, so we never have to type in a date.
Pull it apart.
It’s still our logo. Drag the circle away (or tap it on a phone) and the other circle is waiting underneath, orange and teal overlapping in the same dark green as the mark. Let go and it springs back. If you’ve asked your device to reduce motion, the sky still follows the day, it just doesn’t wobble.
How we built it.
The whole thing was built in an afternoon, with me designing and directing and Claude writing the code alongside me. Most of the work wasn’t the maths, it was the details: how fast the circle should dip behind the line, how far left it should travel before it crowds the headline, what the note should say at dusk. It went through about 30 small rounds in a couple of hours, the same way we’d work on a client’s brand.
It’s a nice reminder of what we like about this job. A brand mark doesn’t have to sit still. With a bit of code, ours now tells you something true about the place we work, every minute of the day.
If you want to see a whole day go by, add ?sky=demo to our homepage and it’ll run 24 hours in 40 seconds. To see next summer’s eclipse, try ?sky=eclipse, or ?sky=eclipse-2028 for the ring of fire.

