Permalink
Browse files

added twitter tiles

  • Loading branch information...
chrismatthieu committed Dec 4, 2011
1 parent fe6c694 commit 20bea8d6a87fe66e8a50348bb2b0d4b751c762b4
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -57,6 +57,7 @@ def create
omniauth['credentials']['secret'] ? @authhash[:secret] = omniauth['credentials']['secret'] : @authhash[:secret] = ''
omniauth['extra']['user_hash']['profile_background_image_url'] ? @authhash[:backgroundimage] = omniauth['extra']['user_hash']['profile_background_image_url'] : @authhash[:backgroundimage] = ''
omniauth['extra']['user_hash']['profile_background_color'] ? @authhash[:backgroundcolor] = omniauth['extra']['user_hash']['profile_background_color'] : @authhash[:backgroundcolor] = ''
+ omniauth['extra']['user_hash']['profile_background_tile'] ? @authhash[:backgroundtile] = omniauth['extra']['user_hash']['profile_background_tile'] : @authhash[:backgroundtile] = ''
omniauth['extra']['user_hash']['description'] ? @authhash[:bio] = omniauth['extra']['user_hash']['description'] : @authhash[:bio] = ''
omniauth['extra']['user_hash']['location'] ? @authhash[:location] = omniauth['extra']['user_hash']['location'] : @authhash[:location] = ''
omniauth['extra']['user_hash']['url'] ? @authhash[:url] = omniauth['extra']['user_hash']['url'] : @authhash[:url] = ''
@@ -108,6 +109,7 @@ def create
@user.access_secret = @authhash[:secret]
@user.backgroundurl = @authhash[:backgroundimage]
@user.backgroundcolor = @authhash[:backgroundcolor]
+ @user.backgroundtile = @authhash[:backgroundtile]
@user.bio = @authhash[:bio]
@user.bio = @authhash[:location]
@user.bio = @authhash[:url]
@@ -2,9 +2,9 @@
<head>
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link href="/stylesheets/telephone.css" rel="stylesheet" type="text/css" />
<title>Twelephone</title>
+ <link href="/stylesheets/telephone.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://s.phono.com/releases/0.2/jquery.phono.js"></script>
@@ -12,7 +12,11 @@
<% content_for :stylers do -%>
<style>
body {
- background: url(<%=@user.backgroundurl%>) 0px 0 no-repeat;
+ <% if @user.backgroundtile %>
+ background: url(<%=@user.backgroundurl%>) 0px 0 repeat;
+ <% else %>
+ background: url(<%=@user.backgroundurl%>) 0px 0 no-repeat;
+ <% end %>
background-color: #<%=@user.backgroundcolor%>;
}
@@ -0,0 +1,5 @@
+class AddBackgroundtileToUsers < ActiveRecord::Migration
+ def change
+ add_column :users, :backgroundtile, :boolean
+ end
+end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20111028042653) do
+ActiveRecord::Schema.define(:version => 20111204165516) do
create_table "users", :force => true do |t|
t.string "username"
@@ -33,6 +33,7 @@
t.string "bio"
t.string "location"
t.string "url"
+ t.boolean "backgroundtile"
end
end

0 comments on commit 20bea8d

Please sign in to comment.