mirror of
https://github.com/Nezumi-2711/loi-phan-internship.git
synced 2026-09-22 13:38:31 +00:00
Update mixins.pug and offer.pug file
This commit is contained in:
@@ -1,25 +1,22 @@
|
|||||||
- var values = [1, 2, 3];
|
- var values = [1, 2, 3];
|
||||||
|
|
||||||
mixin cardFoodItem(itemFood, price, ratePoint, foodName, foodDescription)
|
mixin cardFoodItem(food)
|
||||||
.card-item
|
.card-item
|
||||||
img.card-img(src=offer_img_path + "item-card.png", alt="Item card image")
|
img.card-img(src=offer_img_path + "item-card.png", alt="Item card image")
|
||||||
img.food-image(
|
img.food-image(src=food.imageUrl, alt=food.name + " image")
|
||||||
src=offer_img_path + "food-" + itemFood + ".png",
|
span.price= food.price + "$"
|
||||||
alt="Food " + itemFood + " image"
|
|
||||||
)
|
|
||||||
span.price= price + "$"
|
|
||||||
.content-card
|
.content-card
|
||||||
.rate
|
.rate
|
||||||
.avatar-container
|
.avatar-container
|
||||||
each val in values
|
each val in values
|
||||||
img(
|
img(
|
||||||
src=offer_img_path + "avatar-" + val + "-item-" + itemFood + ".png",
|
src=offer_img_path + "avatar-" + val + "-item-" + food.no + ".png",
|
||||||
alt="Avatar user rate",
|
alt="Avatar user rate",
|
||||||
class="avatar-" + val
|
class="avatar-" + val
|
||||||
)
|
)
|
||||||
.star-container
|
.star-container
|
||||||
img(src=offer_img_path + "star.png", alt="Star image")
|
img(src=offer_img_path + "star.png", alt="Star image")
|
||||||
span.rate-point= "(" + ratePoint + ")"
|
span.rate-point= "(" + food.ratePoint + ")"
|
||||||
span.food-name= foodName
|
p.food-name= food.foodName
|
||||||
p.food-description= foodDescription
|
p.food-description= food.foodDescription
|
||||||
a.order-btn.btn.no-underline(href="javascript:void(0)") Order now
|
a.order-btn.btn.no-underline(href="javascript:void(0)") Order now
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
- var offer_img_path = "./assets/images/offer/";
|
- var offer_img_path = "./assets/images/offer/";
|
||||||
|
- var food_1 = [];
|
||||||
|
|
||||||
section.offer
|
section.offer
|
||||||
.offer__container
|
.offer__container
|
||||||
@@ -13,10 +14,10 @@ section.offer
|
|||||||
= " Offers"
|
= " Offers"
|
||||||
p.offer__description Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
|
p.offer__description Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
|
||||||
.offer__card-list
|
.offer__card-list
|
||||||
+cardFoodItem(1, 10, "4.5", "Kebab", "Lorem Ipsum is simply dummy text of the printing and typesetting industry")
|
+cardFoodItem({ no: "1", price: "10" , ratePoint: "4.5", foodName: "Kebab", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", imageUrl: offer_img_path + "food-1.png"})
|
||||||
+cardFoodItem(2, 15, "4.8", "Chicken Tikka", "Lorem Ipsum is simply dummy text of the printing and typesetting industry")
|
+cardFoodItem({ no: "2", price: "15", ratePoint: "4.8", foodName: "Chicken Tikka", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", imageUrl: offer_img_path + "food-2.png"})
|
||||||
+cardFoodItem(3, 8, "4.2", "Desi Chowmein", "Lorem Ipsum is simply dummy text of the printing and typesetting industry")
|
+cardFoodItem({ no: "3", price: "8", ratePoint: "4.2", foodName: "Desi Chowmein", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", imageUrl: offer_img_path + "food-3.png"})
|
||||||
+cardFoodItem(4, 28, "5.0", "Chicken Chargha", "Lorem Ipsum is simply dummy text of the printing and typesetting industry")
|
+cardFoodItem({ no: "4", price: "28", ratePoint: "5.0", foodName: "Chicken Chargha", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", imageUrl: offer_img_path + "food-4.png"})
|
||||||
.offer__rosemary-container
|
.offer__rosemary-container
|
||||||
picture
|
picture
|
||||||
source(
|
source(
|
||||||
|
|||||||
Reference in New Issue
Block a user