.TH "Eliom_tools.HTML5_TOOLS" 3o 2014-07-10 OCamldoc ""
.SH NAME
Eliom_tools.HTML5_TOOLS \- no description
.SH Module type
Module type Eliom_tools.HTML5_TOOLS
.SH Documentation
.sp
Module type
.BI "HTML5_TOOLS"
=
.B sig end
.sp
.sp
.sp
.sp
.PP
.B ===
.B Simple menu
.B ===
.PP
.I val menu
:
.B ?classe:Html5_types.nmtoken list ->
.B ?id:string ->
.B (([< Eliom_service.get_service_kind ] as 'a,
.B [< Eliom_service.registrable ] as 'b,
.B [< Eliom_registration.non_ocaml_service ] as 'c)
.B Eliom_tools.one_page *
.B Html5_types.flow5_without_interactive Eliom_content.Html5.elt list)
.B list ->
.B ?service:('a, 'b, 'c) Eliom_tools.one_page ->
.B unit -> [> `Ul ] Eliom_content.Html5.elt
.sp
The function
.B menu elts ()
, where
.B elts
is a list of pair
.B (service, content)
, creates a list of link towards the
.B service
s\&. See the Eliom manual for an \&.
.sp
The optional parameter
.B service
is used to find which item(s)
to highlight (by adding the class
.B eliomtools_current
to the
corresponding
.B
node)\&. The default is to highlight the item
corresponding to the current url\&.
.sp
The optional parameters
.B id
and
.B classe
allow to specify the
corresponding attributes in the generated
.B
node\&. The
default class for the
.B
node is
.B eliomtools_menu
\&.
.sp
.sp
.PP
.B ===
.B Hierchical sites
.B ===
.PP
.I val hierarchical_menu_depth_first
:
.B ?classe:Html5_types.nmtoken list ->
.B ?id:string ->
.B ?whole_tree:bool ->
.B ([< Eliom_service.get_service_kind ] as 'a,
.B [< Eliom_service.registrable ] as 'b,
.B Html5_types.a_content Eliom_content.Html5.elt list)
.B Eliom_tools.hierarchical_site ->
.B ?service:('a, 'b, [< Eliom_registration.non_ocaml_service ])
.B Eliom_tools.one_page ->
.B unit -> [> `Ul ] Eliom_content.Html5.elt list
.sp
The function
.B hierarchical_menu_depth_first site ()
constructs
a hierarchical menu by exploring the hierarchical
.B site
description using a depth\-first algorithm: the first menu item
will be displayed, followed by the whole sub\-menu for this item,
then the second menu item with its sub\-menu, and so on\&.
.sp
By default, only the sub\-menus for to the url corresponding to
the optional argument
.B service
are displayed, others sub\-menu
are collapsed\&. If you want all the sub\-menus to be displayed,
specify
.B ~whole_tree:true
\&. If the optional parameter
.B service
is not given, the current page is used\&.
.sp
See
.B Eliom_tools\&.HTML5_TOOLS\&.menu
for a description of the optional parameters
.B id
and
.B classe
\&.
.sp
.sp
.I val hierarchical_menu_breadth_first
:
.B ?classe:Html5_types.nmtoken list ->
.B ?id:string ->
.B ([< Eliom_service.get_service_kind ] as 'a,
.B [< Eliom_service.registrable ] as 'b,
.B Html5_types.a_content Eliom_content.Html5.elt list)
.B Eliom_tools.hierarchical_site ->
.B ?service:('a, 'b, [< Eliom_registration.non_ocaml_service ])
.B Eliom_tools.one_page ->
.B unit -> [> `Ul ] Eliom_content.Html5.elt list
.sp
The function
.B hierarchical_menu_breadth_first site ()
constructs a hierarchical menu by exploring the hierarchical
.B site
description using a breadth_first algorithm: the whole
menu for one level will be displayed, followed by the sub\-menu
leading to the current service, and so one\&.
.sp
By default the current service correspond to the current
url\&. The optional parameter
.B service
allow to override the
current service\&.
.sp
See
.B Eliom_tools\&.HTML5_TOOLS\&.menu
for a description of the optional parameters
.B id
and
.B classe
\&.
.sp
.sp
.I val structure_links
:
.B ([< Eliom_service.get_service_kind ] as 'a,
.B [< Eliom_service.registrable ] as 'b,
.B Html5_types.a_content Eliom_content.Html5.elt list)
.B Eliom_tools.hierarchical_site ->
.B ?service:('a, 'b, [< Eliom_registration.non_ocaml_service ])
.B Eliom_tools.one_page ->
.B unit -> [> `Link ] Eliom_content.Html5.elt list
.sp
The function
.B structure_links site ()
returns the tags
.B
and
.B
for the
given hierarchical
.B site
\&.
.sp
By default the current service correspond to the current
url\&. The optional parameter
.B service
allow to override the
current service\&.
.sp
.sp
.I val head
:
.B title:string ->
.B ?css:string list list ->
.B ?js:string list list ->
.B ?other:Html5_types.head_content_fun Eliom_content.Html5.elt list ->
.B unit -> Html5_types.head Eliom_content.Html5.elt
.sp
An auxiliary function for creating an HTML head elements\&. Resources (JS,
CSS) are taken from the static directory\&.
.sp
.sp
.I val html
:
.B title:string ->
.B ?a:Html5_types.html_attrib Eliom_content.Html5.attrib list ->
.B ?css:string list list ->
.B ?js:string list list ->
.B ?other_head:Html5_types.head_content_fun Eliom_content.Html5.elt list ->
.B Html5_types.body Eliom_content.Html5.elt ->
.B Html5_types.html Eliom_content.Html5.elt
.sp
.sp