[OCaml] High Intensity Training Online
fix narrow desktop main content
Changed files
lib/web/assets/hito.css
@@ -204,6 +204,15 @@
204
204
animation: page-enter 220ms ease both;
205
205
}
206
206
207
Added:
/* Keep the desktop masthead and navigation wide, while giving reading content
208
Added:
a shorter line length. Mobile keeps the full page-surface width below. */
209
Added:
@media (min-width: 42.0625rem) {
210
Added:
.page-surface {
211
Added:
max-width: 60rem;
212
Added:
margin-inline: auto;
213
Added:
}
214
Added:
}
215
Added:
207
216
h1,
208
217
h2 {
209
218
max-width: 38rem;
test/test_web.ml
@@ -125,6 +125,19 @@
125
125
126
126
let route_tests =
127
127
[
128
Added:
( "web.layout",
129
Added:
[
130
Added:
( "the desktop main surface is narrower than the shell",
131
Added:
`Quick,
132
Added:
fun () ->
133
Added:
let c = client () in
134
Added:
let stylesheet = body (get c "/assets/hito.css") in
135
Added:
Alcotest.(check bool)
136
Added:
"desktop page surface cap" true
137
Added:
(contains ~substring:"@media (min-width: 42.0625rem)" stylesheet
138
Added:
&& contains ~substring:"max-width: 60rem" stylesheet
139
Added:
&& contains ~substring:"margin-inline: auto" stylesheet) );
140
Added:
] );
128
141
( "web.auth",
129
142
[
130
143
( "an unauthenticated visit to the overview redirects to sign-in",