Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATZILLA! #25

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
db/*.sqlite3
log/*.log
tmp/**/*
.DS_Store
1 change: 1 addition & 0 deletions 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'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -69,5 +70,6 @@ PLATFORMS
ruby

DEPENDENCIES
haml
rails (= 3.0.3)
sqlite3-ruby
14 changes: 7 additions & 7 deletions app/helpers/accounts_helper.rb
Expand Up @@ -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
79 changes: 0 additions & 79 deletions app/views/accounts/_account.html.erb

This file was deleted.

34 changes: 34 additions & 0 deletions app/views/accounts/_account.html.haml
@@ -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 change: 0 additions & 1 deletion app/views/accounts/_name.html.erb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/accounts/_name.html.haml
@@ -0,0 +1 @@
.name= name.value
3 changes: 0 additions & 3 deletions app/views/accounts/_portrait.html.erb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/accounts/_portrait.html.haml
@@ -0,0 +1 @@
.portrait= image_tag portrait.url
3 changes: 0 additions & 3 deletions app/views/accounts/_service.html.erb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/accounts/_service.html.haml
@@ -0,0 +1 @@
.icon= link_to_service service.name, service
1 change: 0 additions & 1 deletion app/views/accounts/_site.html.erb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/accounts/_site.html.haml
@@ -0,0 +1 @@
.site= link_to site.title, site.url
5 changes: 0 additions & 5 deletions app/views/accounts/index.html.erb

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/accounts/index.html.haml
@@ -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}
15 changes: 0 additions & 15 deletions app/views/layouts/application.html.erb

This file was deleted.

15 changes: 15 additions & 0 deletions app/views/layouts/application.html.haml
@@ -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/'
9 changes: 9 additions & 0 deletions db/migrate/20110106011902_add_titles_to_books.rb
@@ -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
3 changes: 2 additions & 1 deletion db/schema.rb
Expand Up @@ -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"
Expand All @@ -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|
Expand Down
Binary file added public/images/attack_of_matzilla.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/card_bottom.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/card_tile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/card_top.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/ejc_inset.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/forkme_ribbon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/matzilla-bg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/rails.png
Binary file not shown.
Binary file added public/images/ruby_commi_tters_org.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/social_icons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/user_blank.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/javascripts/application.js
@@ -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 });

});