The Lab · experiments

See what I coded.

Small things I built to learn, play and break the rules a little.

Try to catch the sun
01 · CSS only

The welcome horizon

A sunset, a perspective grid and drifting clouds with no images at all. Move your mouse on the home page and the horizon tilts.

See it live →
How it's made +
.floor {
  transform: perspective(420px) rotateX(68deg);
  background-image:
    linear-gradient(#C7CED8 1.5px, transparent 1.5px),
    linear-gradient(90deg, #C7CED8 1.5px, transparent 1.5px);
  background-size: 70px 70px;
  animation: grid 3.2s linear infinite;
}
3
02 · JavaScript

The battery check

The Battery Calendar's morning check as a live widget. Score your factors and watch the battery fill.

Try it →
How it's made +
const score = Math.max(0, Math.min(5,
  3 + factors.reduce((a, b) => a + b, 0)));
bars.forEach((bar, i) =>
  bar.classList.toggle('on', i < score));
Battery ≠ timePeople > plans
03 · Pointer events

Stickers you can drag

A board of sticker "equations" anyone can rearrange. The visitor gets to edit my page.

Play →
How it's made +
sticker.addEventListener('pointermove', e => {
  if (!sticker.hasPointerCapture(e.pointerId)) return;
  sticker.style.setProperty('--x', ox + e.clientX - sx + 'px');
  sticker.style.setProperty('--y', oy + e.clientY - sy + 'px');
});
2019 2020 2021
04 · Scroll snap

The sideways resume

My career as a timeline you swipe through, year by year.

Swipe it →
How it's made +
.track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.year { scroll-snap-align: start; }