Merge branch 'html-css-practice-two' into feature/offers-style

This commit is contained in:
2023-07-25 09:15:01 +07:00
25 changed files with 144 additions and 135 deletions

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+14 -18
View File
@@ -1,25 +1,21 @@
- var values = [1, 2, 3]; mixin foodItemCard(food)
mixin cardFoodItem(itemFood, price, ratePoint, foodName, foodDescription)
.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 if food.avatarImageList && food.avatarImageList.length > 0
img( each avatar, index in food.avatarImageList
src=offer_img_path + "avatar-" + val + "-item-" + itemFood + ".png", img(
alt="Avatar user rate", src=avatar.avatarUrl,
class="avatar-" + val alt="Avatar user rate",
) class="avatar-" + index
)
.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(href="javascript:void(0)") Order now
+9 -4
View File
@@ -1,4 +1,11 @@
- var offer_img_path = "./assets/images/offer/"; - var offer_img_path = "./assets/images/offer/";
- var avatar_img_path = "./assets/images/avatar/";
- var food_1 = { imageUrl: offer_img_path + "food-1.png", price: "10", ratePoint: "4.5", foodName: "Kebab", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", avatarImageList: [{ avatarUrl: avatar_img_path + "avatar-1.png" }, { avatarUrl: avatar_img_path + "avatar-2.png" }, { avatarUrl: avatar_img_path + "avatar-3.png" }] };
- var food_2 = { imageUrl: offer_img_path + "food-2.png", price: "15", ratePoint: "4.8", foodName: "Chicken Tikka", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", avatarImageList: [{ avatarUrl: avatar_img_path + "avatar-4.png" }, { avatarUrl: avatar_img_path + "avatar-5.png" }, { avatarUrl: avatar_img_path + "avatar-6.png" }] };
- var food_3 = { imageUrl: offer_img_path + "food-3.png", price: "8", ratePoint: "4.2", foodName: "Desi Chowmein", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", avatarImageList: [{ avatarUrl: avatar_img_path + "avatar-7.png" }, { avatarUrl: avatar_img_path + "avatar-8.png" }, { avatarUrl: avatar_img_path + "avatar-9.png" }] };
- var food_4 = { imageUrl: offer_img_path + "food-4.png", price: "28", ratePoint: "5.0", foodName: "Chicken Chargha", foodDescription: "Lorem Ipsum is simply dummy text of the printing and typesetting industry", avatarImageList: [{ avatarUrl: avatar_img_path + "avatar-1.png" }, { avatarUrl: avatar_img_path + "avatar-2.png" }, { avatarUrl: avatar_img_path + "avatar-3.png" }] };
- var list_food = [food_1, food_2, food_3, food_4];
section.offer section.offer
.offer__container .offer__container
@@ -13,10 +20,8 @@ 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") each val in list_food
+cardFoodItem(2, 15, "4.8", "Chicken Tikka", "Lorem Ipsum is simply dummy text of the printing and typesetting industry") +foodItemCard(val)
+cardFoodItem(3, 8, "4.2", "Desi Chowmein", "Lorem Ipsum is simply dummy text of the printing and typesetting industry")
+cardFoodItem(4, 28, "5.0", "Chicken Chargha", "Lorem Ipsum is simply dummy text of the printing and typesetting industry")
.offer__rosemary-container .offer__rosemary-container
picture picture
source( source(
+99 -95
View File
@@ -1,100 +1,104 @@
- var welcome_img_path = "./assets/images/welcome/"; - var welcome_img_path = "./assets/images/welcome/";
section.welcome section.welcome
.welcome__banner .welcome__container
.welcome__banner-container .welcome__banner
img.welcome__banner-img( .welcome__banner-container
src=welcome_img_path + "welcome-image-mobile.png", img.welcome__banner-img(
alt="Welcome banner image" src=welcome_img_path + "welcome-image-mobile.png",
) alt="Welcome banner image"
picture
source(
media="(min-width: 840px)",
srcset=welcome_img_path + "lines-background-desktop.png"
) )
img.welcome__lines-background( picture
src=welcome_img_path + "lines-background-mobile.png", source(
alt="Lines background" media="(min-width: 840px)",
) srcset=welcome_img_path + "lines-background-desktop.png"
picture
source(
media="(min-width: 840px)",
srcset=welcome_img_path + "arrow-desktop.png",
alt="Arrow image"
)
img.welcome__arrow-img-up(
src=welcome_img_path + "arrow-mobile.png",
alt="Arrow image"
)
img.welcome__mint-img(
src=welcome_img_path + "mint.png",
alt="Mint image"
)
.welcome__content
.welcome__arrow-down-img-wrapper
img.welcome__arrow-img-down(
src=welcome_img_path + "arrow-desktop-2.png",
alt="Arrow image down"
)
.welcome__orange-img-wrapper
picture
source(
media="(min-width: 840px)",
srcset=welcome_img_path + "orange-desktop.png"
)
img(src=welcome_img_path + "orange.png", alt="Orange background image")
.welcome__text-box
.welcome__icon-container
img.welcome__love-icon(
src=welcome_img_path + "love-icon.png",
alt="Love icon"
)
.welcome__head-arrow-container
img(src=welcome_img_path + "head-arrow.png", alt="Head arrow image")
p.welcome__text-box-content People Trust us
h1.welcome__heading We're
= " "
span.primary-text serious
= " for "
span.primary-text food
= " & "
.delivery-text-box
span.secondary-text delivery
.welcome__underline-img-container
img(src=welcome_img_path + "underline.png", alt="Underline image")
= "."
p.welcome__description Best cooks and best delivery guys all at your service. Hot tasty food will reach you in 60 minutes.
form.welcome__search-form(action="#")
.welcome__search-icon-wrapper
img.welcome__search-icon(
src=welcome_img_path + "search-icon.png",
alt="Search icon"
)
input.welcome__text-input(type="text", placeholder="Search food")
button.welcome__submit-btn(type="submit")
img.welcome__search-icon-btn(
src=welcome_img_path + "search-icon-btn.svg",
alt="Search button image"
)
.welcome__action-container
a.welcome__download-btn.btn(href="javascript:void(0)") Download App
a.welcome__watch-video-link.no-underline(href="javascript:void(0)")
.welcome__play-icon-wrapper
svg.welcome__play-icon(
width="12",
height="12",
viewBox="0 0 12 13",
fill="none",
xmlns="http://www.w3.org/2000/svg"
) )
path( img.welcome__lines-background(
d="M12 6.5L0.749999 12.9952L0.75 0.00480889L12 6.5Z", src=welcome_img_path + "lines-background-mobile.png",
fill="currentColor" alt="Lines background"
) )
span.welcome__text-download-btn Watch Video picture
.welcome__slider-container source(
img.welcome__slider-img( media="(min-width: 840px)",
src=welcome_img_path + "slider.png", srcset=welcome_img_path + "arrow-desktop.png",
alt="Slider image" alt="Arrow image"
) )
img.welcome__arrow-img-up(
src=welcome_img_path + "arrow-mobile.png",
alt="Arrow image"
)
img.welcome__mint-img(
src=welcome_img_path + "mint.png",
alt="Mint image"
)
.welcome__content
.welcome__arrow-down-img-wrapper
img.welcome__arrow-img-down(
src=welcome_img_path + "arrow-desktop-2.png",
alt="Arrow image down"
)
.welcome__orange-img-wrapper
picture
source(
media="(min-width: 840px)",
srcset=welcome_img_path + "orange-desktop.png"
)
img(
src=welcome_img_path + "orange.png",
alt="Orange background image"
)
.welcome__text-box
.welcome__icon-container
img.welcome__love-icon(
src=welcome_img_path + "love-icon.png",
alt="Love icon"
)
.welcome__head-arrow-container
img(src=welcome_img_path + "head-arrow.png", alt="Head arrow image")
p.welcome__text-box-content People Trust us
h1.welcome__heading We're
= " "
span.primary-text serious
= " for "
span.primary-text food
= " & "
.delivery-text-box
span.secondary-text delivery
.welcome__underline-img-container
img(src=welcome_img_path + "underline.png", alt="Underline image")
= "."
p.welcome__description Best cooks and best delivery guys all at your service. Hot tasty food will reach you in 60 minutes.
form.welcome__search-form(action="#")
.welcome__search-icon-wrapper
img.welcome__search-icon(
src=welcome_img_path + "search-icon.png",
alt="Search icon"
)
input.welcome__text-input(type="text", placeholder="Search food")
button.welcome__submit-btn(type="submit")
img.welcome__search-icon-btn(
src=welcome_img_path + "search-icon-btn.svg",
alt="Search button image"
)
.welcome__action-container
a.welcome__download-btn.btn(href="javascript:void(0)") Download App
a.welcome__watch-video-link.no-underline(href="javascript:void(0)")
.welcome__play-icon-wrapper
svg.welcome__play-icon(
width="12",
height="12",
viewBox="0 0 12 13",
fill="none",
xmlns="http://www.w3.org/2000/svg"
)
path(
d="M12 6.5L0.749999 12.9952L0.75 0.00480889L12 6.5Z",
fill="currentColor"
)
span.welcome__text-download-btn Watch Video
.welcome__slider-container
img.welcome__slider-img(
src=welcome_img_path + "slider.png",
alt="Slider image"
)
@@ -4,20 +4,22 @@
} }
.welcome { .welcome {
@include flex-container(center, column);
margin: auto;
max-width: 428px;
padding-top: 117px;
background: linear-gradient( background: linear-gradient(
180deg, 180deg,
rgba(245, 71, 72, 0.06) 0%, rgba(245, 71, 72, 0.06) 0%,
rgba(245, 71, 72, 0) 100% rgba(245, 71, 72, 0) 100%
); );
&__container {
@include flex-container(true, center, column);
margin: auto;
max-width: 428px;
padding-top: 117px;
}
// Start banner // Start banner
&__banner-container { &__banner-container {
@include size(428px, auto); @include size(428px, auto);
@include flex-container(center, column); @include flex-container(true, center, column);
position: relative; position: relative;
} }
@@ -44,7 +46,7 @@
// Start content // Start content
&__content { &__content {
@include flex-container($flex-direction: column); @include flex-container(true, $flex-direction: column);
@include size(calc(428px - 48px), auto); @include size(calc(428px - 48px), auto);
position: relative; position: relative;
@@ -61,7 +63,7 @@
} }
&__text-box { &__text-box {
@include flex-container($align-items: center, $gap: 6px); @include flex-container(true, $align-items: center, $gap: 6px);
@include size(fit-content); @include size(fit-content);
background-color: #feeae9; background-color: #feeae9;
@@ -112,7 +114,7 @@
} }
&__search-form { &__search-form {
@include flex-container(); @include flex-container(true);
margin-top: 32px; margin-top: 32px;
border-radius: 100px; border-radius: 100px;
@@ -154,7 +156,7 @@
} }
&__action-container { &__action-container {
@include flex-container($justify-content: space-between); @include flex-container(true, $justify-content: space-between);
width: 100%; width: 100%;
margin-top: 44px; margin-top: 44px;
@@ -162,7 +164,7 @@
} }
&__watch-video-link { &__watch-video-link {
@include flex-container($align-items: center, $gap: 21px); @include flex-container(true, $align-items: center, $gap: 21px);
position: relative; position: relative;
@@ -219,15 +221,17 @@
@media screen and (min-width: 840px) { @media screen and (min-width: 840px) {
.welcome { .welcome {
@include flex-container( &__container {
$flex-direction: row-reverse, @include flex-container(
$align-items: center, $flex-direction: row-reverse,
$justify-content: space-between $align-items: center,
); $justify-content: space-between
);
padding-top: 130px; padding-top: 130px;
width: 100%; width: 100%;
max-width: $max-width; max-width: $max-width;
}
// Start banner // Start banner
&__banner-img { &__banner-img {