Commit 54bf9367 authored by François Bobot's avatar François Bobot
Browse files

[SRC] add last pages

parent 14198e2e
_build
/topfind_header.ml
/list_pages.byte
\ No newline at end of file
......@@ -2,14 +2,17 @@
# --- Build
# --------------------------------------------------------------------------
.PHONY: all build install uninstall clean
.PHONY: all build install uninstall clean check_pages create_pages
all: generate
all: generate check_pages
clean:
rm -fr build *~
ocamlbuild -clean
#force allows to always run the rules that depends on it
.PHONY: force
# --------------------------------------------------------------------------
# --- Compilation
# --------------------------------------------------------------------------
......@@ -24,13 +27,13 @@ ifeq ($(DEVEL),YES)
FLAGS+=-tag bin_annot
endif
PAGE=$(subst .page.ml,,$(wildcard *.page.ml))
PAGE:=$(subst .page.ml,,$(wildcard *.page.ml))
generate: $(addprefix ../www/, $(addsuffix .html,$(PAGE)))
HEADER=topfind_header.ml
../www/%.html: %.page.ml $(HEADER) utils
../www/%.html: %.page.ml $(HEADER) _build/utils.cma
@echo "Generating $*.html"
@echo "#1 \"$*.page.ml\"" | cat $(HEADER) - $< | ocaml -I _build -stdin $< > $@.tmp
@mv $@.tmp $@
......@@ -42,11 +45,15 @@ $(HEADER): Makefile
@echo "#load \"utils.cma\";;" >> $@.tmp
@mv $@.tmp $@
utils: force
_build/utils.cma: force
@echo "Compiling common library"
@ocamlbuild $(FLAGS) utils.cma
@ocamlbuild $(FLAGS) utils.cma list_pages.byte
check_pages: force _build/utils.cma
@$(foreach p, $(filter-out $(PAGE), $(shell _build/list_pages.byte)), \
echo "== Page \"$(p)\" missing (run \"make create_pages; make\") ==";)
#force allows to always run the rules that depends on it
.PHONY: force
create_pages: force _build/utils.cma
@$(foreach p, $(filter-out $(PAGE), $(shell _build/list_pages.byte)), \
echo "Create \"$(p).page.ml"; \
sed skeleton.page.ml.in -e "s/@page@/$(p)/g" > $(p).page.ml;)
open Html5.M
open Generate
open Menu
let () = Generate.page delivrables [
p [pcdata "No delivrables have been currently produced"]
]
......@@ -8,10 +8,12 @@ let internal_link ?(a=[]) p text =
let page p b =
let header =
div ~a:[a_id "Header"]
[internal_link ~a:[a_style "font-size: large;"] main "SOPRANO";
pcdata (": "^p.long_title)] in
[internal_link ~a:[a_style "font-size: 200%; margin-right:10px;"]
main "SOPRANO";
pcdata (p.long_title)] in
let menu =
(List.map (fun p -> internal_link p p.menu_title)) menu
(List.fold_right (fun p acc -> internal_link p p.menu_title::br ()::acc))
menu []
in
let menu = div ~a:[a_id "Menu"] menu in
let content = div ~a:[a_id "Content"] b in
......@@ -24,3 +26,5 @@ let page p b =
])
(body ([header;content;menu])) in
Html5.P.print ~output:print_string html
type a_remplir = ARemplir (** For the squeleton *)
open Html5.M
open Generate
open Menu
......
open Html5.M
open Generate
open Menu
let () = Generate.page jobs [
ul [
li [pcdata "PhD"];
li [pcdata "PostDoc"];
]
]
let () = List.iter (fun p -> Printf.printf "%s\n" p.Menu.filename) Menu.menu
open Html5.M
open Generate
open Menu
let () = Generate.page meetings [
ul [
li [pcdata "Kick-Off"];
]
]
......@@ -7,8 +7,54 @@ type page = {
be defined in "foo.page.ml" *)
}
let main = { long_title="Home"; menu_title = "Home"; filename = "index" }
let main = {
long_title = "Home";
menu_title = "Home";
filename = "index";
}
let partners = {
long_title = "Members of the project";
menu_title = "Partners";
filename = "partners";
}
let jobs = {
long_title = "Job opportunities";
menu_title = "Jobs";
filename = "jobs";
}
let delivrables = {
long_title = "Delivrables for the ANR";
menu_title = "Delivrables";
filename = "delivrables";
}
let meetings = {
long_title = "Meetings";
menu_title = "Meetings";
filename = "meetings";
}
let publications = {
long_title = "Publications";
menu_title = "Publications";
filename = "publications";
}
let software = {
long_title = "Software";
menu_title = "Software";
filename = "software";
}
let menu = [
main;
partners;
jobs;
delivrables;
meetings;
publications;
software;
]
open Html5.M
open Generate
open Menu
let logo ~background ~name ~file =
img
~src:(Printf.sprintf "images/logo/%s" file)
~alt:name
~a:[a_style (Printf.sprintf "margin: 5px; \
margin-right: 20px; \
background:%s" background)]
()
let () = Generate.page partners [
logo
~file:"cea_list.png"
~name:"CEA List"
~background:"#ED1C24";
logo
~file:"upsud.svg"
~name:"Paris-Sud University"
~background:"white";
logo
~file:"INRIA.png"
~name:"INRIA"
~background:"white";
logo
~file:"ocamlpro.png"
~name:"OcamlPro"
~background:"#1B325F";
logo
~file:"adacore.png"
~name:"Adacore"
~background:"black";
]
open Html5.M
open Generate
open Menu
let () = Generate.page publications [
ul [
li [pcdata "CP meets SMT, François Bobot, Sébastien Bardin, \
and Bruno Marre. \
Workshop CP meets Verification 2014 (CPCAV 2014)"];
]
]
open Html5.M
open Generate
open Menu
let () = Generate.page @page@ [
ARemplir
]
open Html5.M
open Generate
open Menu
let () = Generate.page software [
]
......@@ -38,28 +38,13 @@ a:hover {background-color:#eee;}
#Header {
margin:50px 0px 10px 0px;
padding:17px 0px 0px 20px;
/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
height:33px; /* 14px + 17px + 2px = 33px */
border-style:solid;
border-color:black;
border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
line-height:11px;
background-color:#eee;
/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
declaration. The incorrect IE5/Win value is above, while the correct value is
below. See http://glish.com/css/hacks.asp for details. */
voice-family: "\"}\"";
voice-family:inherit;
height:14px; /* the correct height */
height:27px; /* the correct height */
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct
length values to user agents that exhibit the parsing error exploited above yet get
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#Header {height:14px;}
#Content {
margin:0px 50px 50px 200px;
......@@ -70,18 +55,12 @@ body>#Header {height:14px;}
position:absolute;
top:100px;
left:20px;
width:172px;
padding:10px;
background-color:#eee;
border:1px dashed #999;
line-height:17px;
/* Again, the ugly brilliant hack. */
voice-family: "\"}\"";
voice-family:inherit;
width:150px;
}
/* Again, "be nice to Opera 5". */
body>#Menu {width:150px;}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>SOPRANO: Delivrables for the ANR</title><meta charset="utf-8" /><link rel="stylesheet" href="css/main.css" /></head><body><div id="Header"><a href="index.html" title="Home" style="font-size: 200%; margin-right:10px;">SOPRANO</a>Delivrables for the ANR</div><div id="Content"><p>No delivrables have been currently produced</p></div><div id="Menu"><a href="index.html" title="Home">Home</a><br /><a href="partners.html" title="Members of the project">Partners</a><br /><a href="jobs.html" title="Job opportunities">Jobs</a><br /><a href="delivrables.html" title="Delivrables for the ANR">Delivrables</a><br /><a href="meetings.html" title="Meetings">Meetings</a><br /><a href="publications.html" title="Publications">Publications</a><br /><a href="software.html" title="Software">Software</a><br /></div></body></html>
\ No newline at end of file
This diff is collapsed.
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