New look of Ruby Committers #2

Closed
wants to merge 34 commits into
from
Commits
Jump to file
+2,249 −9,338
Split
View
@@ -1,3 +1,4 @@
+.DS_Store
.bundle
db/*.sqlite3
log/*.log
View
@@ -7,6 +7,9 @@ gem 'rails', '3.0.3'
gem 'sqlite3-ruby', :require => 'sqlite3'
+gem 'haml', '3.0.25'
+gem 'compass', '0.10.6'
+
# Use unicorn as the web server
# gem 'unicorn'
View
@@ -30,8 +30,11 @@ GEM
activesupport (3.0.3)
arel (2.0.6)
builder (2.1.2)
+ compass (0.10.6)
+ haml (>= 3.0.4)
erubis (2.6.6)
abstract (>= 1.0.0)
+ haml (3.0.25)
i18n (0.5.0)
mail (2.2.13)
activesupport (>= 2.3.6)
@@ -69,5 +72,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ compass (= 0.10.6)
+ haml (= 3.0.25)
rails (= 3.0.3)
sqlite3-ruby
@@ -1,22 +1,24 @@
module AccountsHelper
def link_to_service name, service
- case service.name
+ link = case service.name
when 'twitter'
- link_to name, 'http://twitter.com/' + service.key
+ 'http://twitter.com/' + service.key
when 'friendfeed'
- link_to name, 'http://friendfeed.com/' + service.key
+ 'http://friendfeed.com/' + service.key
when 'mixi'
- link_to name, 'http://mixi.jp/show_friend.pl?id=' + service.key
+ 'http://mixi.jp/show_friend.pl?id=' + service.key
when 'github'
- link_to name, 'http://github.com/' + service.key
+ 'http://github.com/' + service.key
when 'facebook'
if service.key =~ /^\s*\d+$/
- link_to name, 'http://www.facebook.com/profile.php?id=' + service.key
+ 'http://www.facebook.com/profile.php?id=' + service.key
else
- link_to name, 'http://www.facebook.com/' + service.key
+ 'http://www.facebook.com/' + service.key
end
when 'iddy'
- link_to name, 'http://iddy.jp/profile/' + service.key
+ 'http://iddy.jp/profile/' + service.key
end
+
+ link_to image_tag("#{name}.ico"), link
end
end
View
@@ -0,0 +1,161 @@
+@import "compass/reset"
+@import "compass/css3"
+
+$base = #6B5153
+$subtitle = #bbb
+
+body
+ background: url(/images/ruby_pattern.png)
+ font-family: Sans
+ color: $base
+ padding: 0 40px
+
+h1, h2, h3
+ font-family: Cuprum, Sans
+
+h1, h2
+ font-weight: bold
+
+h1
+ font-size: 60px
+ padding: 80px 0 60px
+ color: #a00
+ margin-left: 30px
+ @include text-shadow(#3e0f10, -1px, 1px, 1px)
+
+ a
+ text-decoration: none
+ color: #a00
+
+ &:hover
+ color: #800
+
+h2
+ font-size: 30px
+ padding-bottom: 3px
+ color: #7f3129
+
+h3
+ color: $base
+ font-size: 16px
+ line-height: 20px
+ font-family: Sans
+
+ span
+ font-size: 14px
+ display: block
+ color: $subtitle
+ font-family: Cuprum, Sans
+ margin-bottom: 3px
+
+a
+ color: $base
+
+ &:hover
+ color: #dda9ad
+ text-decoration: none
+
+p.intro
+ position: absolute
+ font-size: 18px
+ font-family: Cuprum, Sans
+ width: 300px
+ line-height: 22px
+ top: 88px
+ left: 560px
+ color: #A87175
+
+table.commiters
+ width: 100%
+ border-spacing: 20px
+
+ td.commiter
+ @include border-radius(10px)
+ padding-bottom: 10px
+ vertical-align: top
+ width: 33.333%
+ border: 3px solid #fbd0dc
+ background: #fefefe
+
+ .commiter-wrapper
+ padding: 15px 20px
+
+.portraits
+ float: left
+ margin-right: 30px
+ width: 1px
+ position: relative
+
+ li
+ top: 0
+ position: absolute
+
+ .image-wrapper
+ @include opacity(0.0)
+ width: 70px
+
+ &:first-child
+ @include opacity(1.0)
+
+ img
+ width: 100%
+ padding: 5px
+ border: 1px solid #ddd
+ @include box-shadow(#C2C2C2, 0, 0, 5px)
+
+.commiter-data
+ padding-left: 95px
+
+.commiter-data-extra
+ margin-top: 15px
+
+dl
+ margin-bottom: 8px
+
+ dt
+ color: $subtitle
+ font-size: 14px
+ font-family: Cuprum, Sans
+ margin-bottom: 3px
+ padding-left: 18px
+ padding-top: 1px
+
+ dd
+ margin-bottom: 15px
+ padding-left: 18px
+
+ &.nicknames
+ dt
+ background: url(/images/nicknames_icon.png) no-repeat
+
+ &.sites
+
+ dt
+ background: url(/images/sites_icon.png) no-repeat
+
+ ul
+ margin-left: 10px
+
+ li
+ margin-bottom: 5px
+ line-height: 18px
+ font-size: 14px
+ list-style: circle
+ margin-left: 6px
+
+ &.services
+ dt
+ background: url(/images/services_icon.png) no-repeat
+
+ul.services
+ margin-top: 5px
+
+ li
+ float: left
+ margin-right: 8px
+
+.ruby-powered
+ text-align: center
+ padding: 80px 0
+ font-family: Cuprum, Sans
+ color: #94072A
@@ -1,79 +1,72 @@
-<li>
- <table>
- <tr>
- <td>Account:</td>
- <td><%= account.username %></td>
- </tr>
+<td class="commiter">
+ <div class="commiter-wrapper">
- <% unless account.names.empty? %>
- <tr>
- <td>Names:</td>
- <td>
- <ul>
- <%= render :partial => 'name', :collection => account.names %>
- </ul>
- </td>
- </tr>
- <% end %>
+ <ul class="portraits">
+ <% unless account.portraits.empty? %>
+ <%= render :partial => 'portrait', :collection => account.portraits %>
+ <% else %>
+ <li><div class="image-wrapper"><%= image_tag 'no_portrait.png' %></div></li>
+ <% end %>
+ </ul>
- <% unless account.nicks.empty? %>
- <tr>
- <td>Nicknames:</td>
- <td>
- <ul>
- <%= render :partial => 'name', :collection => account.nicks %>
- </ul>
- </td>
- </tr>
- <% end %>
+ <div class="commiter-data">
- <% unless account.sites.empty? %>
- <tr>
- <td>Sites:</td>
- <td>
- <ul>
- <%= render :partial => 'site', :collection => account.sites %>
- </ul>
- </td>
- </tr>
- <% end %>
+ <h2><%= account.username %></h2>
- <% unless account.services.empty? %>
- <tr>
- <td>Services:</td>
- <td>
- <ul>
- <%= render :partial => 'service', :collection => account.services %>
- </ul>
- </td>
- </tr>
- <% end %>
+ <% unless account.names.empty? %>
+ <h3>
+ <span>Other accounts:</span>
+ <%= account.names.map(&:value).join(', ') %>
+ </h3>
+ <% end %>
- <% unless account.portraits.empty? %>
- <tr>
- <td>Portraits:</td>
- <td>
- <ul>
- <%= render :partial => 'portrait', :collection => account.portraits %>
- </ul>
- </td>
- </tr>
- <% end %>
+ <div class="commiter-data-extra">
+ <% unless account.nicks.empty? %>
+ <dl class="nicknames">
+ <dt>Nicknames:</dt>
+ <dd><%= account.nicks.map(&:value).join(', ') %></dd>
+ </dl>
+ <% end %>
- <!-- FIXME: unsure how to link to ISBN. :-( -->
- <!--
- <% unless account.books.empty? %>
- <tr>
- <td>Books:</td>
- <td>
- <ul>
- <% account.books.each do |book| %>
- <li><%= book.key %></li>
- <% end %>
- </ul>
- </td>
- </tr>
- <% end %>
- -->
- </table>
-</li>
+ <% unless account.sites.empty? %>
+ <dl class="sites">
+ <dt>Sites:</dt>
+ <dd>
+ <ul>
+ <%= render :partial => 'site', :collection => account.sites %>
+ </ul>
+ </dd>
+ </dl>
+ <% end %>
+
+ <% unless account.services.empty? %>
+ <dl class="services">
+ <dt>Services:</dt>
+ <dd>
+ <ul class="services">
+ <%= render :partial => 'service', :collection => account.services %>
+ </ul>
+ </dd>
+ </dl>
+ <% end %>
+
+ <!-- FIXME: unsure how to link to ISBN. :-( -->
+ <!--
+ <% if account.books.length > 0 %>
+ <tr>
+ <td>Books:</td>
+ <td>
+ <ul>
+ <% account.books.each do |book| %>
+ <li><%= book.key %></li>
+ <% end %>
+ </ul>
+ </td>
+ </tr>
+ <% end %>
+ -->
+
+ </div>
+ </div>
+ </div>
+</td>
@@ -1,3 +1,3 @@
-<div class='image-wrapper'>
- <%= image_tag portrait.url %>
-</div>
+<li class='image-wrapper'>
+ <%= link_to image_tag(portrait.url), portrait.url, :rel => portrait.account.id %>
+</li>
Oops, something went wrong.