Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit 6244df8550c37d230b7eaa92ad9fe187f5d2a05b 1 parent f2730aa
@jerefrer authored
View
1  .gitignore
@@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
+nbproject/*
View
17 app/helpers/accounts_helper.rb
@@ -1,22 +1,23 @@
module AccountsHelper
def link_to_service name, service
- case service.name
+ url = case service.name
when 'twitter'
- link_to name, 'http://twitter.com/' + service.key
+ 'http://twitter.com/'
when 'friendfeed'
- link_to name, 'http://friendfeed.com/' + service.key
+ 'http://friendfeed.com/'
when 'mixi'
- link_to name, 'http://mixi.jp/show_friend.pl?id=' + service.key
+ 'http://mixi.jp/show_friend.pl?id='
when 'github'
- link_to name, 'http://github.com/' + service.key
+ 'http://github.com/'
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='
else
- link_to name, 'http://www.facebook.com/' + service.key
+ 'http://www.facebook.com/'
end
when 'iddy'
- link_to name, 'http://iddy.jp/profile/' + service.key
+ 'http://iddy.jp/profile/'
end
+ link_to name, url + service.key, :class => name
end
end
View
109 app/views/accounts/_account.html.erb
@@ -1,76 +1,49 @@
-<li>
- <table>
- <tr>
- <td>Account:</td>
- <td><%= account.username %></td>
- </tr>
-
+<div class="member">
+ <dl>
+ <dt><%= account.username %></dt>
<% unless account.names.empty? %>
- <tr>
- <td>Names:</td>
- <td>
- <ul>
- <%= render :partial => 'name', :collection => account.names %>
- </ul>
- </td>
- </tr>
+ <dd>
+ <strong>Names: </strong>
+ <%= account.names.map(&:value).join(" &bull; ").html_safe %>
+ </dd>
<% end %>
-
<% unless account.nicks.empty? %>
- <tr>
- <td>Nicknames:</td>
- <td>
- <ul>
- <%= render :partial => 'name', :collection => account.nicks %>
- </ul>
- </td>
- </tr>
+ <dd>
+ <strong>Nickname: </strong>
+ <%= account.nicks.map(&:value).join(" &bull; ").html_safe %>
+ </dd>
<% end %>
-
<% unless account.sites.empty? %>
- <tr>
- <td>Sites:</td>
- <td>
- <ul>
- <%= render :partial => 'site', :collection => account.sites %>
- </ul>
- </td>
- </tr>
+ <dd>
+ <strong>Sites: </strong>
+ <%= account.sites.map do |site| %>
+ <% link_to site.title, site.url %>
+ <% end.join(' &bull; ').html_safe %>
+ </dd>
<% end %>
-
- <% unless account.services.empty? %>
- <tr>
- <td>Services:</td>
- <td>
- <ul>
- <%= render :partial => 'service', :collection => account.services %>
- </ul>
- </td>
- </tr>
- <% end %>
-
- <% unless account.portraits.empty? %>
- <tr>
- <td>Portraits:</td>
- <td>
- <ul>
- <%= render :partial => 'portrait', :collection => account.portraits %>
- </ul>
- </td>
- </tr>
- <% end %>
-
<% unless account.books.empty? %>
- <tr>
- <td>Books:</td>
- <td>
- <ul>
- <% account.books.each do |book| %>
- <li><a href="http://www.amazon.<%= book.isbn.match(/^4/) ? "co.jp":"com" %>/dp/<%= book.isbn %>"><%= book.key %></a></li>
- <% end %>
- </ul>
- </td>
- </tr>
+ <dd>
+ <strong>Books: </strong>
+ <%= account.books.map do |book| %>
+ <% link_to book.key, 'http://www.amazon.' + (book.isbn.match(/^4/) ? "co.jp":"com") + '/dp/' + book.isbn %>
+ <% end.join(" &bull; ").html_safe %>
+ </dd>
+ <% end %>
+ <% unless account.services.empty? %>
+ <dd class="services">
+ <%= account.services.map do |service| %>
+ <% link_to_service service.name, service %>
+ <% end.join(' ').html_safe %>
+ </dd>
<% end %>
- </table>
-</li>
+ </dl>
+ <% if account.portraits.empty? %>
+ <%= image_tag "default.jpg" %>
+ <% else %>
+ <div <%= "class='slideshow'" if account.portraits.count > 1 %> >
+ <% account.portraits.each do |portrait| %>
+ <%= image_tag portrait.url %>
+ <% end %>
+ </div>
+ <% end %>
+</div>
View
4 app/views/accounts/_service.html.erb
@@ -1,3 +1 @@
-<li>
- <%= link_to_service service.name, service %>
-</li>
+<%= link_to_service service.name, service %>
View
18 app/views/accounts/index.html.erb
@@ -1,5 +1,13 @@
-<h1>Ruby Committers</h1>
-<%= link_to 'fork me on github', 'http://github.com/tenderlove/rubycommitters.org' %>
-<ul>
-<%= render :partial => 'account', :collection => @accounts %>
-</ul>
+<div id="header">
+ <h1><span>Ruby</span>Committers</h1>
+</div>
+
+<div id="team">
+ <div id="team_header">
+ <h2>Team</h2>
+ </div>
+
+ <%= render :partial => 'account', :collection => @accounts %>
+
+ <div id="credits"><p>Design by <a href="http://maximeblaise.fr/" title="Maxime Blaise - Webdesigner">Maxime Blaise</a></p></div>
+</div>
View
25 app/views/layouts/application.html.erb
@@ -2,14 +2,25 @@
<html>
<head>
<title>Ruby Committers</title>
- <%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
+ <%= stylesheet_link_tag "reset", "application", :cache => true %>
+ <%= javascript_include_tag :all, :cache => true %>
<%= csrf_meta_tag %>
<%= analytics_tag %>
-</head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <script type="text/javascript">
+ $(function() {
+ $('.slideshow').innerfade({
+ speed: 1000,
+ timeout: 5000,
+ type: 'sequence',
+ containerheight: '155px'
+ });
+ });
+ </script>
+ </head>
<body>
-
-<%= yield %>
-
+ <div id="wrapper">
+ <%= yield %>
+ </div>
</body>
-</html>
+</html>
View
16 config/database.yml
@@ -1,5 +1,8 @@
-# SQLite version 3.x
-# gem install sqlite3-ruby (not necessary on OS X Leopard)
+# MySQL. Versions 4.1 and 5.0 are recommended.
+#
+#
+# Be sure to use new-style password hashing:
+# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: sqlite3
database: db/development.sqlite3
@@ -10,13 +13,14 @@ development:
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- adapter: sqlite3
- database: db/test.sqlite3
+ adapter: jdbcmysql
+ database: db/development.sqlite3_test
pool: 5
timeout: 5000
production:
- adapter: sqlite3
- database: db/production.sqlite3
+ adapter: jdbcmysql
+ database: db/development.sqlite3_production
pool: 5
timeout: 5000
+
Please sign in to comment.
Something went wrong with that request. Please try again.