Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Адаптивная сетка #4

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 86 additions & 78 deletions source/catalog.html

Large diffs are not rendered by default.

120 changes: 64 additions & 56 deletions source/form.html

Large diffs are not rendered by default.

191 changes: 99 additions & 92 deletions source/index.html

Large diffs are not rendered by default.

50 changes: 0 additions & 50 deletions source/sass/base/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,53 +19,3 @@ img {
max-width: 100%;
object-fit: contain;
}

.container {
padding: 0 20px;
}

.title {
font-size: 36px;
line-height: 40px;
font-weight: 400;
}

.button {
display: block;
padding: 10px 44px;
font-family: "Oswald", "Arial", sans-serif;
font-size: 16px;
line-height: 20px;
color: #ffffff;
text-align: center;
text-decoration: none;
text-transform: uppercase;
border: none;
background-color: #68b738;
cursor: pointer;
}

.link {
color: inherit;
text-decoration: none;
cursor: pointer;
}

.list {
margin: 0;
padding: 0;
list-style: none;
}

.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
clip-path: inset(100%);
clip: rect(0 0 0 0);
overflow: hidden;
}
23 changes: 23 additions & 0 deletions source/sass/blocks/additional.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,26 @@
text-align: center;
color: #ffffff;
}

@media (min-width: $tablet-width) {
.additional__title {
font-size: 36px;
border-bottom: none;
}

.additional__item-title {
font-size: 20px;
}
}

@media (min-width: $desktop-width) {
.additional__content-wrapper {
display: flex;
justify-content: space-between;
gap: 80px;
}

.additional__list {
flex-grow: 1;
}
}
30 changes: 30 additions & 0 deletions source/sass/blocks/advantages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,36 @@
margin-bottom: 30px;
}

.advantages__title {
margin-bottom: 40px;
}

.advantages__list {
@include text;
display: flex;
flex-direction: column;
gap: 20px;
}

@media (min-width: $tablet-width) {
.advantages__title {
margin-bottom: 40px;
}

.advantages__list {
flex-direction: row;
flex-wrap: wrap;
gap: 150px;
}

.advantages__item {
max-width: 230px;
}
}

@media (min-width: $desktop-width) {
.advantages__list {
flex-wrap: nowrap;
gap: 94px;
}
}
21 changes: 21 additions & 0 deletions source/sass/blocks/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.button {
display: inline-block;
padding: 10px 28px;
font-family: "Oswald", "Arial", sans-serif;
font-size: 16px;
line-height: 1.25;
color: #ffffff;
text-align: center;
text-decoration: none;
text-transform: uppercase;
border: none;
background-color: #68b738;
cursor: pointer;
}

@media (min-width: $tablet-width) {
.button {
font-size: 20px;
line-height: 1.3;
}
}
44 changes: 42 additions & 2 deletions source/sass/blocks/contacts.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
.contacts__text-wrapper {
display: flex;
justify-content: space-between;
background-color: $base-color;
padding-top: 26px;
padding-bottom: 26px;
}

.contacts__text-wrapper.contacts__text-wrapper--main {
.contacts__text-wrapper br {
display: none;
}

.contacts__text-wrapper--main {
background-color: #ffffff;
}

.contacts__title {
font-size: 16px;
line-height: 20px;
line-height: 1.25;
text-transform: uppercase;
color: #111111;
}
Expand All @@ -19,3 +25,37 @@
@include text;
line-height: 20px;
}

@media (min-width: $tablet-width) {
.contacts__text-wrapper {
padding: 60px 70px;
}

.contacts__text-wrapper br {
display: block;
}

.contacts__title {
max-width: 220px;
font-size: 20px;
line-height: 1.3;
}

.contacts__text {
max-width: 190px;
text-align: right;
line-height: 20px;
}
}

@media (min-width: $desktop-width) {
.contacts__text-wrapper {
max-width: 565px;
padding-left: 80px;
padding-right: 78px;
}

.contacts__text {
text-align: left;
}
}
15 changes: 15 additions & 0 deletions source/sass/blocks/container.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.container {
padding: 0 20px;
}

@media (min-width: $tablet-width) {
.container {
padding: 0 30px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавь еще ширину чтоб была центровка и magin: 0 auto

}
}

@media (min-width: $desktop-width) {
.container {
padding: 0 110px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавь еще ширину чтоб была центровка

}
}
5 changes: 5 additions & 0 deletions source/sass/blocks/copyright.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.copyright {
display: flex;
justify-content: space-between;
}

.copyright__link {
@include text;
font-size: 16px;
Expand Down
62 changes: 62 additions & 0 deletions source/sass/blocks/example.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
background-color: $base-color;
}

.example__title {
margin-bottom: 40px;
}

.example__text {
@include text;
}

.example__list {
display: flex;
justify-content: space-between;
}

.example__item {
text-align: center;
}
Expand All @@ -24,8 +33,61 @@
}

.example__total {
display: flex;
justify-content: center;
font-size: 14px;
line-height: 20px;
text-align: center;
text-transform: uppercase;
}

@media (min-width: $tablet-width) {
.example__costs-wrapper {
display: flex;
justify-content: space-between;
}

.example__list {
gap: 43px;
}

.example__value {
font-size: 30px;
line-height: 37px;
}

.example__description {
font-size: 14px;
}

.example__total {
flex-direction: column;
align-items: end;
font-size: 20px;
}
}

@media (min-width: $desktop-width) {
.example__wrapper {
display: flex;
justify-content: space-between;
}

.example__content-wrapper {
max-width: 435px;
}

.example__costs-wrapper {
flex-direction: column;
}

.example__list {
justify-content: start;
}

.example__total {
flex-direction: row;
justify-content: start;
gap: 63px;
}
}
46 changes: 46 additions & 0 deletions source/sass/blocks/hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,49 @@
line-height: 1;
text-transform: uppercase;
}

.hero__link.button {
width: 100%;
}

@media (min-width: $tablet-width) {
.hero {
text-align: left;
color: #000000;
}

.hero::before {
display: none;
}

.hero__wrapper {
padding-left: 120px;
padding-right: 0;
max-width: 600px;
}

.hero__title {
font-size: 60px;
}

.hero__slogan {
font-size: 20px;
}

.hero__link.button {
width: unset;
}
}

@media (min-width: $desktop-width) {
.hero::before {
display: block;
top: unset;
left: unset;
right: 0;
bottom: 0;
width: 50%;
height: 118%;
background-size: 100%;
}
}
5 changes: 5 additions & 0 deletions source/sass/blocks/link.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.link {
color: inherit;
text-decoration: none;
cursor: pointer;
}
5 changes: 5 additions & 0 deletions source/sass/blocks/list.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.list {
margin: 0;
padding: 0;
list-style: none;
}
Comment on lines +1 to +5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы смотрел в сторону миксина, а не блока

Это не ошибка но как будто миксин

20 changes: 20 additions & 0 deletions source/sass/blocks/main-footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.main-footer__bottom-wrapper {
display: flex;
flex-direction: column;
background-color: $base-color;
}

.main-footer__logo {
margin: 0 auto;
}

@media (min-width: $tablet-width) {
.main-footer__bottom-wrapper {
flex-direction: row;
justify-content: space-between;
}

.main-footer__logo {
margin: 0;
}
}
Loading
Loading