aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-10-10 10:20:19 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-10 10:20:19 +0200
commit0b7b96267a4151d00e31c50946d088701689db34 (patch)
tree0b65f0cb794f41fa2a50b24e687e8d096fda8e2f /src
parent727f5657f0a801fc68c0e04e791dcd34cc605fba (diff)
downloaddatagengo-0b7b96267a4151d00e31c50946d088701689db34.tar.gz
datagengo-0b7b96267a4151d00e31c50946d088701689db34.zip
ensure sans-serif font is used in all browsers
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index b69a2da..ba31b5a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1168,7 +1168,7 @@ fn format_batch_aux<'a>(
for ex in batch.extra_examples.iter() {
writeln!(
f,
- r#"<tr><td style="text-align: center"><span style="font-size: 1.2em">&nbsp;&nbsp;{}&nbsp;&nbsp;</span><br />{}</td></tr>"#,
+ r#"<tr><td style="text-align: center"><span class="tab_large font_ja">&nbsp;&nbsp;{}&nbsp;&nbsp;</span><br />{}</td></tr>"#,
ex.ja, ex.en
)?;
}
@@ -1192,7 +1192,7 @@ fn format_vocab(f: &mut impl Write, vocab: &[&JlptVocab], t: &str) -> Result<()>
for v in vocab {
writeln!(
f,
- r#"<tr><td>{}</td><td>&nbsp;&nbsp;<span style="font-size: 1.2em">{}</span>&nbsp;&nbsp;</td><td>{}</td><td>{}</td></tr>"#,
+ r#"<tr><td>{}</td><td>&nbsp;&nbsp;<span class="tab_large font_ja">{}</span>&nbsp;&nbsp;</td><td>{}</td><td>{}</td></tr>"#,
v.level, v.kanji, v.en, v.kana
)?;
}
@@ -1259,7 +1259,7 @@ fn format_index(batches: &[Batch], kanji_levels: &[(String, String)]) -> Result<
for (i, batch) in batches.iter().enumerate() {
writeln!(
f,
- r#"<tr><td><a href="{:03}.html">{:03}</a></td><td>{}</td><td>{}</td><td>&nbsp;&nbsp;{}</td><td>{}</td><td>{}</td><td>{}</td></tr>"#,
+ r#"<tr><td><a href="{:03}.html">{:03}</a></td><td>{}</td><td class="font_ja">{}</td><td>&nbsp;&nbsp;{}</td><td class="font_ja">{}</td><td class="font_ja">{}</td><td class="font_ja">{}</td></tr>"#,
i,
i,
batch.level,
@@ -1293,7 +1293,7 @@ fn format_index(batches: &[Batch], kanji_levels: &[(String, String)]) -> Result<
let missing = chars.diff(&all_chars);
writeln!(
f,
- "<tr><td>{}</td><td>{}</td><td>{}</td><td>{} ({})</td></tr>",
+ r#"<tr><td>{}</td><td>{}</td><td class="font_ja">{}</td><td><span class="font_ja">{}</span> ({})</td></tr>"#,
lvl,
chars.len(),
chars.to_string(),