21 Commits

Author SHA1 Message Date
Ben Harris
b62b0454b5 webstead: add Emscripten and musl copyright notices
Programs compiled with Emscripten end up statically linked against the
Emscripten runtime, which includes musl libc.  So we need to comply with
their licences by including a copy of the licence and the relevant
copyright notices.  I think putting them on the webstead page in small
print is probably the best approach.

This might need updating each release to match the version of Emscripten
that I build the editor with.
2026-01-13 21:42:18 +00:00
Ben Harris
c99994e91d webstead: prefer querySelector[All] over getElement*
It's a bit shorter, a bit more general, and allows me to properly
query only input elements that are children of the table of pixels.
2026-01-13 21:42:18 +00:00
Ben Harris
e6c1e44db0 webstead: mark script as async
Apparently Chromium can't cope with "defer" scripts (which modules are
by default) in XHTML documents.  But "async" scripts work properly,
so now we use one of those and then wait for DOMContentLoaded as
necessary.
2026-01-13 21:42:18 +00:00
Ben Harris
295660b1f9 webstead: set color:inherit on tickyboxes
Chromium's browser stylesheet overrides this.
2026-01-13 21:42:18 +00:00
Ben Harris
96ee19d038 webstead: put border on tickboxes, not table cells
That means the borders are clickable, which is what I want.
2026-01-13 21:42:18 +00:00
Ben Harris
7ba57f2e27 webstead: scale input and output better with window size
It turns out that setting --pix to 7vmin, while rather unprincipled,
does actually work quite adequately.
2026-01-13 21:42:18 +00:00
Ben Harris
64b18f30bb webstead: use currentColor for checked background
This means that webstead.xhtml doesn't know anything about the colours
in bedstead.css.
2026-01-13 21:42:18 +00:00
Ben Harris
8825e680dd webstead: use <pre> for C code 2026-01-13 21:42:18 +00:00
Ben Harris
74463d2a76 webstead: generate initialisers to paste into bedstead.c 2026-01-13 21:42:18 +00:00
Ben Harris
02514737cd webstead: slight CSS simplification
Don't need to specify border colour if it's the current colour anyway.
2026-01-13 21:42:18 +00:00
Ben Harris
e1e16471c8 webstead: better layout 2026-01-13 21:42:18 +00:00
Ben Harris
3a6e2bc265 webstead: almost-acceptable pixel-looking input 2026-01-13 21:42:18 +00:00
Ben Harris
70cbbde7f9 webstead: slightly cleverer path translation
Now paths with successive rlineto operations (to avoid overflowing the
Type 2 stack) work.
2026-01-13 21:42:18 +00:00
Ben Harris
357fbbc829 webstead: SVG transform to turn output right way up 2026-01-13 21:42:18 +00:00
Ben Harris
568d7f43ab webstead: properly ignore cntrmask 2026-01-13 21:42:18 +00:00
Ben Harris
09c777481b webstead: input from an array of tickyboxes 2026-01-13 21:42:18 +00:00
Ben Harris
6cf53005fe webstead: make a named function to update the rendered glyph 2026-01-13 21:42:18 +00:00
Ben Harris
111484a4f1 webstead: SVG rendering by extremely crude regexps 2026-01-13 21:42:18 +00:00
Ben Harris
1a49f8d120 webstead: use standard bedstead.css 2026-01-13 21:42:18 +00:00
Ben Harris
fb377b66af Capture output in HTML 2026-01-13 21:42:18 +00:00
Ben Harris
861c4749e6 Minimal build system and test page for Bedstead-in-WASM
Just allows for typing a command line and seeing the output.
2026-01-13 21:42:18 +00:00