aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-06-24 11:27:15 +0200
committerMartin Fischer <martin@push-f.com>2021-06-24 11:27:15 +0200
commitde3437e4a2b357c9774dbef37ee7f76f50a3fabf (patch)
tree350f44005c61743b05ba080610a7deac69ec05d3
parent066d150eb0cc6ffb985389b9431fc807a263c347 (diff)
log: mark up dates as headings
-rw-r--r--src/get_routes.rs9
-rw-r--r--src/static/style.css5
-rw-r--r--src/static/style.css.sha2562
3 files changed, 12 insertions, 4 deletions
diff --git a/src/get_routes.rs b/src/get_routes.rs
index 7576d60..73c9301 100644
--- a/src/get_routes.rs
+++ b/src/get_routes.rs
@@ -166,6 +166,7 @@ fn log_blob<C: Controller>(
// the very first commit of the branch
commits.push(prev_commit);
}
+ page.body.push_str("<div>");
let mut prev_date = None;
for c in commits {
let date = NaiveDateTime::from_timestamp(c.time().seconds(), 0).date();
@@ -173,8 +174,10 @@ fn log_blob<C: Controller>(
if prev_date != None {
page.body.push_str("</ul>");
}
- page.body
- .push_str(&format!("{}<ul>", date.format("%b %d, %Y")));
+ page.body.push_str(&format!(
+ "<h2 class=regular-text>{}</h2><ul>",
+ date.format("%b %d, %Y")
+ ));
}
page.body.push_str(&format!(
@@ -185,7 +188,7 @@ fn log_blob<C: Controller>(
));
prev_date = Some(date);
}
- page.body.push_str("</ul>");
+ page.body.push_str("</ul></div>");
Ok(page.into())
}
diff --git a/src/static/style.css b/src/static/style.css
index 639e191..a91b9df 100644
--- a/src/static/style.css
+++ b/src/static/style.css
@@ -76,6 +76,11 @@ label {
max-width: 100%;
}
+.regular-text {
+ font-size: inherit;
+ font-weight: inherit;
+}
+
.addition { background: #e6ffed; }
.deletion { background: #ffeef0; }
.addition ins {background: #acf2bd; text-decoration: none; }
diff --git a/src/static/style.css.sha256 b/src/static/style.css.sha256
index 7d21d8b..434cce7 100644
--- a/src/static/style.css.sha256
+++ b/src/static/style.css.sha256
@@ -1 +1 @@
-6odUGn42jSM91sFFJm0cerQgUL9BwhGaeanA+q5qZFQ= \ No newline at end of file
+nNLYarzU1i7D9yDyQw5R+15yNbfgxY838qGt/MH3I0E= \ No newline at end of file