| 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 |
| 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*] |
| 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 = |
| 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)) ] |
| 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) ] ] |
| 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 |
| 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* ] = |
| 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>[ |