From 0b7b96267a4151d00e31c50946d088701689db34 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 10 Oct 2023 10:20:19 +0200 Subject: ensure sans-serif font is used in all browsers --- src/main.rs | 8 ++++---- static/style.css | 10 ++++++++++ 2 files changed, 14 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#"  {}  
{}"#, + r#"  {}  
{}"#, 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#"{}  {}  {}{}"#, + r#"{}  {}  {}{}"#, 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#"{:03}{}{}  {}{}{}{}"#, + r#"{:03}{}{}  {}{}{}{}"#, 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, - "{}{}{}{} ({})", + r#"{}{}{}{} ({})"#, lvl, chars.len(), chars.to_string(), diff --git a/static/style.css b/static/style.css index dd96813..047624e 100644 --- a/static/style.css +++ b/static/style.css @@ -1,3 +1,4 @@ + a { color: blue; text-decoration: none; @@ -23,6 +24,7 @@ table { .ja { text-align: center; font-size: 2rem; + font-family: 'MS PGothic', Osaka, Arial, sans-serif; } .ja:hover .char_cur { @@ -85,3 +87,11 @@ details .chars { .extratable td { padding: 4px; } + +.tab_large { + font-size: 1.2em; +} + +.font_ja { + font-family: 'MS PGothic', Osaka, Arial, sans-serif; +} -- cgit v1.2.3