Permalink
Browse files

Migration to add book title; more style, more class, more flair;

  • Loading branch information...
ejc committed Jan 6, 2011
1 parent 4cc50c3 commit 2dca769bac90864ecebbb91630323a3bce5140b6
@@ -1,6 +1,12 @@
.item
.column.left
- = render :partial => 'portrait', :collection => account.portraits
+ = 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?
@@ -15,22 +21,11 @@
.sites
%h3 Sites
.meta= render :partial => 'site', :collection => account.sites
- - unless account.services.empty?
- .services
- %h3 Services
- .meta= 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 %> -->
+
+ // 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
@@ -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|
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
@@ -3,10 +3,10 @@ root element for the scrollable.
when scrolling occurs this element stays still.
*/
.scrollcontainer {width: 100%;background: url(/images/scroll_bg.png);position:relative;height:641px;}
-.scrollcenter {width: 1055px;margin: 0 auto;position: relative;}
+.scrollcenter {width: 990px;margin: 0 auto;position: relative;}
.scrollable{/* required settings */
-position:absolute;overflow:hidden;width:990px;height:580px;padding: 10px 0;border:none;left:40px;top:15px}
+position:absolute;overflow:hidden;width:990px;height:530px;padding: 10px 0;border:none;left:40px;top:15px}
/*
root element for scrollable items. Must be absolutely positioned
@@ -34,24 +34,17 @@ height:20000em;position:absolute;clear:both;}
margin:0;
cursor:pointer;
font-size:1px;
- border:1px solid #fff;
position:absolute;
}
.scrollcontainer a.right,
-.scrollcontainer a.left {top:142px;}
+.scrollcontainer a.left {top:-30px;}
/* right */
-.scrollcontainer a.right { background-position: 0 -30px; right:0px;}
-.scrollcontainer a.right:hover { background-position:-30px -30px; }
-.scrollcontainer a.right:active { background-position:-60px -30px; }
+.scrollcontainer a.right { background: url(/images/button_next.png);width: 75px;height: 20px;right:-20px;}
+.scrollcontainer a.left { background: url(/images/button_next.png);width: 75px;height: 20px;left:45px;}
-/* left */
-.scrollcontainer a.left { margin-left: 0px; left:0;}
-.scrollcontainer a.left:hover { background-position:-30px 0; }
-.scrollcontainer a.left:active { background-position:-60px 0; }
-
/* disabled navigational button */
.scrollcontainer a.disabled {
@@ -3,25 +3,37 @@ body {background: #333 url(/images/dark_noise.png);}
.header {width:600px; margin: 30px auto 0;height:115px;}
.header h1 {text-indent: -9000px;background: url(/images/logo_inset.png) no-repeat;width:600px;height:80px;margin: 0 0 0 0;}
+
/* Member Cards */
-.item {float: left;width: 300px !important;height:280px;padding:15px 5px 5px 15px;margin: 0 10px 10px 0;background: transparent url(/images/user_card.png) no-repeat;}
+.item {float: left;width: 300px !important;height:250px;padding:15px 5px 5px 15px;margin: 0 10px 10px 0;background: transparent url(/images/user_card.png) no-repeat;}
+
-.item h2, .item h3 {float:left;width:100%;}
.column {}
.column.left {width:105px;}
.column.right {width:190px;float:right;}
+.column.right h2, .column.right h3 {float:left;width:100%;}
.column .meta {float:left;width:100%;margin-bottom:10px;}
-.column .meta .item {float:left;width:100%;margin-bottom:5px;}
-.portrait {width: 90px;height: 100px;overflow: hidden;}
+.column .sites,
+.column .services,
+.column .names,
+.column .nicknames,
+.column .books,
+.column .meta .name,
+.column .meta .site,
+.column .meta .name,
+.column .meta .book {float:left;width:100%;margin-bottom:2px;}
+
+.portrait {width: 90px;height: 100px;overflow: hidden;margin-bottom:10px}
.portrait img {width: 90px;}
+.portrait.blank {width: 90px;height: 90px;background: url(/images/user_blank.png);}
-.icon a {text-indent: -99999px;display:block;width:28px;height:28px;background: url(/images/social_icons.png) no-repeat;float:left;margin-right:3px;}
+.icon a {text-indent: -99999px;display:block;width:15px;height:15px;background: url(/images/social_icons.png) no-repeat;float:left;margin-right:2px;}
.icon a.github {background-position: 0 0;}
-.icon a.friendfeed {background-position: -30px -0;}
-.icon a.twitter {background-position: -59px 0;}
-.icon a.linkedin {background-position: -89px 0;}
-.icon a.facebook {background-position: -119px 0;}
-.icon a.iddy {background-position: -149px 0;}
-.icon a.mixi {background-position: -178px 0;}
+.icon a.friendfeed {background-position: -15px -0;}
+.icon a.twitter {background-position: -31px 0;}
+.icon a.linkedin {background-position: -46px 0;}
+.icon a.facebook {background-position: -61px 0;}
+.icon a.iddy {background-position: -77px 0;}
+.icon a.mixi {background-position: -92px 0;}
@@ -1,3 +1,4 @@
+/* @override http://localhost:3000/stylesheets/typography.css?1294243160 */
/* --------------------------------------------------------------
typography.css
@@ -37,9 +38,17 @@ h1,h2,h3,h4,h5,h6 { font-family: Helvetica, arial, sans-serif; color: #181818; f
h1 { font-size: 3em; line-height: 1; margin: .2em 0 0.5em; }
h2 { font-size: 1.8em; margin-bottom: 10px;}
-h3 { font-size: .9em; line-height: 1.25em; margin: 0 0 3px; text-transform: uppercase;font-weight:bold;}
+h3 { font-size: .8em; line-height: 1.25em; margin: 0 0 3px; text-transform: uppercase;font-weight:normal;}
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; }
+
+/* Color ++ Fancy
+-------------------------------------------------------------- */
+.column.right h2 {color: #333;text-shadow:1px 1px #FFF;font-weight:bold;letter-spacing:-.1em;}
+.column.right h3 {color: #666;text-shadow:1px 1px #FFF}
+.meta, .meta a {color: #333;text-shadow:1px 1px #FFF;}
+.meta a {color: #ab0d00;text-decoration:none;}
+.meta a:hover {color: #ab0d00;text-decoration:underline;}

0 comments on commit 2dca769

Please sign in to comment.