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

Стилизация #3

Merged
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
322 changes: 161 additions & 161 deletions source/form.html

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@
<title>Sedona | Главная</title>
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16.png">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<nav class="page-header__nav">
<header class="page-header">
<nav class="page-header__nav nav nav--closed nav--nojs">
<button class="nav__toggle btn" type="button">Меню</button>
<ul class="nav__list">
<li class="nav__item nav__item--active"><a>Главная</a></li>
<li class="nav__item"><a href="photo.html">Фото и видео</a></li>
<li class="nav__item"><a href="form.html">Форма отзыва</a></li>
<li class="nav__item"><a href="https://htmlacademy.ru" target="blank_">HTML Academy</a></li>
</ul>
<a class="page-header__logo">
<picture>
<source media="(min-width: 1200px)" srcset="img/logo-sedona-desktop.svg">
<source media="(min-width: 768px)" srcset="img/logo-sedona-tablet.svg">
<img src="img/logo-sedona-mobile.svg" width="102" height="83" alt="City of Sedona">
</picture>
</a>
</nav>

<a href="#" class="page-header__logo">
<picture>
<source media="(min-width: 1200px)" srcset="img/logo-sedona-desktop.svg" />
<source media="(min-width: 768px)" srcset="img/logo-sedona-tablet.svg" />
<img src="img/logo-sedona-mobile.svg" width="102" height="83" alt="City of Sedona" />
</picture>
</a>

<section class="page-header__welcome">
<section class="page-header__welcome welcome">
<h1 class="visually-hidden">Sedona</h1>
<img class="welcome__content" src="img/text-sedona-index.svg" width="282" height="214"
alt="Welcome to the gorgeous Sedona" />
alt="Welcome to the gorgeous Sedona">
</section>
</header>

Expand Down
262 changes: 262 additions & 0 deletions source/less/blocks/advantages.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
.advantages__item {
background: @primaryBack-2;
color: @primaryColor-2;

&:first-of-type {
padding-top: 37px;
}

&:nth-of-type(2) .advantages__info {
padding-top: 38px;
}
}

.advantages__info {
padding: 40px 20px 40px 20px;
text-align: center;
}

.advantages__title {
margin-bottom: 9px;
.font(short; 18px; 26px; 700);
}

.advantages__number {
margin-bottom: 15px;
.font(shortest; 14px; 21px);
}

.advantages__description {
.font(shortest; 14px; 21px);
}

.advantages__photo {
height: 260px;
background-color: @secondaryBack;
background-repeat: no-repeat;
background-position: center;
background-size: cover;

&--city {
background-image: url("../img/[email protected]");

@media @retina {
background-image: url("../img/[email protected]");
}
}

&--bridge {
background-image: url("../img/[email protected]");

@media @retina {
background-image: url("../img/[email protected]");
}
}
}

.advantages__features {
padding: 35px 0 9px;
background: @primaryBack;
}

.advantages__feature-item {
position: relative;
padding: 0 40px 28px 70px;
background: @primaryBack;
color: @primaryColor;
}

.advantages__feature-item .advantages__title {
margin-bottom: 14px;
}

.advantages__feature-item .icon-svg {
width: 40px;
height: 42px;
position: absolute;
top: -7px;
left: 20px;
}

.advantages__item--small {
padding: 0 20px;
background: @primaryBack-3;
color: @primaryColor;

&:last-of-type .advantages__info {
padding-left: 10px;
padding-right: 10px;
border-bottom: none;
}
}

.advantages__item--small .advantages__info {
padding: 27px 20px 27px 20px;
border-bottom: 1px solid #d6d6d6;
}

@media @tablet-width {
.advantages {
display: flex;
flex-wrap: wrap;
}

.advantages__item {
display: flex;
flex-wrap: wrap;
width: 100%;

&:first-of-type {
padding-top: 0;
}
}

.advantages__info {
display: flex;
flex-direction: column;
justify-content: center;
width: 33%;
padding: 0 25px 0 15px;
}

.advantages__title {
width: 151px;
margin: 0 auto 21px;
font-size: 21px;
}

.advantages__number {
margin-bottom: 22px;
}

.advantages__descr {
padding: 0 20px;
}

.advantages__photo {
width: 67%;
height: 256px;
}

.advantages__features {
display: flex;
width: 100%;
}

.advantages__feature-item {
width: 33.33%;
padding: 124px 30px 52px 30px;
text-align: center;

&:nth-of-type(2) {
order: 1;
}

.advantages__descr {
padding: 0 12px;
}
}

.advantages__feature-item .advantages__title {
margin-bottom: 21px;
}

.advantages__feature-item .icon {
&-svg {
top: 28px;
.align(horizont);
}

&--gift {
width: 64px;
height: 75px;
}

&--burger {
width: 77px;
height: 68px;
}

&--house {
width: 75px;
height: 72px;
}
}

.advantages__item--small {
width: 33.33%;
}

.advantages__item--small .advantages__info {
justify-content: flex-start;
width: 100%;
padding: 45px 5px 44px 5px;
border: none;
}

.advantages__item--small .advantages__title {
width: 130px;
margin: 0 auto 9px;
}

.advantages__item--reverse {
.advantages__info {
order: 1;
padding: 0 15px 0 25px;
}

.advantages__title {
width: 151px;
margin: 0 auto 9px;
}
}

.advantages__item:nth-of-type(2) {
.advantages__info {
padding-top: 0;
}
}
}

@media @desktop-width {
.advantages__item {
&:first-of-type {
.advantages__info {
padding: 28px 48px 28px 48px;
}
}

&:nth-of-type(2) {
.advantages__info {
padding: 18px 60px 18px 60px;
}
}

&--small {
.advantages__info {
padding-bottom: 65px;
padding-left: 30px;
padding-right: 30px;
}
}
}

.advantages__feature-item {
padding-bottom: 73px;

.advantages__description {
padding-left: 35px;
padding-right: 35px;
}
}

.advantages__photo {
&--city {
background-image: url("../img/[email protected]");
}

&--bridge {
background-image: url("../img/[email protected]");
}
}
}
26 changes: 26 additions & 0 deletions source/less/blocks/btn.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.btn {
.def-ib();
padding: 0;
border: none;
outline: none;
font-size: 0;
cursor: pointer;

&--primary {
padding: 16px 10px;
background: @primaryBack-2;
color: @primaryColor-2;
.font(short; 21px; 26px; 700);
text-align: center;
transition: background 0.3s linear, color 0.3s linear;

&:hover {
background: @altBack;
}

&:active {
background: @altBack-2;
color: @primaryColorAlpha;
}
}
}
Loading
Loading