Expose rights and license information

This commit is contained in:
Sam Ruby 2007-11-11 15:24:37 -05:00
parent 7e1542bf8e
commit 236b3c2fc8
2 changed files with 47 additions and 5 deletions

View File

@ -38,6 +38,10 @@ a.rising {
font-weight: bold;
}
a[rel~='license'] {
text-decoration: none;
}
body > h1 {
font-size: x-large;
text-transform: uppercase;

View File

@ -220,15 +220,53 @@
<!-- entry footer -->
<xsl:text>&#10;</xsl:text>
<div class="permalink">
<xsl:if test="atom:link[@rel='license'] or
atom:source/atom:link[@rel='license'] or
atom:rights or atom:source/atom:rights">
<a>
<xsl:if test="atom:source/atom:link[@rel='license']/@href">
<xsl:attribute name="rel">license</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="atom:source/atom:link[@rel='license']/@href"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="atom:link[@rel='license']/@href">
<xsl:attribute name="rel">license</xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="atom:link[@rel='license']/@href"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="atom:source/atom:rights">
<xsl:attribute name="title">
<xsl:value-of select="atom:source/atom:rights"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="atom:rights">
<xsl:attribute name="title">
<xsl:value-of select="atom:rights"/>
</xsl:attribute>
</xsl:if>
<xsl:text>&#169;</xsl:text>
</a>
<xsl:text> </xsl:text>
</xsl:if>
<a href="{atom:link[@rel='alternate']/@href}">
<xsl:choose>
<xsl:when test="atom:author/atom:name">
<xsl:if test="not(atom:link[@rel='license'] or
atom:source/atom:link[@rel='license'] or
atom:rights or atom:source/atom:rights)">
<xsl:text>by </xsl:text>
</xsl:if>
<xsl:value-of select="atom:author/atom:name"/>
<xsl:text> at </xsl:text>
</xsl:when>
<xsl:when test="atom:source/atom:author/atom:name">
<xsl:if test="not(atom:link[@rel='license'] or
atom:source/atom:link[@rel='license'] or
atom:rights or atom:source/atom:rights)">
<xsl:text>by </xsl:text>
</xsl:if>
<xsl:value-of select="atom:source/atom:author/atom:name"/>
<xsl:text> at </xsl:text>
</xsl:when>