fix: typewriter не замирает на первом слове (reduced-motion не останавливает печать) + переключатель темы прижат вправо

- extend_footer.html: убран ранний return при prefers-reduced-motion — печать идёт всегда, мигание гасится только через CSS (кейфрейм tw-blink уже отключается)
- typewriter.css: убрано двойное auto-поле (.logo margin-inline-end:auto конфликтовало с #menu margin-inline-start:auto при justify-content:space-between) — теперь только menu толкает вправо, солнышко встаёт сразу за меню
This commit is contained in:
2026-09-20 07:42:02 +00:00
parent 4e7deb6f0f
commit 1f58f8ccc7
2 changed files with 4 additions and 11 deletions
+1 -7
View File
@@ -26,13 +26,7 @@
a.appendChild(box);
a.appendChild(document.createTextNode(text.slice(close)));
// reduced motion: static first word, no animation
if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
box.firstChild.before(document.createTextNode(words[0] || ''));
box.querySelector('.tw-cursor').style.display = 'none';
return;
}
// reduced motion: blink is disabled via CSS; keep typing but no blink
const TYPE = 90, ERASE = 50, HOLD = 1400, GAP = 400;
let w = 0, i = 0, dir = 1;
box.querySelector('.tw-cursor').style.display = 'inline-block';