Skip to content

Commit

Permalink
refactored the classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Burla4enko committed Aug 3, 2022
1 parent 19e31ae commit 1f4f1f7
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 209 deletions.
8 changes: 5 additions & 3 deletions src/partials/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ <h2 class="section__title about__title">how it’s made?</h2>

<div class="about__column about__column--second">
<p class="about__paragraph about__paragraph--first">
Ice cream is a sweetened frozen food usually made from milk or cream and is flavoured with a sweetener, a spice, such as cocoa or vanilla, or with fruit.
Ice cream is a sweetened frozen food usually made from milk or cream
and is flavoured with a sweetener, a spice, such as cocoa or vanilla,
or with fruit.
</p>
<p class="about__paragraph about__paragraph--second">
Milk is a nutrient-rich liquid food produced by the mammary glands of
mammals. It is the primary source of nutrition for young mammals
(including breastfed human infants) before they are able to digest solid
food.<span class="about__ending">
(including breastfed human infants) before they are able to digest
solid food.<span class="about__ending">
Immune factors and immune-modulating components...</span
>
</p>
Expand Down
6 changes: 2 additions & 4 deletions src/partials/contactmodal.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
placeholder=" "
required
/>
<label for="user-tel" class="modal__fr-label"
>Tel: (0xx-xxx-xx-xx)</label
>
<label for="user-tel" class="modal__fr-label">Tel:</label>
</div>
</div>
<div class="modal__fr-field">
Expand All @@ -51,7 +49,7 @@
</div>
</div>

<button type="submit" class="modal__fr-btn">Submit</button>
<button type="submit" class="btn btn--centered">Submit</button>
</form>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions src/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</nav>
<button
type="button"
class="header__btn-buy header__btn-buy--fixed"
class="btn btn--with-icon btn--reverse header__btn-buy header__btn-buy--fixed"
data-modal-open
>
Buy now
Expand All @@ -68,7 +68,10 @@
<use href="./images/icons-sprite.svg#icon-menu-cross"></use>
</svg>
</button>
<button type="button" class="header__btn-buy header__btn-buy--mobile">
<button
type="button"
class="btn btn--with-icon btn--reverse header__btn-buy header__btn-buy--mobile"
>
Buy now
<svg class="buy__btn-arrow" width="6" height="9">
<use href="./images/icons-sprite.svg#icon-arrow-right-btn"></use>
Expand Down
12 changes: 4 additions & 8 deletions src/partials/videomodal.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<div class="video-backdrop is-hidden" data-hero-video>
<div class="videomodal">
<button
type="button"
class="videomodal__button-close"
id="close-video-modal"
>
<svg class="videomodal__icon-close" width="15" height="15">
<div class="modal-backdrop is-hidden" data-hero-video>
<div class="modal modal--video">
<button type="button" class="modal__close-btn" id="close-video-modal">
<svg class="modal__close-icon" width="12" height="12">
<use href="./images/icons-sprite.svg#icon-menu-cross"></use>
</svg>
</button>
Expand Down
42 changes: 25 additions & 17 deletions src/sass/components/_about.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
.about {
padding-top: var(--section-padding);
background-color: var(--bg-color-light);
position: relative;

@include tablet() {
padding-bottom: 0;
}
}

.about .container {
position: relative;
z-index: 2;
}

