From f7c92759fdc11f3b0c0b1d9dd07bdebc40fc769b Mon Sep 17 00:00:00 2001 From: Wilmer Ricciotti Date: Mon, 30 May 2011 12:25:24 +0000 Subject: [PATCH] Partially working table layout of matita web (only on some browsers). --- matitaB/matita/index.html | 436 +++++++++++++++++++++++++++++++++ matitaB/matita/matitadaemon.ml | 14 +- 2 files changed, 447 insertions(+), 3 deletions(-) create mode 100644 matitaB/matita/index.html diff --git a/matitaB/matita/index.html b/matitaB/matita/index.html new file mode 100644 index 000000000..98692b5ad --- /dev/null +++ b/matitaB/matita/index.html @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + +
+ +

+   +

+ + +
+ + +
+
+  
(* script lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo *)
+ +
+
+
+
lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo lungo 
+
+
+ +
+ + diff --git a/matitaB/matita/matitadaemon.ml b/matitaB/matita/matitadaemon.ml index 934e2ab1e..95ddb1800 100644 --- a/matitaB/matita/matitadaemon.ml +++ b/matitaB/matita/matitadaemon.ml @@ -135,6 +135,11 @@ let load_index outchan = Http_daemon.respond ~headers:["Content-Type", "text/html"] ~code:(`Code 200) ~body:s outchan ;; +let load_doc filename outchan = + let s = read_file filename in + Http_daemon.respond ~headers:["Content-Type", "text/html"] ~code:(`Code 200) ~body:s outchan +;; + let call_service outchan = try (ignore(MatitaEngine.assert_ng @@ -218,15 +223,18 @@ let callback req outchan = with e -> (prerr_endline (Printexc.to_string e); Http_daemon.respond ~code:(`Code 500) outchan)) - | url -> Http_daemon.respond_not_found ~url outchan - + | url -> + try + let url = String.sub url 1 (String.length url - 1) in + load_doc url outchan + with _ -> Http_daemon.respond_not_found ~url outchan ;; let spec = { Http_daemon.default_spec with callback = callback; port = 9999; - mode = `Single; + mode = `Thread; } ;; -- 2.39.2