From 684c890994e5d01b2abbc604be1b4c66be2e7327 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sun, 15 Mar 2015 19:19:05 +0000 Subject: [PATCH] delete the per-person page, as it was largely useless and really bulked up the site too much. Now we just link to the persons homepage... --- lib/www.ml | 45 ++++++++++----------------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/lib/www.ml b/lib/www.ml index 85b6223f..ac6b8876 100644 --- a/lib/www.ml +++ b/lib/www.ml @@ -46,12 +46,17 @@ let refs_to_html rs = let human_readable_date d = sprintf "%s %d" (Month.to_string (Date.month d)) (Date.year d) +let person_href p content = + match p.Types.Person.homepage with + | Some h -> <:html<$content$&>> + | None -> content + let mugshot p = sprintf "../mugshots/%s" (Option.value ~default:"unknown.jpg" p.Types.Person.mugshot) let mugshot_img ?(float=true) ?(size=60) p = let size = sprintf "%dpx" size in let style = if float then "float:left; padding-right: 30px" else "" in - let phref = sprintf "../people/%s.html" p.Types.Person.id in - <:html<&>> + let c = <:html<&>> in + person_href p c (* CSS style we include for each page. * Note that this style is specialised to the CUCL web page style *) @@ -87,14 +92,13 @@ let one_page ?(extra_head=[]) ~title ~body () = (* Generate the overall people web pages *) let people = let open Types.Person in - (* Output a short list of projects this person works on. *) let person_to_html p = let m = mugshot_img ~size:80 p in - let phref = sprintf "%s.html" p.id in - <:html< + let phref = person_href p <:html<$str:p.name$&>> in + <:html< - +
$m$
$str:p.name$
$str:p.role$
$phref$
$str:p.role$
>> in @@ -131,33 +135,6 @@ let people =

>> () -(* Generate a profile page per-person *) -let one_person p = - let open Types.Person in - let homepage = match p.homepage with - |None -> <:html< >> - |Some h -> link h h in - let first_name = - match String.split_on_chars ~on:[' '] p.name with - |hd::_ -> hd - |_ -> p.name - in - let body = <:html< -

$str:p.name$

-

- $mugshot_img p$ - $str:to_string p.affiliation$
- $str:p.role$
- $homepage$ -

-

Projects

-
-

These are the projects that $str:first_name$ is working on. The project list includes other people's tasks on the same project too, as it's helpful to see interdependencies this way. Click on the project headings to see more information about it.

-
- $list:Gantt.to_short_html p$ - >> in - one_page ~title:p.name ~body () - let projects = let sproj = let open Data.Projects in @@ -338,8 +315,6 @@ let write_blogs file = let _ = write_uconfig "people" (List.map Data.People.all ~f:(fun p -> p.Types.Person.id)); write_html "people/index" people; - List.iter Data.People.all ~f:(fun p -> - write_html ("people/"^p.Types.Person.id) (one_person p)); write_uconfig "tasks" (List.map Data.Projects.all ~f:(fun p -> p.Types.Project.project_id)); write_html "tasks/index" projects; List.iter Data.Projects.all ~f:(fun p ->