From 675112f1ccba4be5c4fece4328876536a7b18faf Mon Sep 17 00:00:00 2001 From: Ramana Kumar Date: Wed, 15 Nov 2017 21:58:21 +1100 Subject: [PATCH] Tweak CSS and formatting Avoid line breaks in a job link+info. --- serverLib.sml | 7 ++++--- style.css | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/serverLib.sml b/serverLib.sml index 6f3add9..6b40883 100644 --- a/serverLib.sml +++ b/serverLib.sml @@ -609,15 +609,16 @@ in val typ = read_job_type inp handle IO.Io _ => cgi_die 500 ["cannot open ",f] | Option => cgi_die 500 [f," has invalid file format"] - val attrs = if q = "stopped" then status_attrs (read_status inp) else [] + val format_type = if q = "stopped" then span (status_attrs (read_status inp)) else String.concat val last_date = if q = "running" then read_last_date inp else NONE val () = TextIO.closeIn inp val ago_string = case last_date of NONE => "" | SOME date => time_ago date in - String.concat[a (String.concat[base_url,"/job/",jid]) jid, " ", - span attrs ["(", typ, ")",ago_string]] + span [("class","nowrap")] + [a (String.concat[base_url,"/job/",jid]) jid, " ", + format_type ["(", typ, ")",ago_string]] end fun html_job_list (q,ids) = diff --git a/style.css b/style.css index cb4dfaf..0d9bb19 100644 --- a/style.css +++ b/style.css @@ -5,12 +5,13 @@ pre { font-size: 20px; } pre strong { display: block; margin-top: 1em; } pre time { font-size: 18px; } time.ago { font-size: 14px; } -ul { list-style-type: none; font-size: 24px; } -li { display: inline; padding: 1em; } +ul { list-style-type: none; font-size: 24px; padding-left: 1em; margin-top: 0em; } +li { display: inline-block; padding-right: 2em; } li span { font-size: 18px; } li span.success { color: #0d0 } li span.failure { color: #d00 } +li span.nowrap { white-space: nowrap; } a { color: #337ab7; text-decoration: none; } a:hover { text-decoration: underline; } -footer { margin-top: 3em; } +footer { margin-top: 2em; } footer a { padding-right: 2em; }