aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-07-21 19:46:21 +0200
committerAlex Auvolat <alex@adnab.me>2023-07-21 19:46:21 +0200
commite3822f6f9d45e62bd0198f6f2887408235d057a1 (patch)
tree71e15f5ea1bb45f29ffea7910b53034c977dd049
parentbea3b164d3da23d6cf1e41d7f054b03bdf858346 (diff)
downloaddatagengo-e3822f6f9d45e62bd0198f6f2887408235d057a1.tar.gz
datagengo-e3822f6f9d45e62bd0198f6f2887408235d057a1.zip
add explanation on hover
-rw-r--r--html/style.css13
-rw-r--r--src/main.rs2
2 files changed, 14 insertions, 1 deletions
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, "</p>")?;
- writeln!(f, r#"<p style="text-align: center; font-size: 1.2em">{}</p>"#, ex.en)?;
+ writeln!(f, r#"<p class="en"><span class="expl">{}</span><br />{} </p>"#, ex.expl, ex.en)?;
}
write!(f, "</body></html>")?;