aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs8
-rw-r--r--static/style.css14
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<
<title>List of batches</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
- <body>"#
+ <body><div class="index_page">"#
)?;
writeln!(f, r#"<p><a href="about.html">About / How-to</a></p><hr />"#)?;
writeln!(f, "<table>")?;
- writeln!(f, "<tr><th>Num</th><th>Level</th><th>Chars</th><th>Examples</th><th>B-1</th><th>B-2</th><th>Ignore</th></tr>")?;
+ writeln!(f, "<tr><th>Num</th><th>Level</th><th>Kanji</th><th>Examples</th><th>Lesson-1</th><th>Lesson-2</th><th>Ignore</th></tr>")?;
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, "<table>")?;
writeln!(
f,
- "<tr><th>Level</th><th>Count</th><th>Chars</th><th>Missing chars</th></tr>"
+ r#"<tr><th>Level</th><th>Count</th><th width="60%">Kanji</th><th>Missing kanji</th></tr>"#
)?;
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, "</table>")?;
- write!(f, "</body></html>")?;
+ write!(f, "</div></body></html>")?;
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;