Browse files

HAML NOM NOM NOM; CSS Basics™; Fix Facebook URL bug; Add .DS_Store to…

… .gitignore;
  • Loading branch information...
1 parent 89a36f7 commit d24f2725b54c4813b10ccbd04f0ba49a74c4da96 @ejc ejc committed Jan 4, 2011
View
1 .gitignore
@@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
+.DS_Store
View
1 Gemfile
@@ -1,6 +1,7 @@
source 'http://rubygems.org'
gem 'rails', '3.0.3'
+gem 'haml'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
View
2 Gemfile.lock
@@ -32,6 +32,7 @@ GEM
builder (2.1.2)
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 +70,6 @@ PLATFORMS
ruby
DEPENDENCIES
+ haml
rails (= 3.0.3)
sqlite3-ruby
View
16 app/helpers/accounts_helper.rb
@@ -2,21 +2,21 @@ module AccountsHelper
def link_to_service name, service
case service.name
when 'twitter'
- link_to name, 'http://twitter.com/' + service.key
+ link_to name, 'http://twitter.com/' + service.key, :class => 'twitter'
when 'friendfeed'
- link_to name, 'http://friendfeed.com/' + service.key
+ link_to name, 'http://friendfeed.com/' + service.key, :class => 'friendfeed'
when 'mixi'
- link_to name, 'http://mixi.jp/show_friend.pl?id=' + service.key
+ link_to name, 'http://mixi.jp/show_friend.pl?id=' + service.key, :class => 'mixi'
when 'github'
- link_to name, 'http://github.com/' + service.key
+ link_to name, 'http://github.com/' + service.key, :class => 'github'
when 'facebook'
- if service.key =~ /^\sd+$/
- link_to name, 'http://www.facebook.com/profile.php?id=' + service.key
+ if service.key =~ /^\s*\d+$/
+ link_to name, 'http://www.facebook.com/profile.php?id=' + service.key, :class => 'facebook'
else
- link_to name, 'http://www.facebook.com/' + service.key
+ link_to name, 'http://www.facebook.com/' + service.key, :class => 'facebook'
end
when 'iddy'
- link_to name, 'http://iddy.jp/profile/' + service.key
+ link_to name, 'http://iddy.jp/profile/' + service.key, :class => 'iddy'
end
end
end
View
79 app/views/accounts/_account.html.erb
@@ -1,79 +0,0 @@
-<li>
- <table>
- <tr>
- <td>Account:</td>
- <td><%= account.username %></td>
- </tr>
-
- <% unless account.names.empty? %>
- <tr>
- <td>Names:</td>
- <td>
- <ul>
- <%= render :partial => 'name', :collection => account.names %>
- </ul>
- </td>
- </tr>
- <% end %>
-
- <% unless account.nicks.empty? %>
- <tr>
- <td>Nicknames:</td>
- <td>
- <ul>
- <%= render :partial => 'name', :collection => account.nicks %>
- </ul>
- </td>
- </tr>
- <% end %>
-
- <% unless account.sites.empty? %>
- <tr>
- <td>Sites:</td>
- <td>
- <ul>
- <%= render :partial => 'site', :collection => account.sites %>
- </ul>
- </td>
- </tr>
- <% 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 %>
-
- <!-- 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>
View
38 app/views/accounts/_account.html.haml
@@ -0,0 +1,38 @@
+.member
+ .column.left
+ - unless account.portraits.empty?
+ .portraits
+ = render :partial => 'portrait', :collection => account.portraits
+ .column.right
+ %h2= account.username
+ - unless account.names.empty?
+ .names
+ %h3 Names
+ .item= render :partial => 'name', :collection => account.names
+ - unless account.nicks.empty?
+ .nicknames
+ %h3 Nicknames
+ .item= render :partial => 'name', :collection => account.nicks
+ - unless account.sites.empty?
+ .sites
+ %h3 Sites
+ .item= render :partial => 'site', :collection => account.sites
+ - unless account.services.empty?
+ .services
+ %h3 Services
+ .item= render :partial => 'service', :collection => account.services
+ :erb
+ <!-- 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 %> -->
View
1 app/views/accounts/_name.html.erb
@@ -1 +0,0 @@
-<li><%= name.value %></li>
View
1 app/views/accounts/_name.html.haml
@@ -0,0 +1 @@
+.item= name.value
View
3 app/views/accounts/_portrait.html.erb
@@ -1,3 +0,0 @@
-<div class='image-wrapper'>
- <%= image_tag portrait.url %>
-</div>
View
1 app/views/accounts/_portrait.html.haml
@@ -0,0 +1 @@
+.portrait= image_tag portrait.url
View
3 app/views/accounts/_service.html.erb
@@ -1,3 +0,0 @@
-<li>
- <%= link_to_service service.name, service %>
-</li>
View
1 app/views/accounts/_service.html.haml
@@ -0,0 +1 @@
+.item= link_to_service service.name, service
View
1 app/views/accounts/_site.html.erb
@@ -1 +0,0 @@
-<li><%= link_to site.title, site.url %></li>
View
1 app/views/accounts/_site.html.haml
@@ -0,0 +1 @@
+.item= link_to site.title, site.url
View
5 app/views/accounts/index.html.erb
@@ -1,5 +0,0 @@
-<h1>Ruby Committers</h1>
-<%= link_to 'fork me on github', 'http://github.com/tenderlove/rubycommitters.org' %>
-<ul>
-<%= render :partial => 'account', :collection => @accounts %>
-</ul>
View
4 app/views/accounts/index.html.haml
@@ -0,0 +1,4 @@
+%h1 Ruby Committers
+.fork= link_to 'fork me on github', 'http://github.com/tenderlove/rubycommitters.org'
+.team
+ = render :partial => 'account', :collection => @accounts
View
15 app/views/layouts/application.html.erb
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Ruby Committers</title>
- <%= stylesheet_link_tag :all %>
- <%= javascript_include_tag :defaults %>
- <%= csrf_meta_tag %>
- <%= analytics_tag %>
-</head>
-<body>
-
-<%= yield %>
-
-</body>
-</html>
View
10 app/views/layouts/application.html.haml
@@ -0,0 +1,10 @@
+!!!
+%html
+ %head
+ %title Ruby Committers
+ = stylesheet_link_tag :all
+ = javascript_include_tag :defaults
+ = csrf_meta_tag
+ = analytics_tag
+ %body
+ = yield
View
BIN public/images/rails.png
Deleted file not rendered
View
53 public/stylesheets/reset.css
@@ -0,0 +1,53 @@
+/* http://meyerweb.com/eric/tools/css/reset/ */
+/* v1.0 | 20080212 */
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ background: transparent;
+}
+body {
+ line-height: 1;
+}
+ol, ul {
+ list-style: none;
+}
+blockquote, q {
+ quotes: none;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+
+/* remember to define focus styles! */
+:focus {
+ outline: 0;
+}
+
+/* remember to highlight inserts somehow! */
+ins {
+ text-decoration: none;
+}
+del {
+ text-decoration: line-through;
+}
+
+/* tables still need 'cellspacing="0"' in the markup */
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
View
17 public/stylesheets/site.css
@@ -1,7 +1,12 @@
-.image-wrapper {
- height: 100px;
-}
+.team {width: 1100px;float:left;}
-.image-wrapper img {
- height: 100%;
-}
+/* Member Cards */
+.member {float: left;width: 300px;padding:10px;border:1px solid #aaa;margin: 0 10px 10px 0;}
+.column {float: left;}
+.column.left {width:105px;}
+.column.right {width:190px;}
+
+
+
+.portrait {width: 90px;height: 100px;overflow: hidden;}
+.portrait img {width: 90px;}
View
45 public/stylesheets/typography.css
@@ -0,0 +1,45 @@
+/* --------------------------------------------------------------
+
+ typography.css
+ * Sets up some sensible default typography.
+
+ Based on work by:
+ * Nathan Borror [playgroundblues.com]
+ * Jeff Croft [jeffcroft.com]
+ * Christian Metts [mintchaos.com]
+ * Wilson Miner [wilsonminer.com]
+ * Richard Rutter [clagnut.com]
+
+ Read more about using a baseline here:
+ * alistapart.com/articles/settingtypeontheweb
+
+-------------------------------------------------------------- */
+
+/* This is where you set your desired font size. The line-heights
+ and vertical margins are automatically calculated from this.
+ The percentage is of 16px (0.75 * 16px = 12px). */
+
+body {
+ font-size: .85em;
+ color: #181818;
+ font-family: Helvetica, arial, sans-serif;
+}
+
+:focus {
+ outline: none;
+ -moz-outline-style: none;
+}
+
+/* Headings
+-------------------------------------------------------------- */
+
+h1,h2,h3,h4,h5,h6 { font-family: Helvetica, arial, sans-serif; color: #181818; font-weight: normal; }
+
+h1 { font-size: 3em; line-height: 1; margin: .2em 0 0.5em; }
+h2 { font-size: 1.4em; margin-bottom: 10px;}
+h3 { font-size: 1.75em; line-height: 1.25em; margin: 0 0 6px; }
+h4 { font-size: 1.4em; line-height: 1.25; margin: 0 0 6px; }
+h5 { font-size: 1em; margin: 0 0 6px; }
+h6 { font-size: 1em; }
+
+h1:first-child, h2:first-child { margin-top: 0; }

0 comments on commit d24f272

Please sign in to comment.