diff options
| author | mo <mokha@cisco.com> | 2017-09-02 14:05:37 -0600 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2017-09-02 14:05:37 -0600 |
| commit | 5637c4fb5eefd5618be67588d3ebdd34e8a33682 (patch) | |
| tree | 59486edcd8cecc696df373263b0e7431803ece84 | |
| parent | 48b51b49a6fca2bbb6549ee25c817c708d848d61 (diff) | |
adjust cakes#show
| -rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
| -rw-r--r-- | app/views/cakes/_show.html.erb | 18 | ||||
| -rw-r--r-- | app/views/layouts/_footer.html.erb | 9 | ||||
| -rw-r--r-- | app/views/layouts/_header.html.erb | 2 |
4 files changed, 15 insertions, 16 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f33e4465..a673e7c5 100644 --- a/app/helpers/application_helper.rb +++ b/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) diff --git a/app/views/cakes/_show.html.erb b/app/views/cakes/_show.html.erb index 48829ff1..de94b706 100644 --- a/app/views/cakes/_show.html.erb +++ b/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> diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index d05e9019..b33ec496 100644 --- a/app/views/layouts/_footer.html.erb +++ b/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 & 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 © 2013 CakeSide Inc. | - <a href="/terms.html">Terms</a> & <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 © 2013 CakeSide Inc.</p> </div> </div> </div> diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index a711a16a..d09d543a 100644 --- a/app/views/layouts/_header.html.erb +++ b/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> |
