Skip to content

Commit

Permalink
Hero section adaptive complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Dual-Ice committed May 7, 2020
1 parent 89c4990 commit 986c0b9
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/components/hero.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ section.hero.fullscreen-section(id="hero")
+menu
.header__links
+socials
.header__gam-menu
a(href="#").nav__link
+icon('menu', 'nav__icon')
.hero__content
.user-info
h1.user-info__desc !{desc}
Expand Down
1 change: 1 addition & 0 deletions src/images/icons/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions src/styles/blocks/header.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,26 @@

.header__menu {
margin: 0 10px;

@include tablets {
display: none
}
}

.header__gam-menu {
display: none;

@include tablets {
display: block;
}
}

.header__links {

@include tablets {
display: flex;
.social {
margin-right: 90px;
}
}
}
4 changes: 4 additions & 0 deletions src/styles/blocks/hero.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
display: flex;
justify-content: center;
padding-bottom: 25px;

@include tablets {
display: none;
}
}
50 changes: 49 additions & 1 deletion src/styles/blocks/nav.pcss
Original file line number Diff line number Diff line change
@@ -1,9 +1,57 @@
.nav {
&--footer {
@include desktop {
.nav__item {
margin-right: 8%;
}
}

@include tablets {
.nav__list {
flex-wrap: wrap;
}

.nav__item {
margin-bottom: 30px;
margin-right: 12%;
}
}

@include phones {
.nav__item {
margin-right: 15%;
}
}
}
}

.nav__link {
width: 100%;
height: 100%;

display: flex;
justify-content: center;
align-items: center;
white-space: nowrap;
}

.nav__icon {
height: 24px;
width: 24px;
display: block;
fill: currentColor;
}

.nav__list {
display: flex;
}

.nav__item {
margin-right: 50px;
margin-right: 60px;

@include tabletsLg {
margin-right: 20px;
}

&:hover,
&:active {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/blocks/scroll-down.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
width: 30px;
height: 35px;
content: "";
background: svg-load('scroll.svg', fill=currentColor, width=100%, height=100%) center center no-repeat;
background: svg-load('scroll.svg', fill=$font, width=100%, height=100%) center center no-repeat;
margin-left: 20px;
display: inline-block;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.social {
@include phones {
display: none;
}

&--footer {
display: block;

.social__icon {
width: 25px;
height: 25px;
Expand Down
48 changes: 48 additions & 0 deletions src/styles/blocks/triangles.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,49 @@
margin-top: -120px;
color: #fff;

@include desktop {
margin-top: -80px;
}

@include tablets {
margin-top: -50px;
}

@include phones {
margin-top: -20px;
}

&--bottom {
margin-top: 0;
margin-bottom: -89px;

@include desktop {
margin-bottom: -59px;
}

@include tablets {
margin-bottom: -39px;
}

@include phones {
margin-bottom: -19px;
}

.triangles__item {
height: 90px;
z-index: 10;

@include desktop {
height: 60px;
}

@include tablets {
height: 40px;
}

@include phones {
height: 20px;
}
}
}
}
Expand All @@ -20,4 +56,16 @@
display: block;
height: 120px;
fill: $white;

@include desktop {
height: 80px;
}

@include tablets {
height: 50px;
}

@include phones {
height: 20px;
}
}
47 changes: 47 additions & 0 deletions src/styles/blocks/user-info.pcss
Original file line number Diff line number Diff line change
@@ -1,17 +1,64 @@
.user-info {
text-align: center;
max-width: 505px;

@include desktop {
max-width: 734px;
display: flex;
}

@include tablets {
max-width: 430px;
display: initial;
}

@include phones {
max-width: 260px;
}
}

.user-info__username {
font-size: 72px;
line-height: 60px;
font-weight: 800;

@include desktop {
flex: 2;
text-align: left;
}

@include tablets {
font-size: 48px;
text-align: inherit;
line-height: 1;
}

@include phones {
font-size: 36px;
}
}

.user-info__desc {
font-size: 18px;
font-weight: 600;
margin-bottom: 30px;
opacity: .4;

@include desktop {
margin-bottom: 0;
flex: 1;
text-align: right;
margin-right: 60px;
}

@include tablets {
font-size: 16px;
text-align: inherit;
margin-bottom: 30px;
margin-right: 0;
}

@include phones {
font-size: 14px;
}
}
7 changes: 3 additions & 4 deletions src/styles/layout/base.pcss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
html {
@include desktop {
/* @include desktop {
font-size: 15px;
}
@include tablets {
font-size: 14px;
}
} */
}
body,
html {
Expand All @@ -30,8 +30,7 @@ body {
margin: 0 auto;
max-width: 1480px;
width: 95%;
/* width: 1490px; */


@include phones {
width: 85%;
}
Expand Down

0 comments on commit 986c0b9

Please sign in to comment.