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

Dmitry/hero adaptive #16

Merged
merged 3 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 9 additions & 1 deletion blocks/hero/__desc/hero__desc.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.hero__desc {
width: 50%;
display: flex;
width: 100%;
justify-content: flex-end;
}

@media (max-width: 728px) {
.hero__desc {
flex-direction: column;
}
}
11 changes: 10 additions & 1 deletion blocks/hero/__pic/hero__pic.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
.hero__pic {
width: 100%;
width: 50%;
aspect-ratio: 1.618;
background-image: url(../../../images/header-pic.png);
background-size: cover;
}

@media (max-width: 728px) {
.hero__pic {
width: 100%;
height: 415px;
Maestr1 marked this conversation as resolved.
Show resolved Hide resolved
aspect-ratio: inherit;

Maestr1 marked this conversation as resolved.
Show resolved Hide resolved
}
}
34 changes: 32 additions & 2 deletions blocks/hero/__subtitle/hero__subtitle.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
.hero__subtitle {
box-sizing: border-box;
margin: 0;
padding-top: 199px;
padding-left: 180px;
/*padding-top: 199px;*/
/*padding-left: 180px;*/
padding-right: 50px;
width: 50%;
max-width: 420px;
font-size: 28px;
line-height: 1.14;
letter-spacing: -0.01em;
}

@media (max-width: 1100px) {
.hero__subtitle {
padding-left: 30px;
font-size: 20px;
line-height: 1.2;
}
}

@media (max-width: 728px) {
.hero__subtitle {
box-sizing: inherit;
padding-left: 86px;
padding-bottom: 36px;
padding-right: 24px;
width: inherit;
max-width: 304px;
align-self: flex-end;
}

}

@media (max-width: 360px) {
.hero__subtitle {
padding-right: 0;
}
}
18 changes: 16 additions & 2 deletions blocks/hero/__title/hero__title.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
.hero__title {
margin: 0;
margin-top: -4px;
padding-left: 50%;
padding-bottom: 65px;
max-width: 141px;
max-width: 450px;
font-size: 72px;
font-weight: 400;
line-height: .97;
/*word-wrap: break-word;*/
}

@media (max-width: 900px) {
.hero__title {
font-size: 40px;
}
}
@media (max-width: 728px) {
.hero__title {
padding-top: 54px;
padding-left: 24px;
padding-bottom: 22px;
}
}
1 change: 1 addition & 0 deletions blocks/hero/__wrap/hero__wrap.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.hero__wrap {
display: flex;
flex-direction: column;
}
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<link rel="stylesheet" href="./pages/index.css"/>
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<title>Lubimovka</title>
</head>

Expand Down Expand Up @@ -50,12 +51,10 @@
<section class="hero">
<div class="hero__link-wrap"><a href="#" class="hero__back-btn">ПРОЕКТЫ</a></div>
<div class="hero__wrap">
<h1 class="hero__title">Любимовка.<span style="font-size: 0;"> </span>Ещё</h1>
<div class="hero__desc">
<p class="hero__subtitle">Межсезонные читки и обсуждение пьес из списка отмеченных отборщиками
Любимовки.</p>
</div>
<div class="hero__main">
<h1 class="hero__title">Любимовка. Ещё</h1>
Любимовки. Можно слушать, обсуждать и даже участвовать.</p>
<div class="hero__pic"></div>
</div>
</div>
Expand Down Expand Up @@ -83,7 +82,7 @@ <h2 class="title">Заголовок блока с персонами</h2>
<p class="persons__title">Тереза Шимчак</p>
<p class="persons__subtitle">Драматург, сценарист, преподаватель</p>
</li>
<!-- <img class="slider" src="">-->
<!-- <img class="slider" src="">-->
</ul>
</section>
</main>
Expand Down
14 changes: 8 additions & 6 deletions pages/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
@import url(../vendor/fonts/FormularLight/formular-light.css);
@import url(../vendor/fonts/NeueMachinaRegular/neue-machina-regular.css);
@import url(../blocks/title/title.css);
@import url(../blocks/persons/__subtitle/persons__subtitle.css);
@import url(../blocks/persons/__foto/persons__foto.css);
@import url(../blocks/persons/__title/persons__title.css);
@import url(../blocks/persons/persons.css);
@import url(../blocks/persons/__list/persons__list.css);
@import url(../blocks/persons/__item/persons__item.css);

/* ---------------Header-------------- */
@import url(../blocks/header/header.css);
Expand Down Expand Up @@ -43,6 +37,14 @@
@import url(../blocks/hero/__desc/hero__desc.css);
@import url(../blocks/hero/__pic/hero__pic.css);

/* ---------------Persons-------------- */
@import url(../blocks/persons/__subtitle/persons__subtitle.css);
@import url(../blocks/persons/__foto/persons__foto.css);
@import url(../blocks/persons/__title/persons__title.css);
@import url(../blocks/persons/persons.css);
@import url(../blocks/persons/__list/persons__list.css);
@import url(../blocks/persons/__item/persons__item.css);

/* ---------------Footer-------------- */
@import url(../blocks/footer/footer.css);
@import url(../blocks/footer/__container/footer__container.css);
Expand Down