
cliopatria.pl -- ClioPatria skin
This page defines the overall layout of ClioPatria pages. All pages are
returned using reply_html_page/3, using the page class cliopatria(Id)
,
where Id is currently always default
. Pages can be redefined by
providing a rule for user:body//2, where the first argument must unify
with the page class.
The default skin provides the overall menu, a simple search form, the
content and the `server-address'. Because the search-form uses the YUI
autocomplete widgets, the body must include class yui-skin-sam
. The
default body has the classes yui-skin-sam
and cliopatria
.
The default skin provided by this can be overruled using two hooks:
- cliopatria:page_body//1
- Emit a page from the given content. This hook can be used to modify the overall page layout beyond what can be achieved with CSS.
- cliopatria:server_address//0
- Write the address of the server.
This library also provides building blocks, notably for server_address//0:
- server_address//1
- Presents the version info and a link to a GIT module.
- current_page_doc_link//0
-
Presents a link to the documentation of a page if the
self-documentation facilities are loaded. See
run.pl
.in.
The CSS file css('cliopatria.css') contains the ClioPatria style that is
makes ClioPatria look pretty to our eyes, but is not essential. The
plugin config-available/fix_menu.pl
contains example code to extend the
ClioPatria skin.
user:body(+Style, :Body)// is det[multifile]
- The multi-file implementation defines the overall layout of HTML
pages with the Style
cliopatria(_)
. address//[private]
- Emit an element
address
with classcliopatria
. This first class the hook cliopatria:server_address//0. If this hooks fails, it callsserver_address('ClioPatria')
. server_address(+Component)//
- HTML component that emits the default ClioPatria address link.
This provides a link to the ClioPatria home page and the (GIT)
version information. ClioPatria is registered with the GIT
module
ClioPatria
and the default server address is provided by calling:..., server_address('ClioPatria'), ...
component_address(+Name)//[private]
- The label ClioPatria as a link to its home-page on the web.
component_version(+Name)//[private]
- Give verion information and link to detailed version info
current_page_doc_link//
- Create a link to the documentation (and from there to the implementation) of this page. This link is created only if the library applications(help/http_help) is loaded.