Skip to content

Commit 5da3b24

Browse files
committed
show page
1 parent e1c1852 commit 5da3b24

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ yarn-debug.log*
4040
*.swp
4141
.DS_Store
4242
.env*
43+
.env*

app/assets/stylesheets/application.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
@import "components/index";
1313
@import "pages/index";
1414
@import "pages/search";
15+
@import "pages/show";
1516

1617

1718
.content {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.show-card{
2+
background-size : fit;
3+
background-color: #333;
4+
color: white,
5+
}
6+
7+
8+
show-pic{
9+
border: 2px solid #A01170
10+
}

app/views/masks/show.html.erb

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
<h1><%= @mask.name %></h1>
2-
<h2><%= @mask.price %></h2>
3-
<p><%= @mask.description %></p>
4-
<% if @mask.photo.attached? %>
5-
<%= cl_image_tag @mask.photo.key, height: 300, width: 400, crop: :fill %>
6-
<% end %>
7-
<p><%= @mask.category %></p>
8-
<%= link_to 'Edit the mask', edit_mask_path(@mask) %>
9-
<%= link_to 'See all masks', masks_path %>
10-
<%= link_to 'Delete the mask!', mask_path(@mask), method: :delete %>
11-
1+
<div class="container-product">
2+
<div class = "show-card">
3+
<h1><%= @mask.name %></h1>
4+
<h2><%= @mask.price %></h2>
5+
<p>Description: <%= @mask.description %></p>
6+
<% if @mask.photo.attached? %>
7+
<%= cl_image_tag @mask.photo.key, height: 300, width: 400, crop: :fit %>
8+
<% end %>
9+
<p><%= @mask.category %></p>
10+
<%= link_to 'Edit the mask', edit_mask_path(@mask) %>
11+
<%= link_to 'See all masks', masks_path %>
12+
<%= link_to 'Delete the mask!', mask_path(@mask), method: :delete %>
13+
</div>
14+
</div>

0 commit comments

Comments
 (0)