|Did you know ...||Search Documentation:|
|library(http/html_head): Automatic inclusion of CSS and scripts links|
This library allows for abstract declaration of available CSS and
Based on these declarations, html generating code can declare that it
library ensures that the proper links appear in the HTML head. The
implementation is based on mail system implemented by html_post/2
Declarations come in two forms. First of all http locations are
declared using the
http_path.pl library. Second, html_resource/2
specifies HTML resources to be used in the
head and their
and style sheets (.css). It is trivial to add support for other material
in the head. See
For usage in HTML generation, there is the DCG rule html_requires//1 that demands named resources in the HTML head.
All calls to html_requires//1 for the page are collected and duplicates are removed. Next, the following steps are taken:
debug(html(script)). to see the
requested and final set of resources. All declared resources are in html_resource/3.
The edit/1 command recognises the names of
false), do not include About itself, but only its dependencies. This allows for defining an alias for one or more resources.
Registering the same About multiple times extends the properties defined for About. In particular, this allows for adding additional dependencies to a (virtual) resource.
headusing html_post/2. The actual dependencies are computed during the HTML output phase by html_insert_resource//1.
:- multifile html_head:mime_include//2. html_head:mime_include(text/'x-prolog', Path) --> !, html(script([ type('text/x-prolog'), src(Path) ], )).