diff options
| author | mo <mokha@cisco.com> | 2017-08-31 22:14:22 -0600 |
|---|---|---|
| committer | mo <mokha@cisco.com> | 2017-08-31 22:14:22 -0600 |
| commit | 962ed5421ed3594c0738d4d62a3ebdab6040fb15 (patch) | |
| tree | b32d72c3154fe55b874c7164e5fec1f37d4d8d45 | |
| parent | 7d5f1c69472c1401e2bc65d32782c3bc99a0fed0 (diff) | |
upgrade cakes#show
| -rw-r--r-- | app/views/cakes/_show.html.erb | 21 | ||||
| -rw-r--r-- | app/views/cakes/show.html.erb | 24 |
2 files changed, 16 insertions, 29 deletions
diff --git a/app/views/cakes/_show.html.erb b/app/views/cakes/_show.html.erb index a99777e4..c90129b9 100644 --- a/app/views/cakes/_show.html.erb +++ b/app/views/cakes/_show.html.erb @@ -1,14 +1,14 @@ -<div class="row-fluid"> - <div class="span6"> - <img class="thumbnail" src="<%= @primary_image.url_for(:large) %>" alt="<%= @creation.name %>" /> +<div class="row"> + <div class="col"> + <img class="img-thumbnail" src="<%= @primary_image.url_for(:large) %>" alt="<%= @creation.name %>" /> </div> - <div class="span6"> + <div class="col"> <h1><%= link_to @creation.name, cake_path(@creation) %></h1> <% if user_signed_in? && current_user != @creation.user %> <% if current_user.already_likes(@creation) %> - <i class="fa fa-star fa-4x pull-right"></i> + <i class="fa fa-star fa-4x float-right"></i> <% else %> - <%= link_to cake_favorites_path(cake_id: @creation.id), method: :post, id: 'add-to-favorites-button', class: 'pull-right' do %> + <%= link_to cake_favorites_path(cake_id: @creation.id), method: :post, id: 'add-to-favorites-button', class: 'float-right' do %> <i class="fa fa-star-o fa-4x"></i> <% end %> <% end %> @@ -22,18 +22,11 @@ <span> <i class="icon-tags"></i> </span> <% @creation.tags.each do |tag| -%> <%= link_to creation_tag_path(tag.name) do %> - <span class="label"><%= tag.name %></span> + <span class="badge badge-info"><%= tag.name %></span> <% end %> <% end -%> <% end -%> <hr /> - <div class="row-fluid"> - <% unless user_signed_in? %> - <div class="span6"> - <p><%= link_to "SIGN UP FOR FREE", login_path, :class => "btn btn-primary" %></p> - </div> - <% end %> - </div> <p><%= render_markdown(@creation.story).html_safe -%></p> </div> </div> diff --git a/app/views/cakes/show.html.erb b/app/views/cakes/show.html.erb index a9578c8b..b561f5d5 100644 --- a/app/views/cakes/show.html.erb +++ b/app/views/cakes/show.html.erb @@ -7,21 +7,15 @@ </div> <% if @creation.photos_count > 1 %> - <div class="row-fluid"> - <div class="span12"> - <% @creation.photos.each_slice(12).each do |batch| %> - <ul class='thumbnails'> - <% batch.each do |photo| %> - <li class="span1"> - <%= link_to cake_path(@creation, photo_id: photo.id), remote: true do %> - <%= image_tag(photo.url_for(:thumb), class: "thumbnail") %> - <% end %> - </li> - <% end %> - </ul> - <% end %> - </div> + <div class="card-columns"> + <% @creation.photos.each do |photo| %> + <div class="card"> + <%= link_to cake_path(@creation, photo_id: photo.id), remote: true do %> + <%= image_tag photo.url_for(:thumb), class: "card-img-top" %> + <% end %> + </div> + <% end %> </div> <% end %> -<%= render partial: "shared/disqus", locals: { id: "c-#{@creation.id}" } %> +<%# render partial: "shared/disqus", locals: { id: "c-#{@creation.id}" } %> |
