-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.ml
More file actions
36 lines (32 loc) · 1.3 KB
/
template.ml
File metadata and controls
36 lines (32 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
open Eliom_lib
open Eliom_content
open Html5.D
open Eliom_tools.D
let loading_part () =
div ~a:[a_id "loading-wrapper"] [ span ~a:[a_id "loading-p"] []]
let top_wrapper () =
div ~a:[a_id "header-wrapper"] [ span ~a:[a_id "appname"] [ pcdata "PassPartout"];
(try
span ~a:[a_id "welcome-msg"] [pcdata ("Hello " ^ User.get_login () ^ "!")]
with
| User.Not_logged_in -> span [ pcdata "Not logged in"]);
loading_part ()]
let make_page l = html
~title:"restricted area"
~js:[["js";"sjcl.js"]]
~css:[["css";"main.css"]]
~other_head:[meta ~a:[a_name "viewport";
a_content "user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"]
() ]
(body (top_wrapper ()::l)
)
let make_page_redirect url l = html
~title:"restricted area"
~js:[["js";"sjcl.js"]]
~css:[["css";"main.css"]]
~other_head:[meta ~a:[a_name "viewport";
a_content "user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"]
();
meta ~a:[a_http_equiv "refresh"; a_content ("1;url="^url) ] () ]
(body (top_wrapper ()::l)
)