From b4de4308953c027e1af43277e716dc756405c9e5 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 26 Sep 2023 13:24:19 +0200 Subject: Add modest amounts of css --- src/main.rs | 8 ++++---- static/style.css | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 06c0a07..c882741 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1142,13 +1142,13 @@ fn format_index(batches: &[Batch], kanji_levels: &[(String, String)]) -> Result< List of batches - "# +
"# )?; writeln!(f, r#"

About / How-to


"#)?; writeln!(f, "")?; - writeln!(f, "")?; + writeln!(f, "")?; for (i, batch) in batches.iter().enumerate() { writeln!( f, @@ -1176,7 +1176,7 @@ fn format_index(batches: &[Batch], kanji_levels: &[(String, String)]) -> Result< writeln!(f, "
NumLevelCharsExamplesB-1B-2Ignore
NumLevelKanjiExamplesLesson-1Lesson-2Ignore
")?; writeln!( f, - "" + r#""# )?; for (lvl, chars) in kanji_levels.iter() { if lvl == "N0+" || lvl.ends_with("-10") { @@ -1196,7 +1196,7 @@ fn format_index(batches: &[Batch], kanji_levels: &[(String, String)]) -> Result< } writeln!(f, "
LevelCountCharsMissing chars
LevelCountKanjiMissing kanji
")?; - write!(f, "")?; + write!(f, "
")?; f.flush()?; Ok(()) } diff --git a/static/style.css b/static/style.css index 8721461..384388e 100644 --- a/static/style.css +++ b/static/style.css @@ -3,12 +3,17 @@ a { text-decoration: none; } -tr:hover { +tr:nth-child(odd) { background: #EEE; } -td { +th, td { vertical-align: top; + padding: 3px; +} + +table { + border-spacing: 0px; } .chars { @@ -45,6 +50,11 @@ details .chars { font-size: 3rem; } +.index_page { + max-width: 1000px; + margin: auto; +} + .about_page, .batch_page { max-width: 800px; margin: auto; -- cgit v1.2.3