From 55865ddc62af8062203e265786b860e79baf9d59 Mon Sep 17 00:00:00 2001 From: James Youngman Date: Sun, 21 Jul 2024 12:23:55 +0100 Subject: [PATCH] Define CSS styles for the Lincoln Writer output. --- tx2-web/public/index.html | 34 +++++++++++++++++++++++++--------- tx2-web/rust/src/lw.rs | 6 ++++-- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/tx2-web/public/index.html b/tx2-web/public/index.html index 70b2cb4..9b1c96e 100644 --- a/tx2-web/public/index.html +++ b/tx2-web/public/index.html @@ -3,21 +3,37 @@ + + TX-2
diff --git a/tx2-web/rust/src/lw.rs b/tx2-web/rust/src/lw.rs index 1a9aaa5..4a55e0f 100644 --- a/tx2-web/rust/src/lw.rs +++ b/tx2-web/rust/src/lw.rs @@ -6,8 +6,10 @@ use base::Unsigned6Bit; fn generate_html_for_char(uch: char, attributes: &LincolnState, _advance: bool) -> String { let colour_class = match attributes.colour { - Colour::Black => "lw-black", - Colour::Red => "lw-red", + // These styles are defined in index.html, not in CSS files + // (because those styles get renamed). + Colour::Black => "lwb", + Colour::Red => "lwr", }; let (script_open, script_close) = match attributes.script { Script::Normal => ("", ""),