website: redesign part 7

This commit is contained in:
nym21
2026-06-05 16:03:04 +02:00
parent 7cee0e2c5a
commit ff2c04a100
11 changed files with 254 additions and 164 deletions
+15
View File
@@ -0,0 +1,15 @@
/** @param {number} ms */
export function wait(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
/** @param {string} name */
export function readCssDuration(name) {
const value = getComputedStyle(document.documentElement)
.getPropertyValue(name)
.trim();
return Number.parseFloat(value) * (value.endsWith("ms") ? 1 : 1000);
}