Commit 9db77bdc

morilla <mo@mokhan.ca>
2011-05-04 22:29:47
its almost ready to go live.
1 parent 91d1d4d
app/views/creations/show.html.erb
@@ -5,19 +5,23 @@
     <p>
       <%= image_tag @creation.image_url.to_s, :class => 'photo' %>
     </p>
+    <p> submitted on: <%= @creation.created_at %> </p>
   </div>
   <div class="width50 floatRight">
     <p>
       <strong>Story:</strong>
       <%= @creation.story %>
     </p>
+    <div class="space"></div>
     <p>
-<div class="space"></div>
-    <% if @creation.user == current_user %>
-      <%= link_to 'Edit', edit_creation_path(@creation) %> |
-      <%= button_to 'delete', @creation, :method => :delete %>
-    <% end %>
-      <%= link_to 'Back', creations_path %>
+        <% if @creation.user == current_user %>
+          <%= link_to 'Edit', edit_creation_path(@creation) %> |
+          <%= button_to 'delete', @creation, :method => :delete %>
+        <% end %>
+        <% if signed_in? %>
+          <%= link_to "add creation", new_creation_path %>
+        <% end %>
+        <%= link_to 'Back', creations_path %>
     </p>
   </div>
 </div>
app/views/devise/registrations/edit.html.erb
@@ -29,12 +29,13 @@
   <p><%= f.submit "Update" %></p>
 <% end %>
 
-<h3>Cancel my account</h3>
+<div class="heading">Cancel my account</div>
 
-<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
+<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
 
+<div class="space"></div>
+<div class="space"></div>
 <%= link_to "Back", :back %>
-
 <div class="space"></div>
 <div class="clear"></div>
 <div class="hr"></div>
app/views/home/index.html.erb
@@ -16,66 +16,34 @@
 <div class="heading">Mmm... Cake!</div>
 
 <div class="organic">
-  <div class="organicHolder">
-    <div class="organicContent">
-      <a href="<%= url_for @creations[0] %>">
-        <%= image_tag @creations[0].image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt=> @creations[0].name %>
-      </a>
-      <h2><%= @creations[0].name %></h2>
-      <p><%= @creations[0].story %></p>
+<% @creations.reverse.each_with_index do |creation, index| %>
+    <div class="organicHolder">
+      <div class="organicContent">
+        <a href="<%= url_for creation %>">
+          <%= image_tag creation.image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt => creation.name %>
+        </a>
+        <h2><%= creation.name %></h2>
+        <p><%= creation.story %> <%= link_to 'more...', creation %></p>
+      </div>
     </div>
-  </div>
-
+    <% if index == 4 %>
   <div class="organicHolder">
-    <div class="organicContent">
-      <a href="<%= url_for @creations[1] %>">
-      <%= image_tag @creations[1].image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt=> @creations[1].name %>
-      </a>
-      <h2><%= @creations[1].name %></h2>
-      <p><%= @creations[1].story %></p>
-    </div>
-  </div>
-
-  <div class="organicHolder">
-    <div class="organicContent">
-      <a href="<%= url_for @creations[2] %>">
-      <%= image_tag @creations[2].image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt=> @creations[2].name %>
-      </a>
-      <h2><%= @creations[2].name %></h2>
-      <p><%= @creations[2].story %></p>
+    <div class="vegetable">
+      <h3>Learn About Our Cakes</h3>
     </div>
   </div>
+    <% end %>
+    <% if (index +1) % 3 == 0 %>
 </div>
 
 <div class="space"></div>
-
 <div class="organic">
-  <div class="organicHolder">
-    <div class="organicContent">
-      <a href="<%= url_for @creations[3] %>">
-      <%= image_tag @creations[3].image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt=> @creations[3].name %>
-      </a>
-      <h2><%= @creations[3].name %></h2>
-      <p><%= @creations[3].story %></p>
-    </div>
-  </div>
 
-  <div class="organicHolder">
-    <div class="organicContent">
-      <a href="<%= url_for @creations[4] %>">
-      <%= image_tag @creations[4].image_url.to_s, :width => "285px", :height => "140px", :class => "photo", :alt=> @creations[4].name %>
-      </a>
-      <h2><%= @creations[4].name %></h2>
-      <p><%= @creations[4].story %></p>
-    </div>
-  </div>
+  <% end %>
 
-  <div class="organicHolder">
-    <div class="vegetable">
-      <h3>Learn About Our Cakes</h3>
-    </div>
-  </div>
+<% end %>
 </div>
+
 <div class="clear"></div>
 
 <div class="hr"></div>
app/views/layouts/application.html.erb
@@ -7,11 +7,11 @@
   <meta name="description" content="">
   <meta name="author" content="">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <link rel="shortcut icon" href="/favicon.ico">
-  <script src="javascripts/libs/modernizr-1.7.min.js"></script>
-  <%= stylesheet_link_tag :all %>
-  <%= csrf_meta_tag %>
-  <%= yield :head %>
+<link rel="shortcut icon" href="/favicon.ico">
+<script src="javascripts/libs/modernizr-1.7.min.js"></script>
+<%= stylesheet_link_tag :all %>
+<%= csrf_meta_tag %>
+<%= yield :head %>
 </head>
 <body>
   <div id="main"><!-- Main starts here -->
@@ -35,13 +35,13 @@
 
       <div class="menu">
         <ul id="menu">
