Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

MATZILLA! #25

Closed
wants to merge 8 commits into
from
View
@@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
+.DS_Store
View
@@ -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
@@ -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
@@ -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 =~ /^\s*\d+$/
- link_to name, 'http://www.facebook.com/profile.php?id=' + service.key
+ 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
@@ -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>
@@ -0,0 +1,34 @@
+.card
+ .top
+ .main
+ .column.left
+ = render :partial => 'portrait', :locals => {:portrait => account.portraits.first} unless account.portraits.blank?
+ - if account.portraits.blank?
+ .portrait.blank
+ - unless account.services.empty?
+ .services
+ %h3 Services
+ .meta= render :partial => 'service', :collection => account.services
+ .column.right
+ %h2= account.username
+ - unless account.names.empty?
+ .names
+ %h3 Names
+ .meta= render :partial => 'name', :collection => account.names
+ - unless account.nicks.empty?
+ .nicknames
+ %h3 Nicknames
+ .meta= render :partial => 'name', :collection => account.nicks
+ - unless account.sites.empty?
+ .sites
+ %h3 Sites
+ .meta= render :partial => 'site', :collection => account.sites
+
+ // Book search works* but is flaky - seems like some of these ISBN numbers are wrong...
+ / - unless account.books.empty?
+ / .books
+ / %h3 Books
+ / .meta
+ / - account.books.each do |book|
+ / .book= link_to book.title, 'http://www.amazon.com/s?url=field-keywords=' + book.key
+ .bottom
@@ -1 +0,0 @@
-<li><%= name.value %></li>
@@ -0,0 +1 @@
+.name= name.value
@@ -1,3 +0,0 @@
-<div class='image-wrapper'>
- <%= image_tag portrait.url %>
-</div>
@@ -0,0 +1 @@
+.portrait= image_tag portrait.url
@@ -1,3 +0,0 @@
-<li>
- <%= link_to_service service.name, service %>
-</li>
@@ -0,0 +1 @@
+.icon= link_to_service service.name, service
@@ -1 +0,0 @@
-<li><%= link_to site.title, site.url %></li>
@@ -0,0 +1 @@
+.site= link_to site.title, site.url
@@ -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>
@@ -0,0 +1,8 @@
+.matzilla
+.attack
+.fork= link_to 'fork me on github', 'http://github.com/tenderlove/rubycommitters.org'
+.header
+ %h1 Ruby Committers
+.container
+ - @accounts.each do |account|
+ = render :partial => 'account', :locals => {:account => account}
@@ -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>
@@ -0,0 +1,15 @@
+!!!
+%html
+ %head
+ %title Ruby Committers
+ = stylesheet_link_tag :all
+ = javascript_include_tag 'jquery-1.4.4.min', 'jquery.tools.min', 'application'
+ = csrf_meta_tag
+ = analytics_tag
+ %body
+ = yield
+ .footer
+ .credits
+ .ejc.logo= link_to image_tag('ejc_inset.png', :alt => 'Designed by E.J. Coughlin <3'), 'http://twitter.com/ejc'
+ .ejc.words= link_to 'Designed by E.J. Coughlin <3', 'http://twitter.com/ejc'
+ .wallpaper= link_to 'Download the "MATZILLA!" Desktop Wallpaper on Flickr', 'http://www.flickr.com/photos/_ejc/5371343453/'
@@ -0,0 +1,9 @@
+class AddTitlesToBooks < ActiveRecord::Migration
+ def self.up
+ add_column :books, :title, :string, :default => "Ruby Book"
+ end
+
+ def self.down
+ remove_column :books, :title
+ end
+end
View
@@ -10,7 +10,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110101002342) do
+ActiveRecord::Schema.define(:version => 20110106011902) do
create_table "accounts", :force => true do |t|
t.string "username"
@@ -23,6 +23,7 @@
t.integer "account_id"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "title", :default => "Ruby Book"
end
create_table "names", :force => true do |t|
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Deleted file not rendered
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,2 +1,8 @@
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
+$(function() {
+
+ // initialize scrollable
+ $(".scrollable").scrollable({ vertical: true, mousewheel: true });
+
+});
Oops, something went wrong.