Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'feature/solution-highlighting' into develop

  • Loading branch information...
commit c77f0431fd18f08d1c7f8e0605832aec6f377813 2 parents f684b7f + 0467f47
@amalloy amalloy authored
Showing with 11 additions and 5 deletions.
  1. +7 −3 resources/public/css/style.css
  2. +4 −2 src/foreclojure/problems.clj
10 resources/public/css/style.css
@@ -616,13 +616,17 @@ a.graph-class :hover {color: #445599;}
font-weight: bold;
-.solution-user-code {
- background-color: #DDD;
+.syntaxhighlighter.solution-code.solution-user-code {
+ background-color: #DDD !important;
padding: 15px;
margin-bottom: 25px;
-.solution-code {
+.syntaxhighlighter.solution-code.solution-user-code div {
+ background-color: #DDD !important;
+.syntaxhighlighter.solution-code {
padding-left: 10px;
6 src/foreclojure/problems.clj
@@ -348,7 +348,8 @@ Return a map, {:message, :error, :url, :num-tests-passed}."
(with-user [{:keys [_id following]}]
(let [user-code (get-solution :public _id problem-id)]
- [:pre.solution-code.solution-user-code (escape-html user-code)])
+ [:pre {:class "brush: clojure;gutter: false;toolbar: false;light: true; class-name: 'solution-code solution-user-code'"}
+ (escape-html user-code)])
(if (empty? following)
[:p "You can only see solutions of users whom you follow. Click on any name from the " (link-to "/users" "users") " listing page to see their profile, and click follow from there."]
(if (some (complement nil?) (map #(get-solution :public % problem-id) following))
@@ -363,7 +364,8 @@ Return a map, {:message, :error, :url, :num-tests-passed}."
:when f-code]
[:div.solution-username (str f-user "'s solution:")]
- [:pre.solution-code (escape-html f-code)]]))
+ [:pre {:class "brush: clojure;gutter: false;toolbar: false;light: true; class-name: 'solution-code'"}
+ (escape-html f-code)]]))
[:p "None of the users you follow have solved this problem yet!"])))))})
(defn show-solutions [id]
Please sign in to comment.
Something went wrong with that request. Please try again.