fix: add adaptive to article

This commit is contained in:
2025-07-07 15:24:13 +03:00
parent 40e010bafd
commit f20785993a
13 changed files with 326 additions and 43 deletions

View File

@@ -6,6 +6,13 @@
margin-bottom: 20px; margin-bottom: 20px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
max-width: 460px;
align-self: center;
@include iftablet{
max-width: unset;
align-self: unset;
}
} }
@@ -21,6 +28,17 @@
.Form { .Form {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
gap: 40px; grid-template-columns: auto;
gap: 10px;
@include iftablet{
display: grid;
grid-template-rows: auto;
grid-template-columns: repeat(3, 1fr);
}
@include iflaptop{
}
@include ifdesktop{
}
} }

View File

@@ -1,7 +1,22 @@
.Container { .Container {
display: grid; display: grid;
grid-template-columns: auto 200px; grid-template-columns: auto;
gap: 100px; gap: 20px;
@include iftablet{
grid-template-columns: auto 200px;
gap: 40px;
}
@include iflaptop{
grid-template-columns: auto 200px;
gap: 40px;
}
@include ifdesktop{
grid-template-columns: auto 200px;
gap: 100px;
}
} }
.Icons { .Icons {
@@ -16,6 +31,21 @@
.Image { .Image {
margin-bottom: 16px; margin-bottom: 16px;
width: 100px;
height: auto;
@include iftablet{
width: 120px;
height: auto;
}
@include iflaptop{
width: 120px;
height: auto;
}
@include ifdesktop{
width: 150px;
height: auto;
}
} }
.Description { .Description {

View File

@@ -1,29 +1,96 @@
.Container { .Container {
display: grid; display: grid;
grid-template-columns: repeat(7, 1fr); grid-template-columns: 1fr;
gap: 20px 0;
background: $color-green; background: $color-green;
padding: rem(20px); padding: rem(20px);
border-radius: rem(16px); border-radius: rem(16px);
margin-bottom: rem(40px); margin-bottom: rem(40px);
.Block{ @include iftablet{
grid-template-columns: repeat(4, 1fr);
grid-template-rows: auto auto;
gap: 20px 0;
}
@include iflaptop{
grid-template-columns: repeat(7, 1fr);
grid-template-rows: auto;
justify-content: center;
}
@include ifdesktop{
}
.Block {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: rem(4px); gap: rem(4px);
.Arrow{ .Arrow {
margin-top: rem(50px); display: none;
@include iftablet{
display: block;
width: 50%;
height: auto;
margin-top: 5vh;
}
@include iflaptop{
width: 70%;
height: auto;
margin-top: 4vh;
}
@include ifdesktop{
width: 100%;
height: auto;
margin-top: 7vh;
margin-left: 1vw;
}
} }
.Text{ .Image {
width: auto;
height: 150px;
@include iftablet{
width: auto;
height: 120px;
}
@include iflaptop{
width: auto;
height: 80px;
}
@include ifdesktop{
width: auto;
height: 140px;
}
}
.Text {
font-family: $font-roboto; font-family: $font-roboto;
font-weight: 400; font-weight: 400;
font-size: rem(14px); font-size: rem(18px);
line-height: 150%; line-height: 150%;
color: $color-white; color: $color-white;
text-align: center; text-align: center;
text-transform: uppercase; text-transform: uppercase;
@include iftablet {
font-size: rem(14px);
}
@include iflaptop {
font-size: rem(12px);
line-height: 120%;
}
@include ifdesktop {
font-size: rem(14px);
line-height: 150%;
}
} }
} }
} }

View File

@@ -1,10 +1,31 @@
.Container { .Container {
margin: 0 auto; margin: 0 auto;
width: rem(1540px); max-width: rem(1540px);
display: grid; display: grid;
grid-template-columns: auto 360px; grid-template-columns: auto;
gap: 160px; grid-template-rows: auto auto;
padding: 0 40px; justify-content: center;
gap: 10px;
padding: 0 10px;
@include iftablet{
grid-template-columns: auto 200px;
grid-template-rows: auto;
justify-content: unset;
gap: 20px;
padding: 0 20px;
}
@include iflaptop{
grid-template-columns: auto 300px;
gap: 40px;
padding: 0 28px;
}
@include ifdesktop{
grid-template-columns: auto 360px;
gap: 160px;
padding: 0 40px;
}
} }
.Consultation { .Consultation {
@@ -16,23 +37,54 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: rem(60px); gap: rem(16px);
padding: rem(20px) 0; padding: rem(20px) 0;
@include iftablet{
gap: rem(20px);
}
@include iflaptop{
gap: rem(40px);
}
@include ifdesktop{
gap: rem(60px);
}
.Header { .Header {
font-family: $font-roboto; font-family: $font-roboto;
font-weight: 300; font-weight: 300;
font-size: rem(38px); font-size: rem(20px);
line-height: 100%; line-height: 100%;
color: $color-white; color: $color-white;
text-transform: uppercase; text-transform: uppercase;
@include iftablet{
font-size: rem(24px);
}
@include iflaptop{
font-size: rem(28px);
}
@include ifdesktop{
font-size: rem(38px);
}
} }
.Form { .Form {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: auto;
grid-template-rows: repeat(3, 1fr);
gap: rem(20px); gap: rem(20px);
width: 100%; width: 100%;
max-width: rem(460px);
@include iftablet{
grid-template-columns: repeat(3, 1fr);
grid-template-rows: auto;
width: 100%;
max-width: 100%;
}
} }
} }
@@ -45,6 +97,18 @@
margin: rem(20px) 0; margin: rem(20px) 0;
padding: rem(20px); padding: rem(20px);
border-radius: rem(20px); border-radius: rem(20px);
max-width: 460px;
@include iftablet{
margin: rem(10px) 0;
padding: rem(10px);
}
@include iflaptop{
margin: rem(20px) 0;
padding: rem(20px);
}
.Title { .Title {
font-family: $font-roboto; font-family: $font-roboto;

View File

@@ -1,11 +1,30 @@
.Related { .Related {
.Container { .Container {
margin: 0 auto; margin: 0 auto;
width: rem(1540px); max-width: rem(1540px);
display: grid; display: grid;
grid-template-columns: auto 360px; grid-template-columns: auto auto;
gap: 160px; gap: 0;
padding: 0 40px; padding: 0 10px;
@include iftablet {
padding: 0 20px;
}
@include iflaptop {
grid-template-columns: auto 300px;
gap: 40px;
padding: 0 28px;
}
@include ifdesktop {
grid-template-columns: auto 360px;
gap: 160px;
padding: 0 40px;
}
.Block {
display: flex;
flex-direction: column;
}
} }
.Header { .Header {
@@ -19,10 +38,14 @@
.Grid { .Grid {
display: grid; display: grid;
grid-template-columns: auto auto; grid-template-columns: auto;
gap: 16px; gap: 16px;
margin-bottom: 20px; margin-bottom: 20px;
@include iftablet{
grid-template-columns: auto auto;
}
.Title { .Title {
font-family: $font-roboto; font-family: $font-roboto;
font-weight: 500; font-weight: 500;

View File

@@ -11,7 +11,7 @@ function RelatedArticles({ related }: RelatedArticlesProps) {
return ( return (
<section className={s.Related}> <section className={s.Related}>
<div className={s.Container}> <div className={s.Container}>
<div> <div className={s.Block}>
<h3 className={s.Header}> <h3 className={s.Header}>
Похожие услуги, которые возможно Вас заинтересуют Похожие услуги, которые возможно Вас заинтересуют
</h3> </h3>

View File

@@ -1,8 +1,12 @@
.Sidebar { .Sidebar {
display: flex; display: none;
flex-direction: column;
gap: rem(40px); @include iflaptop{
display: flex;
flex-direction: column;
gap: rem(40px);
}
.Estimation { .Estimation {
background: $color-green; background: $color-green;
@@ -45,10 +49,14 @@
.Phone { .Phone {
font-family: $font-roboto; font-family: $font-roboto;
font-weight: 500; font-weight: 500;
font-size: rem(32px); font-size: rem(24px);
line-height: 100%; line-height: 100%;
color: $color-white; color: $color-white;
text-transform: uppercase; text-transform: uppercase;
@include ifdesktop{
font-size: rem(32px);
}
} }
} }

View File

@@ -13,7 +13,7 @@ function Sidebar({
warranties, warranties,
}: SidebarProps) { }: SidebarProps) {
return ( return (
<div className={s.Sidebar}> <aside className={s.Sidebar}>
<div className={s.Estimation}> <div className={s.Estimation}>
<h4 className={s.Title}>Срок выполнения:</h4> <h4 className={s.Title}>Срок выполнения:</h4>
<p className={s.Estimate}>от {estimate} дней</p> <p className={s.Estimate}>от {estimate} дней</p>
@@ -49,7 +49,7 @@ function Sidebar({
</ul> </ul>
</div> </div>
)} )}
</div> </aside>
); );
} }

View File

@@ -8,7 +8,7 @@
background: $color-white; background: $color-white;
border: 1px solid $color-darkgray; border: 1px solid $color-darkgray;
border-radius: rem(16px); border-radius: rem(16px);
padding: rem(4px) rem(10px); padding: rem(10px) rem(10px);
transition: border ease .5s; transition: border ease .5s;
font-family: $font-roboto; font-family: $font-roboto;
@@ -20,6 +20,7 @@
@include iftablet { @include iftablet {
font-size: rem(16px); font-size: rem(16px);
padding: rem(10px) rem(16px);
} }
@include iflaptop { @include iflaptop {

View File

@@ -1,10 +1,27 @@
.Container { .Container {
margin: 0 auto; margin: 0 auto;
width: rem(1540px); max-width: rem(1540px);
display: grid; display: grid;
grid-template-columns: auto 360px; grid-template-columns: auto;
gap: 160px; gap: 0px;
padding: 0 40px; padding: 0 10px;
@include iftablet {
grid-template-columns: auto;
padding: 0 20px;
}
@include iflaptop {
padding: 0 28px;
gap: 40px;
grid-template-columns: auto 300px;
}
@include ifdesktop {
grid-template-columns: auto 360px;
gap: 160px;
padding: 0 40px;
}
} }
.Article { .Article {

View File

@@ -91,9 +91,7 @@ function AutoTech() {
</p> </p>
<Connect /> <Connect />
</div> </div>
<aside> <Sidebar {...sidebarData} />
<Sidebar {...sidebarData} />
</aside>
</div> </div>
</section> </section>

View File

@@ -10,12 +10,24 @@
.Breadcrumbs { .Breadcrumbs {
margin: 0 auto; margin: 0 auto;
width: rem(1540px); max-width: rem(1540px);
padding: rem(20px) 40px; padding: rem(20px) 10px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
@include iftablet{
padding: rem(20px) 20px;
}
@include iflaptop{
padding: rem(20px) 28px;
}
@include ifdesktop{
padding: rem(20px) 40px;
}
.Block { .Block {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@@ -46,7 +58,7 @@
} }
.Advertise { .Advertise {
display: flex; display: none;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@@ -54,12 +66,40 @@
background: $color-white; background: $color-white;
padding: rem(20px); padding: rem(20px);
@include iftablet{
display: flex;
}
@include iflaptop{
}
@include ifdesktop{
}
.Image {
height: auto;
@include iftablet {
width: 200px;
}
@include iflaptop {
width: 300px;
}
@include ifdesktop {
width: auto;
}
}
.Description { .Description {
font-family: $font-roboto; font-family: $font-roboto;
font-weight: $font-light; font-weight: $font-light;
font-size: rem(16px); font-size: rem(14px);
line-height: 100%; line-height: 100%;
color: $color-text; color: $color-text;
@include iflaptop {
font-size: rem(16px);
}
} }
} }
@@ -68,7 +108,19 @@
.Header { .Header {
font-family: $font-roboto; font-family: $font-roboto;
font-weight: $font-regular; font-weight: $font-regular;
font-size: rem(48px); font-size: rem(24px);
line-height: 110%; line-height: 110%;
color: $color-white; color: $color-white;
@include iftablet {
font-size: rem(28px);
}
@include iflaptop {
font-size: rem(40px);
}
@include ifdesktop {
font-size: rem(48px);
}
} }

View File

@@ -27,7 +27,12 @@ function Breadcrumbs({ breadcrumbs }: BreadcrumbsProps) {
<h2 className={s.Header}>{breadcrumbs[1].name}</h2> <h2 className={s.Header}>{breadcrumbs[1].name}</h2>
</div> </div>
<div className={s.Advertise}> <div className={s.Advertise}>
<Image src={sberImg} alt={'Сбербанк, Дом-клик'} width={400} /> <Image
className={s.Image}
src={sberImg}
alt={'Сбербанк, Дом-клик'}
width={400}
/>
<p className={s.Description}>Аккредитованая оценочная компания</p> <p className={s.Description}>Аккредитованая оценочная компания</p>
</div> </div>
</div> </div>