Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
<link rel="preload" href="assets/fonts/space-grotesk-bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/ibm-plex-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin>
<script src="theme.js?v=c4917c18"></script>
<link rel="stylesheet" href="styles.css?v=3ca9a8b4">
<link rel="stylesheet" href="styles.css?v=1f00e5fb">
<script src="stack.js?v=1e7638c2" defer></script>
<script src="tools.js?v=6083c786" defer></script>
<script src="tools.js?v=c7575a53" defer></script>
</head>
<body>
<a class="skip-link" href="#tools">Skip to tools</a>
Expand Down
2 changes: 1 addition & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ h1 { margin: 0; max-width: 11ch; font-size: clamp(44px, 5.4vw, 80px); line-heigh
@keyframes tools-fallback { to { visibility: visible; } }
.is-exploded .tool-grid { grid-template-columns: minmax(0, 1fr); border: 0; }
.is-exploded .tool { grid-row: 1; grid-column: 1; align-self: start; grid-template-rows: auto auto auto 1fr; border: 1px solid var(--line); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s .3s; }
.is-exploded .tool.is-active { opacity: 1; visibility: visible; transition: opacity .3s ease; box-shadow: 0 30px 80px color-mix(in srgb, var(--accent) 16%, transparent); }
.is-exploded .tool.is-active { opacity: 1; visibility: visible; transition: opacity .3s ease; }

@media (max-width: 900px) {
.tool-x { grid-template-columns: minmax(0, 1fr); gap: 32px; }
Expand Down
5 changes: 4 additions & 1 deletion tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
let dpr = 1;
let ink = [23, 26, 31];
let bg = [255, 255, 255];
// On a light page the dots are drawn larger and more opaque, or the discs fade into the white.
let weight = { size: 1, alpha: 0.3 };
let angle = 0.6;
let last = 0;
let frame = 0;
Expand Down Expand Up @@ -114,6 +116,7 @@
const style = getComputedStyle(document.documentElement);
ink = rgb(style.getPropertyValue('--ink'));
bg = rgb(style.getPropertyValue('--background'));
weight = bg[0] + bg[1] + bg[2] > 3 * 128 ? { size: 1.3, alpha: 0.75 } : { size: 1, alpha: 0.3 };
for (const disc of discs) disc.accent = rgb(getComputedStyle(chips.querySelector(`[data-tool="${disc.key}"]`)).getPropertyValue('--accent'));
}
function sizeDiscs() {
Expand Down Expand Up @@ -204,7 +207,7 @@
buckets.forEach((pts, b) => {
if (!pts.length) return;
const l = (b + 0.5) / 5;
dots(pts, dot * (0.45 + 1.1 * l) * (1 + 0.25 * d.glow), colour, Math.min(1, (0.3 + 0.7 * l) * fade));
dots(pts, dot * weight.size * (0.45 + 1.1 * l) * (1 + 0.25 * d.glow), colour, Math.min(1, (weight.alpha + (1 - weight.alpha) * l) * fade));
});
}
}
Expand Down