-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
styled show page. centered image. aligned doses and trashcan.
- Loading branch information
Showing
2 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,32 @@ | ||
<div class="container d-flex justify-content-between"> | ||
<div class="card"> | ||
<div class="container"> | ||
<div class="card mt-3 p-3"> | ||
<h2><%= @cocktail.name %></h2> | ||
<%= cl_image_tag @cocktail.photo.key, height: 300, width: 400, crop: :fill %> | ||
<div style="text-align: center;"><%= cl_image_tag @cocktail.photo.key, height: 300, width: 400, crop: :fill %></div> | ||
</div> | ||
<div class="card"> | ||
<div class="card mt-3 p-3"> | ||
<h3>Ingredients</h3> | ||
<ul class="list-group"> | ||
<% @cocktail.doses.each do |dose| %> | ||
<li class="list-group-item"> | ||
<li class="list-group-item d-flex justify-content-between"> | ||
<div> | ||
<%= dose.description %> | ||
<%= dose.ingredient.name %> | ||
</div> | ||
<div> | ||
<%= link_to dose_path(dose), | ||
method: :delete, | ||
data: { confirm: "Are you sure?" } do %> | ||
<i class="fas fa-trash"></i> | ||
<% end %> | ||
</div> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="container d-flex justify-content-between"> | ||
|
||
<div class="container d-flex justify-content-around mt-3"> | ||
<%= link_to 'Edit name or image', edit_cocktail_path(@cocktail), class: "btn btn-primary" %> | ||
|
||
<%= link_to 'Add Ingredient', new_cocktail_dose_path(@cocktail), class: "btn btn-primary" %> | ||
|
||
<%= link_to 'Back', cocktails_path, class: "btn btn-primary" %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<div class="navbar justify-content-between fixed-top" style="background: white"> | ||
<div class="navbar justify-content-between" style="background: white"> | ||
<%= link_to cocktails_path, style: 'text-decoration: none;' do %><%= image_tag "cocktail.png", class: "avatar"%> Home | ||
<% end %> | ||
</div> |