add form-box css

This commit is contained in:
Swrup 2025-04-20 16:43:29 +02:00
parent 50eb6f808b
commit 87a9806056
4 changed files with 85 additions and 37 deletions

View file

@ -49,18 +49,18 @@ module Home = struct
let left t_s =
let new_thread_view =
(* TODO try to find better class names *)
let new_thread_form_div =
El.div
~at:[ class' "new-thread-form-div" ]
[ Html_form.new_thread_el t_s ]
in
El.div
~at:[ class' "new-thread-view" ]
[ h2 "New thread"
; El.span
~at:[ class' "new-thread-info" ]
[ el_txt "Click the map and make a new thread:" ]
; new_thread_form_div
[ El.div
~at:[ class' "form-box" ]
[ h2 "New thread"
; El.span
~at:[ class' "new-thread-info" ]
[ el_txt "Click the map and make a new thread:" ]
; El.div
~at:[ class' "new-thread-form-div" ]
[ Html_form.new_thread_el t_s ]
]
]
in
let thread_view = Html_thread.f t_s in
@ -90,14 +90,14 @@ end
module Register = struct
let f t_s =
let l = [ h1 "Register"; Html_form.mk_register () ] in
let l = [ Html_form.mk_register () ] in
let el = mk_page Register t_s l in
el
end
module Login = struct
let f t_s =
let l = [ h1 "Login"; Html_form.mk_login () ] in
let l = [ Html_form.mk_login () ] in
let el = mk_page Login t_s l in
el
end
@ -167,8 +167,10 @@ module Profile = struct
; mk_page_link ~label:"public profile" (User (Loading user.user_id))
]
in
let forms = Html_form.profile user in
[ h1 "Profile settings"; public_profile_link ] @ forms
let forms =
El.div ~at:[ class' "form-box-list" ] (Html_form.profile user)
in
[ h1 "Profile settings"; public_profile_link; forms ]
let f t_s =
let el = mk_page Profile t_s [] in
@ -181,8 +183,10 @@ module Account = struct
match get_user_private t with
| None -> []
| Some user_private ->
let forms = Html_form.account user_private in
h1 "Account settings" :: forms
let forms =
El.div ~at:[ class' "form-box-list" ] (Html_form.account user_private)
in
[ h1 "Account settings"; forms ]
let f t_s =
let el = mk_page Account t_s [] in