Browse files

dashboard content

  • Loading branch information...
1 parent 451af0c commit 86490cbf7e232f5a8a80f6524ff0976f21d19ea6 @rkh committed Jan 30, 2010
Showing with 37 additions and 7 deletions.
  1. +2 −2 lib/bithug/webserver.rb
  2. +2 −1 users.yaml
  3. +9 −1 views/dashboard.haml
  4. +1 −1 views/feed.haml
  5. +23 −2 views/stylesheets/screen.sass
View
4 lib/bithug/webserver.rb
@@ -38,7 +38,7 @@ def gravatar_url(mail, size, default)
end
def gravatar(mail, size = 80, default = "wavatar")
- "<img src='#{gravatar_url(mail, size, default)}' alt='' width='#{size}' height='#{size}'>"
+ "<img src='#{gravatar_url(mail, size, default)}' alt='' width='#{size}' height='#{size}' class='gravatar'>"
end
def repo_named(name)
@@ -62,7 +62,7 @@ def title
end
def log_entries(num = 30)
- user.following.all.collect { |u| u.recent_activity(num) }.sort_by { |i| i.date_time }[0..num]
+ current_user.following.all.compact.collect { |u| u.recent_activity(num) }.flatten.sort_by { |i| i.date_time }[0..num]
end
end
View
3 users.yaml
@@ -1,3 +1,4 @@
---
tim: $2a$10$mCqgYLBedlLhOJUWbrAJse2BGUWcogBsadQBLxVTd8.pBwn9LuYiK
-konstantin: $2a$10$dLopyZm8OOsQ2I30zF2g..szVUDPRAqPVI2iTjSuPDmJQnzd.cIgS
+konstantin: $2a$10$9h04ZSSUrYGdOlYKG6lDL.9Xkg7UACKX9jYOOsdhrgF8VGFHM7kdi
+foo: $2a$10$WhhOczhCfOtsdKGC4S/ebedQG5sHmxq3F1.P..gFo3NqiWGIisSNC
View
10 views/dashboard.haml
@@ -8,4 +8,12 @@
%li Add <a href="/#{current_user.name}/settings">a public key</a>.
%li Set up <a href="/#{current_user.name}/settings">twitter</a>.
-%h2 What is going on?
+%h2 What is going on?
+- if log_entries.empty?
+ Start following to fill your feed.
+- log_entries(30).each do |item|
+ .item
+ != gravatar item.user.email, 40
+ .text
+ %h4= Time.at(item.date_time)
+ = item.to_s
View
2 views/feed.haml
@@ -6,7 +6,7 @@
%description A list of the most recent activities of the people you follow
%language en-us
%pubDate= Time.now
- - for item in log_entries
+ - log_entries.each do |item|
%item
/stubbing, i'm going to work on this ASAP
%title= "#{item.class.to_s} for #{item.user.name}"
View
25 views/stylesheets/screen.sass
@@ -52,11 +52,11 @@ body
+transition("background", "3s")
&:hover
background-color: rgba(0, 0, 0, 0.4)
- width: 10%
+ width: 20%
text-align: center
position: absolute
top: 0px
- left: 45%
+ left: 40%
font-size: 80%
header, footer
@@ -220,6 +220,27 @@ body
padding: 3px
color: #555
+ .item
+ display: table
+ width: 400px
+ font-size: 14px
+ h4
+ margin: 0
+ padding: 0
+ .text
+ display: table-cell
+ vertical-align: top
+ margin: 0
+ padding: 5px 15px
+ width: 355px
+ .gravatar
+ display: table-cell
+ vertical-align: center
+ +box-shadow(1px 1px 6px rgba(0, 0, 0, 0.3))
+ border: solid 1px rgba(0, 0, 0, 0.6)
+ padding: 0
+ margin: 0
+
.warning
color: #b00
margin: 0px

0 comments on commit 86490cb

Please sign in to comment.