diff options
author | Shaun McCance <shaunm@redhat.com> | 2020-10-16 11:21:13 -0400 |
---|---|---|
committer | Shaun McCance <shaunm@redhat.com> | 2020-10-16 11:30:40 -0400 |
commit | f26a7f86b10197d011f0084765564d332e19e14f (patch) | |
tree | 47399cbf9e0fe6ed7cc03070a5b23338855b4ef0 /doc/yelp-xsl/C | |
parent | 4c296beea662ad6ef8276146a05b5bc951646ced (diff) | |
download | yelp-xsl-f26a7f86b10197d011f0084765564d332e19e14f.tar.gz |
Put some CSS in separate tmpl files with simple substitutions
This will make it a lot easier for people to work on the theming without
digging into XSLT files.
Diffstat (limited to 'doc/yelp-xsl/C')
-rw-r--r-- | doc/yelp-xsl/C/db2html.page | 1 | ||||
-rw-r--r-- | doc/yelp-xsl/C/db2xhtml.page | 1 | ||||
-rw-r--r-- | doc/yelp-xsl/C/mal2html.page | 1 | ||||
-rw-r--r-- | doc/yelp-xsl/C/mal2xhtml.page | 1 | ||||
-rw-r--r-- | doc/yelp-xsl/C/tmpl.file.page | 59 | ||||
-rw-r--r-- | doc/yelp-xsl/C/tmpl.page | 53 | ||||
-rw-r--r-- | doc/yelp-xsl/C/tmpl.text.page | 56 |
7 files changed, 172 insertions, 0 deletions
diff --git a/doc/yelp-xsl/C/db2html.page b/doc/yelp-xsl/C/db2html.page index 947fd00e..6338afaf 100644 --- a/doc/yelp-xsl/C/db2html.page +++ b/doc/yelp-xsl/C/db2html.page @@ -6,6 +6,7 @@ <link type="topic" xref="color" group="imports"/> <link type="topic" xref="icons" group="imports"/> <link type="topic" xref="html" group="imports"/> + <link type="topic" xref="tmpl" group="imports"/> <link type="topic" xref="utils" group="imports"/> <link type="topic" xref="db-chunk" group="imports"/> <link type="topic" xref="db-common" group="imports"/> diff --git a/doc/yelp-xsl/C/db2xhtml.page b/doc/yelp-xsl/C/db2xhtml.page index 7966de28..6be5e007 100644 --- a/doc/yelp-xsl/C/db2xhtml.page +++ b/doc/yelp-xsl/C/db2xhtml.page @@ -6,6 +6,7 @@ <link type="topic" xref="color" group="imports"/> <link type="topic" xref="icons" group="imports"/> <link type="topic" xref="html" group="imports"/> + <link type="topic" xref="tmpl" group="imports"/> <link type="topic" xref="utils" group="imports"/> <link type="topic" xref="db-chunk" group="imports"/> <link type="topic" xref="db-common" group="imports"/> diff --git a/doc/yelp-xsl/C/mal2html.page b/doc/yelp-xsl/C/mal2html.page index 481f2699..ff738cb0 100644 --- a/doc/yelp-xsl/C/mal2html.page +++ b/doc/yelp-xsl/C/mal2html.page @@ -7,6 +7,7 @@ <link type="topic" xref="icons" group="imports"/> <link type="topic" xref="html" group="imports"/> <link type="topic" xref="ttml" group="imports"/> + <link type="topic" xref="tmpl" group="imports"/> <link type="topic" xref="utils" group="imports"/> <link type="topic" xref="mal-gloss" group="imports"/> <link type="topic" xref="mal-if" group="imports"/> diff --git a/doc/yelp-xsl/C/mal2xhtml.page b/doc/yelp-xsl/C/mal2xhtml.page index 4ae4d1bc..47b08cab 100644 --- a/doc/yelp-xsl/C/mal2xhtml.page +++ b/doc/yelp-xsl/C/mal2xhtml.page @@ -7,6 +7,7 @@ <link type="topic" xref="icons" group="imports"/> <link type="topic" xref="html" group="imports"/> <link type="topic" xref="ttml" group="imports"/> + <link type="topic" xref="tmpl" group="imports"/> <link type="topic" xref="utils" group="imports"/> <link type="topic" xref="mal-gloss" group="imports"/> <link type="topic" xref="mal-if" group="imports"/> diff --git a/doc/yelp-xsl/C/tmpl.file.page b/doc/yelp-xsl/C/tmpl.file.page new file mode 100644 index 00000000..5d4179b7 --- /dev/null +++ b/doc/yelp-xsl/C/tmpl.file.page @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<page xmlns="http://projectmallard.org/1.0/" style="xslt-template" id="tmpl.file"> + <info> + <link type="guide" xref="tmpl" group="templates"/> + <link type="guide" xref="templates" group="tmpl"/> + <desc>Perform text substitutions on a file.</desc> + <revision version="40" date="FIXME" status="FIXME"/> + </info> + <title>tmpl.file</title> + <synopsis> + <title>Parameters</title> + <terms> + <item> + <title><code>$file</code></title> + <p>The filename of the file to process for substitutions.</p> + </item> + <item> + <title><code>$node</code></title> + <p>The node to create CSS for.</p> + </item> + <item> + <title><code>$direction</code></title> + <p>The directionality of the text, either <sys>ltr</sys> or <sys>rtl</sys>.</p> + </item> + <item> + <title><code>$left</code></title> + <p>The starting alignment, either <sys>left</sys> or <sys>right</sys>.</p> + </item> + <item> + <title><code>$right</code></title> + <p>The ending alignment, either <sys>left</sys> or <sys>right</sys>.</p> + </item> + </terms> + </synopsis> + <p>This template reads the file specified by the <code>$file</code> parameter and performs + text substitutions. Due to XSLT limitations, the file must be a well-formed + XML document. However, this template simply takes the string value of the + document, so it is sufficient to wrap the text in a dummy element and ensure + any <sys><</sys> and <sys>&</sys> characters are escaped.</p> + <p>See <code xref="tmpl">tmpl</code> for information on the substitution syntax.</p> + <note style="plain"> + <p>This template was added in version 40.</p> + </note> + <list style="compact"> + <title>Calls Templates</title> + <item> + <p><link xref="l10n.align.end"/></p> + </item> + <item> + <p><link xref="l10n.align.start"/></p> + </item> + <item> + <p><link xref="l10n.direction"/></p> + </item> + <item> + <p><link xref="tmpl.text"/></p> + </item> + </list> +</page> diff --git a/doc/yelp-xsl/C/tmpl.page b/doc/yelp-xsl/C/tmpl.page new file mode 100644 index 00000000..1715bc39 --- /dev/null +++ b/doc/yelp-xsl/C/tmpl.page @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<page xmlns="http://projectmallard.org/1.0/" type="guide" style="xslt-stylesheet" id="tmpl"> + <info> + <link type="guide" xref="stylesheets" group="tmpl"/> + <desc>Perform simple substitutions in text files.</desc> + <revision version="40" date="FIXME" status="FIXME"/> + </info> + <title>Text Templates</title> + <p>This stylesheet contains templates to perform simple substitutions on text + and files containing text. The primary purpose of these templates is to allow + CSS and JavaScript to be maintained in separate files outside the XSLT, but + still allow those files to reference variables for things like color themes + and text directionality.</p> + <p>The substitution evaluates anything between <sys>{{</sys> and <sys>}}</sys>. Usually, this will + be a reference to a parameter or variable, but it can be any XPath expression. + For example, <sys>{{$color.fg}}</sys> will be replaced with the primary text color.</p> + <p>This syntax is similar to XSLT attribute value templates, except that it uses + double curly braces to avoid conflicts with the many curly braces used in CSS + and JavaScript files.</p> + <note style="plain"> + <p>This stylesheet was added in version 40.</p> + </note> + <links type="topic" groups="imports" style="linklist"> + <title>Imports Stylesheets</title> + </links> + <links type="topic" groups="includes" style="linklist"> + <title>Includes Stylesheets</title> + </links> + <links type="topic" groups="params" style="linklist"> + <title>Defines Parameters</title> + </links> + <links type="topic" groups="keys" style="linklist"> + <title>Defines Keys</title> + </links> + <links type="topic" groups="templates" style="linklist"> + <title>Defines Templates</title> + </links> + <links type="topic" groups="modes" style="linklist"> + <title>Defines Modes</title> + </links> + <list style="compact"> + <title>Calls Templates</title> + <item> + <p><link xref="l10n.align.end"/></p> + </item> + <item> + <p><link xref="l10n.align.start"/></p> + </item> + <item> + <p><link xref="l10n.direction"/></p> + </item> + </list> +</page> diff --git a/doc/yelp-xsl/C/tmpl.text.page b/doc/yelp-xsl/C/tmpl.text.page new file mode 100644 index 00000000..4f4f5901 --- /dev/null +++ b/doc/yelp-xsl/C/tmpl.text.page @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="utf-8"?> +<page xmlns="http://projectmallard.org/1.0/" style="xslt-template" id="tmpl.text"> + <info> + <link type="guide" xref="tmpl" group="templates"/> + <link type="guide" xref="templates" group="tmpl"/> + <desc>Perform text substitutions on some text.</desc> + <revision version="40" date="FIXME" status="FIXME"/> + </info> + <title>tmpl.text</title> + <synopsis> + <title>Parameters</title> + <terms> + <item> + <title><code>$text</code></title> + <p>The text to process for substitutions.</p> + </item> + <item> + <title><code>$node</code></title> + <p>The node to create CSS for.</p> + </item> + <item> + <title><code>$direction</code></title> + <p>The directionality of the text, either <sys>ltr</sys> or <sys>rtl</sys>.</p> + </item> + <item> + <title><code>$left</code></title> + <p>The starting alignment, either <sys>left</sys> or <sys>right</sys>.</p> + </item> + <item> + <title><code>$right</code></title> + <p>The ending alignment, either <sys>left</sys> or <sys>right</sys>.</p> + </item> + </terms> + </synopsis> + <p>This template performs text substitutions on the text in <code>$text</code>. It is called + by <code xref="tmpl.file">tmpl.file</code>, and it calls itself recursively after each substitution.</p> + <p>See <code xref="tmpl">tmpl</code> for information on the substitution syntax.</p> + <note style="plain"> + <p>This template was added in version 40.</p> + </note> + <list style="compact"> + <title>Calls Templates</title> + <item> + <p><link xref="l10n.align.end"/></p> + </item> + <item> + <p><link xref="l10n.align.start"/></p> + </item> + <item> + <p><link xref="l10n.direction"/></p> + </item> + <item> + <p><link xref="tmpl.text"/></p> + </item> + </list> +</page> |