<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotemacs/scripts/theme-studio/styles.css, branch main</title>
<subtitle>My Emacs configuration
</subtitle>
<id>https://git.cjennings.net/dotemacs/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/dotemacs/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/'/>
<updated>2026-06-09T10:00:53+00:00</updated>
<entry>
<title>refactor(theme-studio): extract CSS and JS to files, inline at generate time</title>
<updated>2026-06-09T10:00:53+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-09T10:00:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/dotemacs/commit/?id=eaf169045a1106935dd887d8d795d0138ad2b8a5'/>
<id>urn:sha1:eaf169045a1106935dd887d8d795d0138ad2b8a5</id>
<content type='text'>
generate.py was 1378 lines, ~1300 of them a single triple-quoted string holding the whole app. Moved the &lt;style&gt; block to styles.css and the &lt;script&gt; body to app.js, and generate.py now inlines both through placeholders the same way it already inlines colormath.js, then fills the data placeholders. It drops to ~500 lines (the remaining bulk is the package face-data dicts, a later stage).

The generated page is byte-identical to before — every hash gate, the node suite, the spliced-script parse, and the new #locktest stay green. Two integrity tests guard the splice: styles.css inlines verbatim, and app.js reaches the page exactly as fill_data renders it. Both go red if the splice wiring is dropped.

Living in real files instead of a Python string kills the backslash-doubling bug class (str.replace is literal, so escapes survive), gives the CSS and JS real editor tooling, and opens the app logic to unit testing — the point of the whole refactor.
</content>
</entry>
</feed>
