/[svn]/website/trunk/web/site.cd
ViewVC logotype

Diff of /website/trunk/web/site.cd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 560 by abate, Tue Jul 10 17:38:30 2007 UTC revision 561 by abate, Tue Jul 10 17:44:49 2007 UTC
# Line 21  Line 21 
21  type External = <external {|href=String; title=String; name=String |}>[]  type External = <external {|href=String; title=String; name=String |}>[]
22    
23  type Item =  type Item =
24     <box title=String; subtitle=?String; link=String>Content     <box title=String subtitle=?String link=String>Content
25   | <meta>Content   | <meta>Content
26   | <left>Content   | <left>Content
27   | Page   | Page
# Line 36  Line 36 
36    <slides file=String>[ <title>String Author+ <comment>[InlineText*] ]    <slides file=String>[ <title>String Author+ <comment>[InlineText*] ]
37    
38  type Link =  type Link =
39    <link url=String; title=String>[ InlineText* ]    <link url=String title=String>[ InlineText* ]
40    
41  type Content =  type Content =
42     [ ( <p {||}>[InlineText*]     [ ( <p {||}>[InlineText*]
# Line 175  Line 175 
175   <page name=name>[ <title>title (c::(Page|External) | _)* ] ->   <page name=name>[ <title>title (c::(Page|External) | _)* ] ->
176     let children = map c with p -> compute_sitemap p in     let children = map c with p -> compute_sitemap p in
177     { name = name; url = url_of_name name; title = title; children =children }     { name = name; url = url_of_name name; title = title; children =children }
178  |<external name=name; href=h; title=t>[] ->  |<external name=name href=h title=t>[] ->
179     { name = name; url = h; title = t; children = [] }     { name = name; url = h; title = t; children = [] }
180    
181  let display_sitemap (h : Tree) :  Xli =  let display_sitemap (h : Tree) :  Xli =
# Line 220  Line 220 
220          [ <div class="code">[ <pre>s ] ]          [ <div class="code">[ <pre>s ] ]
221     | <sample>s ->     | <sample>s ->
222          [ <div class="code">[ <pre>(highlight s) ] ]          [ <div class="code">[ <pre>(highlight s) ] ]
223     | <link url=url; title=title>com ->     | <link url=url title=title>com ->
224          [ <a href=url>title '. ' !(text com) ]          [ <a href=url>title '. ' !(text com) ]
225     | <ul>lis ->     | <ul>lis ->
226          [ <ul>(map lis with <li>x -> <li>(content x)) ]          [ <ul>(map lis with <li>x -> <li>(content x)) ]
# Line 231  Line 231 
231          let toc =          let toc =
232           transform items with           transform items with
233           | Page & p ->  [ <li>[ (link_to p) ] ]           | Page & p ->  [ <li>[ (link_to p) ] ]
234           | <external href=l; title=t>[] -> [ <li>[ <a href=l>t ] ] in           | <external href=l title=t>[] -> [ <li>[ <a href=l>t ] ] in
235          (match toc with [] -> [] | lis -> [ <ul>lis ])          (match toc with [] -> [] | lis -> [ <ul>lis ])
236     | <boxes-toc>[] ->     | <boxes-toc>[] ->
237          let toc =          let toc =
238           transform items with           transform items with
239            <box title=t; link=l>_ -> [ <li>[ <a href=('#',l)>t ] ] in            <box title=t link=l>_ -> [ <li>[ <a href=('#',l)>t ] ] in
240          (match toc with [] -> [] | lis -> [ <ul>lis ])          (match toc with [] -> [] | lis -> [ <ul>lis ])
241     | <site-toc>[] ->     | <site-toc>[] ->
242          [ <ul>[ (display_sitemap sitemap) ] ]          [ <ul>[ (display_sitemap sitemap) ] ]
# Line 258  Line 258 
258       [ <div class="box">[       [ <div class="box">[
259           <h2>(r . title)           <h2>(r . title)
260            !(match r with { subtitle = t } -> [<b>t] | _ -> [])            !(match r with { subtitle = t } -> [<b>t] | _ -> [])
261           <a name=r . link>[]           <a name=(r . link)>[]
262           !(content c)  ] ]           !(content c)  ] ]
263    | <meta>c -> [ <div class="meta">(content c) ]    | <meta>c -> [ <div class="meta">(content c) ]
264   in   in
# Line 277  Line 277 
277   let next = match next with [] -> []   let next = match next with [] -> []
278     | <page name=n>[ <title>t; _ ] ->     | <page name=n>[ <title>t; _ ] ->
279        [ <a href=(url_of_name n)>[        [ <a href=(url_of_name n)>[
280            <img width="16"; height="16"; class="icon"; alt="Next page"; src="img/right.gif">[]            <img width="16" height="16" class="icon" alt="Next page" src="img/right.gif">[]
281            ' ' !t            ' ' !t
282          ] ] in          ] ] in
283   let prev = match prev with [] -> []   let prev = match prev with [] -> []
284     | <page name=n>[ <title>t; _ ] ->     | <page name=n>[ <title>t; _ ] ->
285        [ <a href=(url_of_name n)>[        [ <a href=(url_of_name n)>[
286            <img width="16"; height="16"; class="icon"; alt="Previous page"; src="img/left.gif">[]            <img width="16" height="16" class="icon" alt="Previous page" src="img/left.gif">[]
287            ' ' !t            ' ' !t
288          ] ] in          ] ] in
289   let navig : [ Xdiv* ] =   let navig : [ Xdiv* ] =
# Line 295  Line 295 
295   <html>[   <html>[
296    <head>[    <head>[
297     <title>[ 'CDuce: ' !title ]     <title>[ 'CDuce: ' !title ]
298     <meta content="text/html; charset=iso-8859-1"; http-equiv="Content-Type">[]     <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">[]
299     <meta content="css">[]  (* Placeholder for PHP code *)     <meta content="css">[]  (* Placeholder for PHP code *)
300    ]    ]
301    <body>[    <body>[

Legend:
Removed from v.560  
changed lines
  Added in v.561

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5