Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added problem number to each page #189

Merged
merged 2 commits into from

3 participants

@daviddavis

I tried to make it unobtrusive yet plainly visible:

http://go.davedroid.com/CUvs

@amalloy
Owner

Awesome. Would you mind rebasing this onto develop before I pull?

Aside: I love the "dimmed" grey, but it seems a little too dim. What do you think about using something like 888 instead of aaa?

@amalloy amalloy merged commit bd63eb9 into 4clojure:develop
@amalloy

@gigasquid I don't like the absolute positioning here, but @daviddavis says he would have to reorganize the whole page to get this to render right otherwise. (a) Is absolute positioning gross enough that we should care, and (b) do you know a clever way to do this faster/better?

Collaborator

I don't have a problem with using it where it makes sense. I think it makes sense here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 11, 2011
  1. Added problem id to each page

    David Davis authored
  2. Made problem number darker

    David Davis authored
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 1 deletion.
  1. +13 −0 resources/public/css/style.css
  2. +2 −1  src/foreclojure/problems.clj
View
13 resources/public/css/style.css
@@ -326,6 +326,10 @@ div.message #error-text {
color: red;
}
+div#prob-container {
+ position: relative;
+}
+
div#prob-title {
font-size: 15pt;
font-family: sans-serif;
@@ -333,6 +337,15 @@ div#prob-title {
float: left;
}
+div#prob-number {
+ position: absolute;
+ right: 10px;
+ font-size: 2em;
+ font-weight: bold;
+ color: #888;
+ top: -10px;
+}
+
button#solutions-link {
margin-left: 20px;
margin-top: -1px;
View
3  src/foreclojure/problems.clj
@@ -268,7 +268,8 @@ Return a map, {:message, :error, :url, :num-tests-passed}."
{:title (str _id ". " title)
:content
- [:div
+ [:div#prob-container
+ [:div#prob-number "#" id]
[:div#prob-title title]
(if-user [{:keys [solved]}]
(if (some #{(Integer. id)} solved)
Something went wrong with that request. Please try again.