From e3822f6f9d45e62bd0198f6f2887408235d057a1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 21 Jul 2023 19:46:21 +0200 Subject: add explanation on hover --- html/style.css | 13 +++++++++++++ src/main.rs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/html/style.css b/html/style.css index 7bf54c7..e312f06 100644 --- a/html/style.css +++ b/html/style.css @@ -30,3 +30,16 @@ td { .ja:hover .char_bad { color: grey; } + +.en { + text-align: center; + font-size: 1.2em; +} + +.en .expl { + color: transparent; +} + +.en:hover .expl { + color: black; +} diff --git a/src/main.rs b/src/main.rs index 60c1ded..6f5ca4e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -323,7 +323,7 @@ fn format_batch_aux(count: usize, i: usize, batch: &Batch) -> Result<()> { } } writeln!(f, "

")?; - writeln!(f, r#"

{}

"#, ex.en)?; + writeln!(f, r#"

{}
{}

"#, ex.expl, ex.en)?; } write!(f, "")?; -- cgit v1.2.3