summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-08-19 15:33:59 +0200
committerdakkar <dakkar@thenautilus.net>2009-08-19 15:33:59 +0200
commit57c65d6feb96239cc78626ed206de27e5c1f949c (patch)
treebcbe321e2b9b196d26fa7dfef12762627cfee119 /templates
parentgeneral tags page (diff)
downloadthenautilus-57c65d6feb96239cc78626ed206de27e5c1f949c.tar.gz
thenautilus-57c65d6feb96239cc78626ed206de27e5c1f949c.tar.bz2
thenautilus-57c65d6feb96239cc78626ed206de27e5c1f949c.zip
classes in tags lists
also added code to reST.xsl to actually propagate the classes
Diffstat (limited to 'templates')
-rw-r--r--templates/document-listing.tt15
-rw-r--r--templates/reST.xsl32
2 files changed, 28 insertions, 19 deletions
diff --git a/templates/document-listing.tt b/templates/document-listing.tt
index 729e08c..9cf4775 100644
--- a/templates/document-listing.tt
+++ b/templates/document-listing.tt
@@ -1,3 +1,12 @@
-[% FOR doc IN tagged.$path %]
-[% IF isLang(language,doc) %]* `<[% dstUriFor(doc) %]>`_[% END %]
-[% END %]
+[% docs = [];
+ FOR doc IN tagged.$path;
+ IF isLang(language,doc);
+ docs.push(doc);
+ END;
+ END -%]
+[% IF docs.size > 0 %]
+.. class:: doc-tag-list
+
+[% FOR doc IN docs %]
+* `<[% dstUriFor(doc) %]>`_
+[% END; END %]
diff --git a/templates/reST.xsl b/templates/reST.xsl
index bd548af..141ec04 100644
--- a/templates/reST.xsl
+++ b/templates/reST.xsl
@@ -117,13 +117,13 @@
</xsl:template>
<xsl:template match="caption">
- <div class="caption">
+ <div class="caption {@classes}">
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="line_block">
- <div class="line-block">
+ <div class="line-block {@classes}">
<xsl:apply-templates />
</div>
</xsl:template>
@@ -134,7 +134,7 @@
<xsl:template match="literal_block">
- <div class="literal-block"><xsl:apply-templates /></div>
+ <div class="literal-block {@classes}"><xsl:apply-templates /></div>
</xsl:template>
<xsl:template match="literal_block/br">
@@ -143,7 +143,7 @@
<xsl:template match="paragraph">
- <p><xsl:apply-templates /></p>
+ <p class="{@classes}"><xsl:apply-templates /></p>
</xsl:template>
<xsl:template match="substitution_definition" />
@@ -155,14 +155,14 @@
reStructuredText attribution (the information after the
double-hyphens). -->
<xsl:template match="block_quote">
- <blockquote>
+ <blockquote class="{@classes}">
<xsl:apply-templates/>
</blockquote>
<xsl:if test="./attribution">
- <div class="cite">
- <span class="cite_label">Source: </span>
- <cite><xsl:apply-templates select="attribution/*|attribution/text()" /></cite>
+ <div class="cite {@classes}">
+ <span class="cite_label {@classes}">Source: </span>
+ <cite class="{attribution/@classes}"><xsl:apply-templates select="attribution/*|attribution/text()" /></cite>
</div>
</xsl:if>
</xsl:template>
@@ -198,7 +198,7 @@
the footnote appeared. -->
<xsl:template match="footnote">
<xsl:element name="div">
- <xsl:attribute name="class">footnote</xsl:attribute>
+ <xsl:attribute name="class">footnote <xsl:value-of select="@classes"/></xsl:attribute>
<xsl:attribute name="id">
<xsl:text>footnote-</xsl:text>
<xsl:value-of select="@ids" />
@@ -227,16 +227,16 @@
<!-- Basic lists. -->
<xsl:template match="bullet_list">
- <ul><xsl:apply-templates /></ul>
+ <ul class="{@classes}"><xsl:apply-templates /></ul>
</xsl:template>
<xsl:template match="enumerated_list">
- <ol><xsl:apply-templates /></ol>
+ <ol class="{@classes}"><xsl:apply-templates /></ol>
</xsl:template>
<!-- Basic list items. -->
<xsl:template match="list_item">
- <li><xsl:apply-templates /></li>
+ <li class="{@classes}"><xsl:apply-templates /></li>
</xsl:template>
<!-- TODO Lists are currently stripped of their paragraph wrapping.
@@ -253,21 +253,21 @@
<!-- Definition lists. -->
<xsl:template match="definition_list">
- <dl><xsl:apply-templates /></dl>
+ <dl class="{@classes}"><xsl:apply-templates /></dl>
</xsl:template>
<xsl:template match="definition_list_item/term">
- <dt><xsl:apply-templates /></dt>
+ <dt class="{@classes}"><xsl:apply-templates /></dt>
</xsl:template>
<xsl:template match="definition_list_item/definition">
- <dd><xsl:apply-templates /></dd>
+ <dd class="{@classes}"><xsl:apply-templates /></dd>
</xsl:template>
<!-- Option lists. -->
<xsl:template match="option_list">
- <table class="option-list" cellpadding="0" cellspacing="0">
+ <table class="option-list {@classes}" cellpadding="0" cellspacing="0">
<tr>
<th>Option</th>
<th>Description</th>