Commit 49936bc8 authored by Stephane Glondu's avatar Stephane Glondu

Helios_templates

parent 71b7db43
open Eliom_content.Html5.D
let base ~title ~header ~content =
let s x = Xml.uri_of_string ("/static/" ^ x) in
html
(head (Eliom_content.Html5.F.title (pcdata title)) [
link
~rel:[`Stylesheet]
~href:(s "main.css")
~a:[a_mime_type "text/css"; a_media [`Screen]]
();
link
~rel:[`Stylesheet]
~href:(s "helios/css/ui-lightness/jquery-ui-1.8.1.custom.css")
~a:[a_mime_type "text/css"]
();
script (pcdata "") ~a:[a_src (s "helios/js/jquery-1.4.2.min.js")];
script (pcdata "") ~a:[a_src (s "helios/js/jquery-ui-1.8.1.custom.min.js")];
script (pcdata "") ~a:[a_src (s "helios/js/jqsplitdatetime.js")];
script (pcdata "") ~a:[a_src (s "helios/helios/jquery.json.min.js")];
(* block js *)
(* block extra-head *)
])
(body [
div ~a:[a_id "content"] [
div ~a:[a_id "header"] ([
a ~service:Helios_services.home_s
[img
~src:(s "logo.gif")
~a:[a_style "border:0;"; a_height 110]
~alt:"Helios" ()] ();
br ();
] @ header);
div ~a:[a_id "contentbody"] content;
div ~a:[a_id "footer"] [
span ~a:[a_style "float:right;"] [ (* footer logo *) ];
(* if user/voter... *)
pcdata "not logged in.";
br ();
a
~service:Helios_services.heliosvotingorg_s
[pcdata "About Helios"] ();
(* footer links *)
br ~a:[a_style "clear:right;"] ();
];
];
])
......@@ -16,6 +16,9 @@ let () = dispatch & function
| After_rules ->
Pathname.define_context "src" ["helios/src"];
Pathname.define_context "helios/src" ["src"];
rule "%.atd -> %_t.ml & %_t.mli" ~deps:["%.atd"] ~prods:["%_t.ml"; "%_t.mli"]
(atdgen_action [A"-t"]);
rule "%.atd -> %_j.ml & %_j.mli" ~deps:["%.atd"] ~prods:["%_j.ml"; "%_j.mli"]
......
let () =
Eliom_registration.Html5.register ~service:Helios_services.home_s
(fun () () -> Lwt.return (Helios_templates.base
~title:"Helios Election Server"
~header:[]
~content:[]))
open Lwt
open Eliom_content.Html5.D
open Eliom_service
open Eliom_parameter
open Eliom_registration.Html5
let main_service =
register_service ~path:["helios"] ~get_params:unit
(fun () () -> return (html (head (title (pcdata "Page title")) [])
(body [h1 [pcdata "Helios"]])))
let heliosvotingorg_s = external_service
~prefix:"http://heliosvoting.org"
~path:[]
~get_params:unit
()
let home_s = service
~path:[]
~get_params:unit
()
Helios_services
Helios_templates
Helios_registration
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment