Skip to content

Commit fba1c92

Browse files
committed
fix(portal-theme): fix hero height on mobile
1 parent e000664 commit fba1c92

File tree

5 files changed

+39
-26
lines changed

5 files changed

+39
-26
lines changed

src/Themes/PortalTheme/Assets/scss/_global.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ body {
99
flex: 1 1 auto;
1010
flex-direction: column;
1111
font-family: "Fira Sans", sans-serif;
12+
min-height: -webkit-fill-available;
1213
min-height: 100vh;
13-
min-height: calc(var(--vh, 1vh) * 100);
1414
}
1515

1616
.skip-navigation {
@@ -186,17 +186,13 @@ hr {
186186
@include media-breakpoint-up(lg) {
187187
.btn {
188188
&.btn-primary {
189-
transition-property: all;
189+
transition-property: transform;
190190
transition-duration: 300ms;
191191
transition-timing-function: ease-out;
192-
box-shadow: 0 30px 20px rgba(17, 15, 15, 0.25);
193192
&:hover {
194-
box-shadow: 0 40px 25px rgba(17, 15, 15, 0.25);
195193
transform: translateY(-5px);
196194
}
197195
&:focus {
198-
box-shadow: 0 40px 25px rgba(17, 15, 15, 0.25),
199-
0 0 0 0.2rem transparentize($primary, 0.5);
200196
transform: translateY(-5px);
201197
}
202198
}

src/Themes/PortalTheme/Assets/scss/_hero.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
&.is-fullheight {
33
display: flex;
44
flex-direction: column;
5+
min-height: -webkit-fill-available;
56
min-height: 100vh;
67

78
.container {
@@ -16,6 +17,24 @@
1617
flex-grow: 1;
1718
flex-shrink: 0;
1819

20+
.btn {
21+
&.btn-primary {
22+
transition-property: all;
23+
transition-duration: 300ms;
24+
transition-timing-function: ease-out;
25+
box-shadow: 0 30px 20px rgba(17, 15, 15, 0.25);
26+
&:hover {
27+
box-shadow: 0 40px 25px rgba(17, 15, 15, 0.25);
28+
transform: translateY(-5px);
29+
}
30+
&:focus {
31+
box-shadow: 0 40px 25px rgba(17, 15, 15, 0.25),
32+
0 0 0 0.2rem transparentize($primary, 0.5);
33+
transform: translateY(-5px);
34+
}
35+
}
36+
}
37+
1938
.navbar ul li {
2039
perspective: 300px;
2140
}

src/Themes/PortalTheme/Views/Layout.liquid

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@
4040
{% render_section "Content" %}
4141
{% render_section "Footer", required: false %}
4242
{% render_section "Modal", required: false %}
43-
44-
{% block "script", at:"Foot" %}
45-
$( document ).ready(function() {
46-
let vh = window.innerHeight * 0.01;
47-
document.documentElement.style.setProperty('--vh', `${vh}px`);
48-
});
49-
$( window ).on('resize', function() {
50-
let vh = window.innerHeight * 0.01;
51-
document.documentElement.style.setProperty('--vh', `${vh}px`);
52-
});
53-
{% endblock %}
5443
{% resources type: "FootScript" %}
5544

5645
</body>

src/Themes/PortalTheme/wwwroot/css/portal-bootstrap.css

Lines changed: 17 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Themes/PortalTheme/wwwroot/css/portal-bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)