fix Simplify page chrome

Commit
922a929af6a062bcd0477cef2650d55a63a39678
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/presenter/page_shell.ml
index f21eca15..cd831b33 100644..100644
@@ -25,7 +25,7 @@
25 25 ]
26 26
27 27 let html_page ?viewer ?request ?(active = "") ?(show_nav = false)
28 Removed: ?workout_started title content =
28 Added: ?(show_footer = false) ?workout_started title content =
29 29 let spa_client = true in
30 30 (* The trainee is logging a workout exactly when its start epoch is present.
31 31 The middle nav slot then shows the elapsed timer on every page, so the
@@ -148,27 +148,27 @@
148 148 @
149 149 if spa_client then [ Dream_html.attr "data-hito-app-shell" ]
150 150 else [])
151 Removed: [
152 Removed: tag "header"
153 Removed: [ class_ "masthead" ]
154 Removed: ([
155 Removed: tag "a"
156 Removed: ([ class_ "brand"; href Routes.home ]
157 Removed: @
158 Removed: if spa_client then
159 Removed: [ Dream_html.attr "data-hito-app-link" ]
160 Removed: else [])
161 Removed: [ txt "hito" ];
162 Removed: ]
163 Removed: @ application_navigation ());
164 Removed: tag "main"
165 Removed: ([ id "main-content"; tabindex "-1" ]
166 Removed: @
167 Removed: if spa_client then [ Dream_html.attr "data-hito-app-content" ]
168 Removed: else [])
169 Removed: content;
170 Removed: footer ();
171 Removed: ];
151 Added: ([
152 Added: tag "header"
153 Added: [ class_ "masthead" ]
154 Added: ([
155 Added: tag "a"
156 Added: ([ class_ "brand"; href Routes.home ]
157 Added: @
158 Added: if spa_client then
159 Added: [ Dream_html.attr "data-hito-app-link" ]
160 Added: else [])
161 Added: [ txt "hito" ];
162 Added: ]
163 Added: @ application_navigation ());
164 Added: tag "main"
165 Added: ([ id "main-content"; tabindex "-1" ]
166 Added: @
167 Added: if spa_client then [ Dream_html.attr "data-hito-app-content" ]
168 Added: else [])
169 Added: content;
170 Added: ]
171 Added: @ if show_footer then [ footer () ] else []);
172 172 ]
173 173 @
174 174 if spa_client then
lib/presenter/pages_auth.ml
index 6253b641..92bbd7eb 100644..100644
@@ -56,7 +56,7 @@
56 56 ]
57 57 else []
58 58 in
59 Removed: html_page ~active:"auth" "Sign in"
59 Added: html_page ~active:"auth" ~show_footer:true "Sign in"
60 60 ([
61 61 tag "h1" [] [ txt "Sign in" ];
62 62 credentials_form request ~submit:"Sign in" ~action_path:Routes.login;
@@ -64,7 +64,7 @@
64 64 @ register_prompt @ auth_error error)
65 65
66 66 let register request ?error () =
67 Removed: html_page ~active:"auth" "Register"
67 Added: html_page ~active:"auth" ~show_footer:true "Register"
68 68 ([
69 69 tag "h1" [] [ txt "Create an account" ];
70 70 credentials_form request ~submit:"Register" ~action_path:Routes.register;
lib/web/assets/hito.css
index d3ad7018..848aecf8 100644..100644
@@ -227,7 +227,6 @@
227 227 /* The content starts below the masthead. The main element is also the
228 228 replaceable SPA content node, so the page needs no extra surface wrapper. */
229 229 main {
230 Removed: min-height: 26rem;
231 230 padding: 1.25rem 0 1.5rem;
232 231 }
233 232
@@ -1430,10 +1429,6 @@
1430 1429 .masthead {
1431 1430 min-height: 4.5rem;
1432 1431 padding: 0.9rem 0 0.7rem;
1433 Removed: }
1434 Removed:
1435 Removed: main {
1436 Removed: min-height: calc(100vh - 9rem);
1437 1432 }
1438 1433
1439 1434 /* One column: a movement and its ending each take the full width. */
test/web/auth.ml
index fc1da7fa..17260093 100644..100644
@@ -29,7 +29,13 @@
29 29 page 0));
30 30 Alcotest.(check bool)
31 31 "version is visible" true
32 Removed: (Option.is_some (index_from ~needle:"Version: " page 0)) );
32 Added: (Option.is_some (index_from ~needle:"Version: " page 0));
33 Added: let registration_page = body (get c "/register") in
34 Added: Alcotest.(check bool)
35 Added: "registration copyright notice is visible" true
36 Added: (Option.is_some
37 Added: (index_from ~needle:"© 2026 Marius PETER. All rights reserved."
38 Added: registration_page 0)) );
33 39 ( "every response carries the browser hardening headers",
34 40 `Quick,
35 41 fun () ->
test/web/overview.ml
index 901dd10b..40fe12eb 100644..100644
@@ -59,6 +59,11 @@
59 59 (Option.is_some
60 60 (index_from ~needle:"Next Workout" selected_home 0));
61 61 Alcotest.(check bool)
62 Added: "Home omits the authentication copyright notice" false
63 Added: (Option.is_some
64 Added: (index_from ~needle:"© 2026 Marius PETER. All rights reserved."
65 Added: selected_home 0));
66 Added: Alcotest.(check bool)
62 67 "Home does not repeat the complete recovery notice" false
63 68 (Option.is_some
64 69 (index_from ~needle:"Recovery is complete." selected_home 0));