Skip to content

Commit

Permalink
Created lists page and moved leaders to /leaders
Browse files Browse the repository at this point in the history
  • Loading branch information
brendannee committed May 2, 2012
1 parent 9701c33 commit 8799673
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
14 changes: 14 additions & 0 deletions resources/public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,20 @@ ol.userList {
content: ' | ';
}

.listLink {
font-size: 10pt;
color: #828282;
}

.listLink a {
width: 110px;
display: inline-block;
}

.listLink:first-child {
margin-top: 10px;
}

footer {
border-top: 2px solid #00e837;;
background-color: #f6f6ef;
Expand Down
20 changes: 13 additions & 7 deletions src/hsnews/views/user.clj
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@
(password-field {:placeholder "Password"} :password)
(vali/on-error :password common/error-text)]])

(defpartial user-item [{:keys [hs_id] :as user}]
[:li (common/user-link hs_id)])

(defpartial list-users [users]
[:ol.userList
(map user-item users)])

(defpage "/login" {:as user}
(common/layout
[:h2 "Log in"]
Expand Down Expand Up @@ -104,7 +97,20 @@
[:h2 "Submissions"]
(common/post-list (users/get-posts hs_id))))

(defpartial user-item [{:keys [hs_id] :as user}]
[:li (common/user-link hs_id)])

(defpartial list-users [users]
[:ol.userList
(map user-item users)])

(defpage "/lists" {}
(common/layout
[:div {:class "listLink"}
(link-to "/leaders" "leaders")
[:span "Users with most karma."]]))

(defpage "/leaders" {}
(common/layout
[:h2 "Top Users"]
(list-users (users/get-top-users))))

0 comments on commit 8799673

Please sign in to comment.