Commit 7b104e89 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-01-06 08:48:22 by afrisch] Can remove left bar

Original author: afrisch
Date: 2005-01-06 08:48:22+00:00
parent 981d743c
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<page name="demo">
<page name="demo" leftbar="false">
<title>CDuce demo</title>
<box title="XML elements" link="xml">
......
......@@ -14,7 +14,7 @@ using H = "xhtml"
(** Input types **)
type Site = <site>[ <title>String Page ]
type Page = <page name=Latin1 url=?String new=?"">[ <title>String <banner>[InlineText*]? Item* ]
type Page = <page name=Latin1 url=?String new=?"" leftbar=?("true"|"false")>[ <title>String <banner>[InlineText*]? Item* ]
type External = <external {|href=String; title=String; name=String |}>[]
type Item =
......@@ -301,7 +301,7 @@ let gen_page (site : String,
prev : PageO, page : Page, next : PageO,
path : Path, sitemap : Tree) : PageO =
match page with
<page name=name>[
<page name=name leftbar="false"&(leftbar:=`false) else (leftbar:=`true)>[
<title>title <banner>banner | <title>(title & banner); items ] ->
let footnote_counter = ref Int 0 in
......@@ -420,15 +420,18 @@ match page with
(* Preparing left panel *)
let navig = transform items with <left>c -> [ c ] in
let left = match navig with [] -> [ [<boxes-toc>[]] ] | n -> n in
let left =
if leftbar then
let navig = transform items with <left>c -> [ c ] in
let left = match navig with [] -> [ [<boxes-toc>[]] ] | n -> n in
[
<td valign="top" align="left">[
<table cellpadding="0" cellspacing="15"
<table cellpadding="0" cellspacing="15"
width="200"
style="font-size:80%; border: 1px dashed black;
background: #ffcd72"> (* altbg 9aa8ba *)
(map left with x -> <tr>[ <td>[ (small_box (content x)) ] ]) ] in
(map left with x -> <tr>[ <td>[ (small_box (content x)) ] ]) ] ]
else [] in
let dpath : H:Inlines = transform path with
| { url = f; title = t } -> [ <a href=f>t ': ']
......@@ -499,7 +502,7 @@ text-align:center; color: #aa0000; font: bold 200% helvetica" >
]
<body style="margin: 0; padding : 0; background: #fcb333">[ (* altbg 4e6e99 *)
<table cellspacing="10" cellpadding="0" width="100%" border="0">[
<tr>[ left right ]
<tr>[ !left right ]
]
]
]
......
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