diff options
author | Martin Fischer <martin@push-f.com> | 2021-06-24 11:27:15 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-06-24 11:27:15 +0200 |
commit | de3437e4a2b357c9774dbef37ee7f76f50a3fabf (patch) | |
tree | 350f44005c61743b05ba080610a7deac69ec05d3 /src/get_routes.rs | |
parent | 066d150eb0cc6ffb985389b9431fc807a263c347 (diff) |
log: mark up dates as headings
Diffstat (limited to 'src/get_routes.rs')
-rw-r--r-- | src/get_routes.rs | 9 |
1 files changed, 6 insertions, 3 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()) } |