A bit styling

This commit is contained in:
Vlad Bokov 2019-02-08 14:42:50 +07:00
parent 3f4380c8f5
commit 1af3f5010d
No known key found for this signature in database
GPG key ID: 4D88DD3A10EA1D63
2 changed files with 18 additions and 2 deletions

View file

@ -507,3 +507,19 @@ th {
display: none;
}
}
.test-result {
color: #ffffff;
}
.test-result.ok {
background-color: #2aa876
}
.test-result.failure {
background-color: #e8554e;
}
.test-result.error {
background-color: #e8554e;
}

View file

@ -53,6 +53,6 @@
(defn process [^String text ^Integer index]
(let [{:keys [error] :as params} (parse text)]
(if error
(str "<pre class=\"error\">" (pr-str params) "</pre><pre>" text "</pre>")
(str "<pre class=\"test-result error\">" (pr-str params) "</pre><pre>" text "</pre>")
(let [{:keys [result] :as test-result} (do-test params)]
(str "<pre class=\"" (name result) "\">" (pr-str test-result) "</pre><pre>" text "</pre>")))))
(str "<pre class=\"test-result " (name result) "\">" (pr-str test-result) "</pre><pre>" text "</pre>")))))