.about::before {
@include desktop() {
content: "";
display: block;
width: 1200px;
height: 100%;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);

background-image: url(../images/about/milk-bg-desk.png);
background-size: 100%;
background-repeat: no-repeat;
background-position: right 241px;
background-position: right 240px;

@include retina() {
background-image: url(../images/about/[email protected]);
Expand All @@ -34,22 +49,6 @@
.about__wrap {
min-width: 280px;

background-image: url(../images/about/milk-bg-mob.png);
background-repeat: no-repeat;
background-size: 100%;
background-position: right 395px;

@media screen and (min-width: 330px) {
background-position: right 380px;
}
@media screen and (min-width: 403px) {
background-position: right 357px;
}

@include retina() {
background-image: url(../images/about/[email protected]);
}

@include tablet() {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -87,6 +86,15 @@
.about__column--second {
@include mobile-only() {
padding-right: 60px;

background-image: url(../images/about/milk-bg-mob.png);
background-repeat: no-repeat;
background-size: 100%;
background-position: right 25%;

@include retina() {
background-image: url(../images/about/[email protected]);
}
}

@include desktop() {
Expand Down
9 changes: 8 additions & 1 deletion src/sass/components/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: block;
min-width: 161px;
min-height: 44px;
padding: 14px 17px;
padding: 12px 17px;

border: 0;
border-radius: 22px;
Expand Down Expand Up @@ -78,6 +78,13 @@
margin-left: auto;
}

.btn--animated {
animation-name: shadow-drop-center;
animation-duration: 2000ms;
animation-iteration-count: infinite;
animation-direction: alternate;
}

.btn-round {
width: 40px;
height: 40px;
Expand Down
23 changes: 17 additions & 6 deletions src/sass/components/_contactmodal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,26 @@

.modal__fr-input {
width: 100%;
height: 40px;
padding: 10px;

@include font(400, 12px, 1.15, 0.04em);
border: 1px solid rgba(33, 33, 33, 0.2);
border-radius: 4px;
padding: 0 10px;
background-color: transparent;
outline: transparent;
cursor: pointer;
outline: transparent;

transition: border-color var(--transition-prop);
&:focus {

@include tablet-only() {
font-size: 14px;
}

@include desktop() {
font-size: 16px;
}

&:focus,
&:hover {
border-color: var(--accent-color);
}
}
Expand Down Expand Up @@ -53,9 +64,9 @@
top: -25%;
left: 0;
font-size: 12px;
color: var(--text-color-main);

@include tablet() {
color: var(--text-color-main);
font-size: 14px;
}

Expand Down
35 changes: 8 additions & 27 deletions src/sass/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
justify-content: space-between;
padding-top: 37px;
}

& .header__btn-buy {
@include mobile-only() {
display: none;
}
}
}
.header.fixed .header-wrapper {
padding-top: 3px;
Expand Down Expand Up @@ -73,46 +79,19 @@
}

.header__btn-buy {
justify-content: center;
align-items: center;
min-width: 160px;
min-height: 44px;
border-radius: 22px;
padding: 5px 10px;

background-color: #fff;
border: 0;

font-family: var(--font-main);
font-weight: 700;
font-size: 16px;
line-height: 1.31;
color: var(--primary-color);

transition: background-color var(--transition-prop);
animation-name: shadow-drop-center;
// change-color;
animation-duration: 2000ms;
animation-iteration-count: infinite;
animation-direction: alternate;

&:hover,
&:focus {
background-color: #ecebeb;
}
@media screen and (max-width: 767px) {
display: none;
}
@include desktop() {
cursor: pointer;
}

&--mobile {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 32px;
padding: 8px 16px;
min-width: 209px;

@include desktop() {
Expand All @@ -124,6 +103,8 @@
.header.fixed .header__btn-buy--fixed {
min-width: 114px;
min-height: 34px;
padding-top: 9px;
padding-bottom: 9px;

font-size: 12px;
}
Expand Down
6 changes: 6 additions & 0 deletions src/sass/components/_modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
@include desktop() {
padding: 32px;
}

&--video {
width: 80%;
height: 80%;
padding: 35px;
}
}

.modal__close-btn {
Expand Down
35 changes: 0 additions & 35 deletions src/sass/components/_products.scss
Original file line number Diff line number Diff line change
Expand Up @@ -206,37 +206,6 @@
}
}

// .products__btn {
// display: flex;
// @include centered();
// margin-left: auto;
// margin-right: auto;
// width: 40px;
// height: 40px;
// border-radius: 50%;
// border: none;
// background-color: #ffffff;
// cursor: pointer;
// transition: var(--transition-prop);

// &:hover,
// &:focus {
// background-color: var(--btn-accent-color);
// }
// }

// .products__btn-icon {
// fill: var(--btn-primary-color);

// transform: rotate(0);

// transition: transform var(--transition-prop);

// .arrow--turned & {
// transform: rotate(0.5turn);
// }
// }

.description {
position: absolute;
z-index: 1;
Expand Down Expand Up @@ -387,10 +356,6 @@
color: #dd9312;
}

.description__list--ice-coffee li {
padding-bottom: 5px;
}

.description__list--milkshakes {
color: #569256;
}
Expand Down
Loading

0 comments on commit 1f4f1f7

Please sign in to comment.