feat: complete day 13
This commit is contained in:
+16
-1
@@ -2,4 +2,19 @@ extends layout
|
||||
|
||||
block content
|
||||
h1= title
|
||||
p Welcome to #{title}
|
||||
a.btn.btn-success.mb-4(href="/create-product") Create Product
|
||||
if products && products.length
|
||||
.row
|
||||
each product in products
|
||||
.col-md-4.mb-4
|
||||
.card
|
||||
if product.image
|
||||
img.card-img-top(src=product.image, alt=product.title, style="width:100px;height:100px;object-fit:contain;")
|
||||
.card-body
|
||||
h5.card-title= product.title
|
||||
p.card-text= product.description
|
||||
p.card-text
|
||||
strong $#{product.price}
|
||||
a.btn.btn-primary(href=`/product/${product.id}`) View Details
|
||||
else
|
||||
p No products found.
|
||||
|
||||
Reference in New Issue
Block a user