-          <li class="home"><%= link_to "home", home_index_path %></li>
-          <li class="commit"><%= link_to "browse", creations_path %></li>
-          <li class="contact"><a href="#contact">contact us</a></li>
+          <li class="small"><%= link_to "home", home_index_path %></li>
+          <li class="medium"><%= link_to "browse", creations_path %></li>
+          <li class="large"><a href="#contact">contact us</a></li>
         </ul>
       </div>
       <div class="subs">
-        <p>SUBCRIBE to RSS</p><img src="/images/rss.png" alt="" />
+        <a href="<%= url_for home_index_path %>.xml"><p>SUBCRIBE to RSS</p><img src="/images/rss.png" alt="" /></a>
       </div>
     </div><!-- Header ends here -->
     </header>
@@ -85,19 +85,19 @@
     </div>
     <div id="contentBottom"></div><!-- Content ends here -->
 
+  </div><!-- Main ends here -->
     <div class="bottomHolder">
-      <div class="copy">&copy; 2011 CakeSide Inc.</div>
+      <div class="copy"><p>&copy; 2011 CakeSide Inc.</p></div>
       <div class="design"><a href="#">SuLuMo</a></div>
     </div>
-  </div><!-- Main ends here -->
 
-  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
-  <%= javascript_include_tag :all %>
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
+<%= javascript_include_tag :all %>
 
   <!--[if lt IE 7 ]>
   <script src="javascripts/libs/dd_belatedpng.js"></script>
   <script> DD_belatedPNG.fix('img, .png_bg');</script>
-  <![endif]-->
+  <![endif]-->
   <script>
     var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; // Change UA-XXXXX-X to be your site's ID
     (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
public/stylesheets/layout.css
@@ -1,7 +1,7 @@
-.width100{width: 100%;}
+.width100{width: 100%; background: #fff;}
 .width80{width: 80%;}
 .width75{width: 75%;}
-.width50{width: 50%;}
+.width50{width: 50%;background: #fff;}
 .width25{width: 25%;}
 .width20{width: 20%;}
 .width33{width: 33.3%;}
public/stylesheets/organic.css
@@ -1,16 +1,16 @@
 *{
 margin:0px;
 padding:0px;
+background-color: #000;
 }
+div {background-color: #fff;}
+input {background-color: #fff;}
+textarea {background-color: #fff;}
+i {background-color: #fff;}
+strong {background-color: #fff;}
 
-img {
-border:none;	
-}
-
-.clear{
-clear:both;	
-}
-
+img { border:none;	}
+.clear{ clear:both;	}
 
 .space{
 clear:both;
@@ -28,8 +28,8 @@ body{
 #main{
 	width:1200px;
 	margin:0px auto;
-	height:1400px;
-  background-color: #ff00ba;
+  background-color: pink;
+  /* background-color: #ff00ba; */
   /*background-color: #f99cf9; */
 }
 
@@ -134,42 +134,32 @@ background: none;
 	color:#ffffff;
 }
 
-.menu .home a{
+.menu .small a{
 background:url(../images/homeA.png) no-repeat bottom center;
 padding:10px 22px 5px;
 }
 
-.menu .home a:hover{
+.menu .small a:hover{
 background:url(../images/homeAhover.png) no-repeat bottom center;
 padding:10px 22px 5px;
 }
 
-.menu .commit a{
+.menu .medium a{
 background:url(../images/commitA.png) no-repeat bottom center;
 padding:10px 18px 5px;
 }
 
-.menu .commit a:hover{
+.menu .medium a:hover{
 background:url(../images/commitAhover.png) no-repeat bottom center;
 padding:10px 18px 5px;
 }
 
-.menu .organic a{
-background:url(../images/organicA.png) no-repeat bottom center;
-padding:10px 18px 5px;
-}
-
-.menu .organic a:hover{
-background:url(../images/organicAhover.png) no-repeat bottom center;
-padding:10px 18px 5px;
-}
-
-.menu .contact a{
+.menu .large a{
 background:url(../images/contactA.png) no-repeat bottom center;
 padding:10px 22px 5px;
 }
 
-.menu .contact a:hover{
+.menu .large a:hover{
 background:url(../images/contactAhover.png) no-repeat bottom center;
 padding:10px 22px 5px;
 }
@@ -183,9 +173,7 @@ margin-top:60px;
 margin-bottom:-10px;
 }
 
-.subs img{
-float:right;	
-}
+.subs img{ float:right;	}
 
 .subs p{
 float:left;	
@@ -402,7 +390,7 @@ width:auto;
 
 .bottomHolder{
 	font-size:12px;
-	color:#26120f;
+	color:#fff;
 	margin:5px auto;
 	width:980px;
 }
@@ -410,20 +398,23 @@ width:auto;
 .copy{
 float:left;	
 width:auto;
+	color:#fff;
 }
+.copy p{ color:#fff; }
 
 .design{
 	float:right;
 	width:auto;
+  color:#fff;
 }
 
 .design a{
-	color:#26120f;
+	color:#fff;
 	text-decoration:none;
 }
 
 .design a:hover{
-	color:#26120f;
+	color:#fff;
 	text-decoration:underline;
 }
 
public/uploads/creation/image/1/haunted_house_2.jpg
Binary file
public/uploads/creation/image/2/thanksgiving_cake.jpg
Binary file
public/uploads/creation/image/3/ecompliance_bday_cake.jpg
Binary file
public/uploads/creation/image/4/camouflagetruckcake5.jpg
Binary file
public/uploads/creation/image/5/couch_cake__3.jpg
Binary file
public/uploads/creation/image/8/ecompliance_bday_cake.jpg
Binary file
.gitignore
@@ -3,3 +3,4 @@ db/*.sqlite3
 log/*.log
 tmp/**/*
 *.swp
+public/uploads/