From abb70caabda7d82857c2d0ffdd39759b110207ab Mon Sep 17 00:00:00 2001 From: zapashcanon Date: Fri, 18 Feb 2022 02:39:25 +0100 Subject: [PATCH] make things pretty --- src/babillard_page.eml.html | 6 ++--- src/newthread_page.eml.html | 52 ++++++++++++++++++++----------------- src/user.ml | 14 ++++++++-- src/user_profile.eml.html | 33 ++++++++++++----------- 4 files changed, 61 insertions(+), 44 deletions(-) diff --git a/src/babillard_page.eml.html b/src/babillard_page.eml.html index aa81d58..47954df 100644 --- a/src/babillard_page.eml.html +++ b/src/babillard_page.eml.html @@ -4,12 +4,12 @@ let f request =
-% if Option.is_some @@ Dream.session "nick" request then begin - [New Thread] -% end;

+% if Option.is_some @@ Dream.session "nick" request then begin + New Thread +% end;
diff --git a/src/newthread_page.eml.html b/src/newthread_page.eml.html index 97dade9..b3e1d82 100644 --- a/src/newthread_page.eml.html +++ b/src/newthread_page.eml.html @@ -1,39 +1,43 @@ let f request = % begin match Dream.session "nick" request with % | None -> -Login to make a new thread. + Login to make a new thread. % | Some _nick -> - -
Click the map to make a new thread:
-
+ +

New thread

+
+ Click the map to make a new thread: +
+
+
-
- +
+
+
-
-
+
<%s! Dream.form_tag ~action:"/babillard/new_thread" ~enctype:`Multipart_form_data request %> - - + + - - + + - - + + - - + + - - + + - - - - + + + + +
-
-
+
% end; diff --git a/src/user.ml b/src/user.ml index 791b78d..71d5078 100644 --- a/src/user.ml +++ b/src/user.ml @@ -129,8 +129,18 @@ let public_profile request = let^? nick, _password, _email, (bio, _) = Db.find_opt Q.get_user nick in let user_info = Format.sprintf - {|nick = `%s`; bio = '%s'; - Your avatar picture|} + {| +

%s

+
+
+
+
%s
+
+
+ Your avatar picture +
+
+|} nick (Dream.html_escape bio) nick in Ok user_info diff --git a/src/user_profile.eml.html b/src/user_profile.eml.html index 61f828c..7fbe438 100644 --- a/src/user_profile.eml.html +++ b/src/user_profile.eml.html @@ -1,16 +1,19 @@ let f nick bio request = -<%s Format.sprintf "Hello %s !" nick %> - <%s! Dream.form_tag ~action:"/profile" request %> -
- - -
Who are you?
-
- - - - Your avatar picture - <%s! Dream.form_tag ~action:"/profile" ~enctype:`Multipart_form_data request %> - - - +

<%s Format.sprintf "Hello %s !" nick %>

+ <%s! Dream.form_tag ~action:"/profile" request %> +
+ + +
Who are you?
+
+ + +
+ Your avatar picture +
+
+ <%s! Dream.form_tag ~action:"/profile" ~enctype:`Multipart_form_data request %> +
+
+ +