Skip to content

Commit 801eeba

Browse files
authored
Merge pull request #563 from NBISweden/dev/layout-scroll
Improve mobile UX when using urdr
2 parents 9a4c204 + a9fd83a commit 801eeba

File tree

2 files changed

+54
-4
lines changed

2 files changed

+54
-4
lines changed

frontend/src/index.css

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ Other button classes are defined further down together with other classes for th
9393
align-items: center;
9494
}
9595

96+
@media (max-width: 700px) and (orientation: portrait) {
97+
.header-wrapper {
98+
width: 200vw;
99+
}
100+
}
101+
96102
.header-heading {
97103
color: hsl(186deg 92% 11%);
98104
font-size: 3rem;
@@ -122,7 +128,8 @@ Other button classes are defined further down together with other classes for th
122128
}
123129
/* stylelint-enable selector-class-pattern */
124130

125-
.usr-header {
131+
.usr-header,
132+
.help-header {
126133
display: flex;
127134
justify-content: space-between;
128135
align-items: center;
@@ -136,11 +143,27 @@ Other button classes are defined further down together with other classes for th
136143
height: 80px;
137144
}
138145

146+
@media (max-width: 700px) and (orientation: portrait) {
147+
.usr-header {
148+
width: 200vw;
149+
}
150+
151+
.help-header {
152+
width: 200vw;
153+
}
154+
}
155+
139156
.spreadsheet {
140157
min-height: 100vh;
141158
margin-bottom: 5rem;
142159
}
143160

161+
@media (max-width: 700px) and (orientation: portrait) {
162+
.spreadsheet {
163+
width: 200vw;
164+
}
165+
}
166+
144167
.footer {
145168
z-index: 100;
146169
width: 100%;
@@ -149,6 +172,13 @@ Other button classes are defined further down together with other classes for th
149172
background-color: white;
150173
}
151174

175+
@media (max-height: 700px) and (orientation: landscape) {
176+
.footer {
177+
position: relative;
178+
z-index: 0;
179+
}
180+
}
181+
152182
.input-label {
153183
margin-left: 0.4rem;
154184
margin-top: 0.5rem;
@@ -257,6 +287,12 @@ Other button classes are defined further down together with other classes for th
257287
background-color: hsl(70deg 55% 98%);
258288
}
259289

290+
@media (max-width: 700px) and (orientation: portrait) {
291+
.login-wrapper {
292+
width: 200vw;
293+
}
294+
}
295+
260296
.login-info {
261297
margin: 2rem 0 3rem;
262298
}
@@ -678,13 +714,27 @@ Other button classes are defined further down together with other classes for th
678714
position: relative;
679715
}
680716

717+
@media (max-width: 700px) and (orientation: portrait) {
718+
.help-wrapper {
719+
position: flex;
720+
flex-direction: column;
721+
width: 200vw;
722+
}
723+
}
724+
681725
.help-title {
682726
font-size: 2rem;
683-
margin-top: 1.5rem;
727+
margin-top: 1rem;
684728
margin-left: 2rem;
685729
color: hsl(186deg 92% 11%);
686730
}
687731

732+
@media (max-width: 700px) and (orientation: portrait) {
733+
.help-title {
734+
font-size: 1.2rem;
735+
}
736+
}
737+
688738
.help-subtitle {
689739
font-size: 1.5rem;
690740
padding-top: 1.5rem;

frontend/src/pages/Help.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export const Help = () => {
4747
};
4848
return (
4949
<>
50-
<header className="usr-header">
51-
<h1 className="help-title">How do I use the urdr service?</h1>
50+
<header className="help-header">
51+
<h1 className="help-title">What is urdr?</h1>
5252
<HeaderUser username={context.user ? context.user.login : ""} />
5353
</header>
5454
<main className="help-wrapper">

0 commit comments

Comments
 (0)