Commit 5637c4fb

mo <mokha@cisco.com>
2017-09-02 20:05:37
adjust cakes#show
1 parent 48b51b4
app/helpers/application_helper.rb
@@ -10,7 +10,7 @@ module ApplicationHelper
   end
 
   def full_title(title)
-    title.blank? ?  "CakeSide - for cake lovers!" : "#{title} - CakeSide"
+    title.blank? ? "CakeSide - for cake lovers!" : "#{title} - CakeSide"
   end
 
   def disqus_auth(user = current_user)
app/views/cakes/_show.html.erb
@@ -1,10 +1,19 @@
 <div class="row">
   <div class="col">
-    <img class="img-thumbnail" src="<%= @primary_image.url_for(:large) %>" alt="<%= @creation.name %>" />
+    <img class="rounded img-fluid mx-auto d-block" src="<%= @primary_image.url_for(:large) %>" alt="<%= @creation.name %>" />
   </div>
+</div>
+<div class="row">
   <div class="col">
     <h1><%= link_to @creation.name, cake_path(@creation) %></h1>
     <p>By <%= link_to @creation.user.name, profile_path(@creation.user) %></p>
+    <% if user_signed_in? && current_user != @creation.user %>
+      <% if current_user.already_likes(@creation) %>
+        <i class="fa fa-star fa-4x float-right"></i>
+      <% else %>
+        <%= link_to "Add To Favorites", cake_favorites_path(cake_id: @creation.id), method: :post, id: 'add-to-favorites-button', class: 'btn btn-secondary float-right' %>
+      <% end %>
+    <% end %>
     <p>
       <i class="fa fa-filter icon-large"></i>
       <%= link_to @creation.category.name, category_path(@creation.category) %>
@@ -18,13 +27,6 @@
       <% end -%>
     <% end -%>
     <hr />
-    <% if user_signed_in? && current_user != @creation.user %>
-      <% if current_user.already_likes(@creation) %>
-        <i class="fa fa-star fa-4x float-right"></i>
-      <% else %>
-        <%= link_to "Add To Favorites", cake_favorites_path(cake_id: @creation.id), method: :post, id: 'add-to-favorites-button', class: 'btn btn-secondary float-right' %>
-      <% end %>
-    <% end %>
     <p><%= render_markdown(@creation.story).html_safe -%></p>
   </div>
 </div>
app/views/layouts/_footer.html.erb
@@ -8,6 +8,8 @@
           <li> <%= link_to "Home", root_path %> </li>
           <li> <%= link_to "About Us", about_us_path %> </li>
           <li> <%= link_to "Why CakeSide?", why_cakeside_path %> </li>
+          <li> <a href="/terms.html">Terms &amp; Conditions</a> </li> 
+          <li> <a href="/privacy.html">Privacy Policy</a> </li>
         </ul>
       </div>
       <div class="col">
@@ -25,12 +27,7 @@
     <div class="container">
       <div class="row">
         <div class="col">
-          <p>
-          Copyright &copy; 2013 CakeSide Inc. | 
-          <a href="/terms.html">Terms</a> &amp; <a href="/privacy.html">Privacy</a> | 
-          Contact Us <a href="https://twitter.com/cakeside">@cakeside</a> | 
-          <a href="https://www.facebook.com/pages/CakeSide/214607468615074">facebook</a>
-          </p>
+          <p>Copyright &copy; 2013 CakeSide Inc.</p>
         </div>
       </div>
     </div>
app/views/layouts/_header.html.erb
@@ -1,6 +1,6 @@
 <div class="container">
   <nav class="navbar navbar-expand-lg navbar-light bg-light">
-    <%= link_to "Cakeside", root_path, class: 'navbar-brand', style: 'color:hotpink;' %>
+    <%= link_to "CakeSide", root_path, class: 'navbar-brand', style: 'color:hotpink;' %>
     <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
       <span class="navbar-toggler-icon"></span>
     </button>