Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit 40def20

Browse files
committed
feat(home): add changes for mobile hero
1 parent 744d40e commit 40def20

File tree

2 files changed

+65
-25
lines changed

2 files changed

+65
-25
lines changed

src/pages/app-home/app-home.scss

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@
1313

1414
.text {
1515
z-index: 1;
16+
17+
.sub-txt {
18+
visibility: visible;
19+
height: auto;
20+
@include media-breakpoint-down(sm) {
21+
visibility: hidden;
22+
height: 0;
23+
}
24+
}
25+
}
26+
27+
.mobile {
28+
visibility: visible;
29+
height: auto;
30+
padding: 10px;
31+
margin-bottom: 40px;
32+
33+
@include media-breakpoint-up(sm) {
34+
visibility: hidden;
35+
height: 0;
36+
}
1637
}
1738

1839
.svg-header-desktop {
@@ -31,7 +52,7 @@
3152

3253
.svg-header-mobile {
3354
background: url('assets/svg/home-graphic-header-mobile.svg') center center no-repeat;
34-
height: 768px;
55+
height: 542px;
3556
display: none;
3657

3758
@include media-breakpoint-up(md) {
@@ -58,7 +79,8 @@
5879

5980
@include media-breakpoint-down(sm) {
6081
height: auto;
61-
line-height: 1;
82+
line-height: 3;
83+
text-align: center;
6284
}
6385
}
6486

@@ -73,22 +95,30 @@
7395

7496
@include media-breakpoint-down(sm) {
7597
height: 0;
76-
margin-bottom: 50px;
98+
margin-bottom: 120px;
99+
text-align: center;
100+
font-size: 43px;
101+
line-height: 50px;
77102
}
78103
}
79104

80-
.button {
81-
background-color: #0095aa;
82-
border-radius: 16px;
83-
box-shadow: 0 2px 4px 0 rgba(128, 128, 128, 0.5);
84-
width: 262px;
85-
text-align: center;
86-
color: #ffffff;
87-
font-family: Muli;
88-
font-size: 11px;
89-
font-weight: 700;
90-
letter-spacing: 1.25px;
91-
margin: auto;
105+
.sub-txt {
106+
text-align: left;
107+
108+
button.button-hero {
109+
background-color: #0095aa;
110+
border: 0.75px solid #ffffff;
111+
border-radius: 20px;
112+
box-shadow: 0 2px 4px 0 rgba(128, 128, 128, 0.5);
113+
text-transform: none;
114+
&:hover {
115+
background: #0095aa linear-gradient(180deg, #00b4cc, #0095aa) repeat-x;
116+
}
117+
}
118+
119+
@include media-breakpoint-down(sm) {
120+
text-align: center;
121+
}
92122
}
93123
}
94124

src/pages/app-home/app-home.tsx

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,35 +91,45 @@ export class AppHome {
9191
return <app-blog-featured-home blogPost={featuredPost} blogPost1={featuredPost1} />;
9292
}
9393

94+
renderSubTxt() {
95+
return (
96+
<div class="sub-txt">
97+
<p>
98+
<app-translate keyword="home.hero.text" />
99+
</p>
100+
<stencil-route-link url="/services" class="align-self-center">
101+
<button class="btn btn-primary button-hero">
102+
<app-translate keyword="home.hero.buttonText" />
103+
</button>
104+
</stencil-route-link>
105+
</div>
106+
);
107+
}
108+
94109
render() {
95110
const featuredPost = this.renderFeaturedPost(this.featuredPost, this.featuredPost1, this.featuredIsLoading, this.featuredIsError);
111+
const subTxt = this.renderSubTxt();
96112
return (
97113
<div class="home">
98114
{/* header - hero */}
99115
<header class="hero">
100116
<div class="container">
101117
<div class="row align-items-center">
102-
<div class="col-3 flex-column text">
118+
<div class="col-lg-4 col-md-6 col-sm-12 flex-column text">
103119
<h1>
104120
<app-translate keyword="home.hero.title" />
105121
</h1>
106122
<h2>
107123
<app-translate keyword="home.hero.subTitle" />
108124
</h2>
109-
<p>
110-
<app-translate keyword="home.hero.text" />
111-
</p>
112-
<stencil-route-link url="/services" class="align-self-center">
113-
<button class="btn button">
114-
<app-translate keyword="home.hero.buttonText" />
115-
</button>
116-
</stencil-route-link>
125+
{subTxt}
117126
</div>
118-
<div class="col-9 flex-column">
127+
<div class="col-lg-8 col-md-6 col-sm-12 flex-column">
119128
<div class="svg-header-desktop" aria-label="header" />
120129
<div class="svg-header-mobile" aria-label="header" />
121130
</div>
122131
</div>
132+
<div class="row align-items-center mobile">{subTxt}</div>
123133
</div>
124134
</header>
125135

0 commit comments

Comments
 (0)