added new rules for displaying article metadata in xsl and css
svn path=/trunk/; revision=17282
This commit is contained in:
parent
f8fe9bfb0c
commit
2e5eacff01
@ -59,6 +59,37 @@
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Modify H1 -->
|
||||
<xsl:template match="h1">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="node()"/>
|
||||
</xsl:copy>
|
||||
|
||||
<!-- Apply article rules -->
|
||||
<xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name']/@content)">
|
||||
<xsl:element name="div">
|
||||
<xsl:attribute name="id">article-metadata</xsl:attribute>
|
||||
<xsl:element name="p">
|
||||
<span class="label"><xsl:apply-templates select="/buildinfo/textset/text[@id='author']/node()" />: </span>
|
||||
<xsl:choose>
|
||||
<xsl:when test="/buildinfo/document/head/meta[@name='author-link']">
|
||||
<xsl:variable name="author-link" select="/buildinfo/document/head/meta[@name='author-link']/@content" />
|
||||
<a href='{$author-link}'>
|
||||
<xsl:value-of select="/buildinfo/document/head/meta[@name='author-name']/@content" /> </a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="/buildinfo/document/head/meta[@name='author-name']/@content" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<span class="label"> <xsl:apply-templates select="/buildinfo/textset/text[@id='published']/node()" />: </span><xsl:value-of select="/buildinfo/document/head/meta[@name='publication-date']/@content" />
|
||||
</xsl:element>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<!-- End Apply article rules -->
|
||||
|
||||
</xsl:template>
|
||||
<!-- End modifications to H1 -->
|
||||
|
||||
<!-- HTML body -->
|
||||
<xsl:template match="body">
|
||||
|
@ -1190,16 +1190,23 @@ ul.overview {
|
||||
|
||||
/* Article pages */
|
||||
|
||||
#article-author, #article-author a {
|
||||
color:#202D79;
|
||||
#article-metadata {
|
||||
margin:0.5em 0 1.5em;
|
||||
}
|
||||
|
||||
#article-author a {
|
||||
margin:0.5em 0;
|
||||
text-decoration:underline;
|
||||
#article-metadata p {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
#article-date {
|
||||
margin:0.5em 0;
|
||||
color:#202D79;
|
||||
#article-metadata a {
|
||||
color:#323232;
|
||||
}
|
||||
|
||||
#article-metadata span.label {
|
||||
color: #202D79;
|
||||
padding-left:1em;
|
||||
}
|
||||
|
||||
#article-metadata span.label:first-child {
|
||||
padding-left:0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user