aboutsummaryrefslogtreecommitdiff
path: root/aero.js
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-28 18:25:41 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-28 18:25:41 -0700
commit34f0486f091ded7112442a00f8c5c5ecae342265 (patch)
treee00129732e44609e76bcb22b25d2a18af5aa1df2 /aero.js
parent7b67d90f4f25eca2480d0d769ec5ab6305c4b4c6 (diff)
refactor: extract inline css/js from index.html
index.html shrank from 1650 to 349 lines. Inline <style> moved to index.css, ARTICLES data to articles.js, the rest of the inline script to index.js. Also: - drop unused bindMusicToggle from aero.js - collapse duplicate click+dblclick icon handlers - dedup music-toggle gradient via .mt-btn.on class - replace inline styles in films/podcast/now-playing renderers with semantic classes (.film-when, .pod-ep, .np-row, etc.) - precompute article readMin and plainTitle once instead of on every render Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'aero.js')
-rw-r--r--aero.js17
1 files changed, 1 insertions, 16 deletions
diff --git a/aero.js b/aero.js
index c789026..da6cca7 100644
--- a/aero.js
+++ b/aero.js
@@ -195,21 +195,6 @@ function musicToggleHTML() {
</div>`;
}
-function bindMusicToggle(root) {
- const btn = root.querySelector('.mt-btn');
- const lbl = root.querySelector('.mt-label');
- if (!btn) return;
- let on = false;
- btn.addEventListener('click', () => {
- on = !on;
- btn.textContent = on ? '❚❚' : '▶';
- lbl.textContent = on ? '♪ kero kero bonito — flamingo' : 'music off';
- btn.style.background = on
- ? 'radial-gradient(circle at 30% 25%,white,oklch(75% 0.14 55) 60%,oklch(55% 0.15 35))'
- : 'radial-gradient(circle at 30% 25%,white,oklch(82% 0.12 220) 60%,oklch(50% 0.13 240))';
- });
-}
-
// THEME SWITCHER — Aero (Frutiger) ↔ Chrome (Y2K)
const THEME_KEY = 'tyler.theme';
const THEMES = ['aero', 'chrome'];
@@ -286,7 +271,7 @@ async function fetchReelMouthFeed(limit = 6) {
window.Aero = {
spawnBubbles, makeClouds, sparkleCursor, makeDraggable, makeResizable,
- counterHTML, nowPlayingHTML, animateEq, musicToggleHTML, bindMusicToggle,
+ counterHTML, nowPlayingHTML, animateEq, musicToggleHTML,
// theme api
getTheme, setTheme, mountThemeSwitcher, initTheme, THEMES,
// real api integrations