static/ronin/platform/overlay.xsl in ronin-0.2.4 vs static/ronin/platform/overlay.xsl in ronin-0.3.0

- old
+ new

@@ -3,180 +3,201 @@ <xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" /> <xsl:template match="/ronin-overlay"> <html> <head> - <title>Ronin Overlay :: <xsl:value-of select="/ronin-overlay/title/." /></title> + <title>Ronin Overlay :: <xsl:value-of select="title/." /></title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> <style type="text/css"> + html { + height: 100%; + } + body { - font-family: sans-serif; - font-size: 0.9em; + height: 100%; margin: 0; padding: 0; + font-family: sans-serif; + font-size: 1.0em; + background: url(http://ronin.rubyforge.org/images/diamond.png) repeat top left; + over-flow: auto; } - #overlay { - margin: 1em; - padding: 1em; - border: 20px solid black; + img { + border: none; } - #overlay p { - margin: 0.125em; - padding: 0; + #content { + margin: 1em 10em 1em 10em; + padding: 1em 1em 1em 1em; + border: 20px solid black; + background-color: white; } - #overlay strong { - margin-right: 1em; - } - - #overlay a { + #content a { color: black; font-weight: bold; text-decoration: none; } - #overlay a:hover { - color: #BD0000; + #content pre.shell { + margin: 0.5em 0 0.5em 0; + padding: 0.5em; + color: white; + background-color: black; + white-space: pre; + over-flow: auto; } - #overlay-title { + #content a:hover { + color: #BD0000; } - - #overlay-license { - } - - #overlay-url { - } - - #overlay-description { - } </style> <style type="text/css" media="print"> - #overlay { + #content { border: none; } - #overlay a { + #content a { font-weight: normal; } </style> </head> <body> - <table id="overlay"> - <xsl:apply-templates /> - </table> + <div id="page"> + <div id="banner"> + <a href="http://ronin.rubyforge.org/"> + <img id="logo" src="http://ronin.rubyforge.org/images/logo.png" /> + </a> + </div> + + <div id="content"> + <h2><xsl:value-of select="title/." /></h2> + <xsl:apply-templates select="description" /> + + <xsl:apply-templates select="dependencies" /> + + <xsl:apply-templates select="source" /> + + <xsl:apply-templates select="maintainers" /> + + <xsl:apply-templates select="license" /> + </div> + </div> </body> </html> </xsl:template> - <xsl:template match="/ronin-overlay/title"> - <tr id="overlay-title"> - <td valign="top"> - <p><strong>Title:</strong></p> - </td> - <td valign="top"> - <p><xsl:value-of select="." /></p> - </td> - </tr> + <xsl:template match="/ronin-overlay/description"> + <p><xsl:value-of select="." /></p> + + <xsl:if test="@href"> + <p> + <a> + <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute> + [ Continued ] + </a> + </p> + </xsl:if> </xsl:template> - <xsl:template match="/ronin-overlay/license"> - <tr id="overlay-license"> - <td valign="top"> - <p><strong>License:</strong></p> - </td> - <td valign="top"> - <p><xsl:value-of select="." /></p> - </td> - </tr> + <xsl:template match="/ronin-overlay/dependencies"> + <h2>Dependencies</h2> + + <p>Before installing this Overlay you will need to install some other things first.</p> + <xsl:if test="gem"> + <pre class="shell">$ <xsl:for-each select="gem"> <xsl:value-of select="." /></xsl:for-each></pre> + </xsl:if> </xsl:template> <xsl:template match="/ronin-overlay/source"> - <tr id="overlay-source"> - <td valign="top"> - <p><strong>Source:</strong></p> - </td> - <td valign="top"> - <p> - <a> - <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute> - <xsl:value-of select="." /> - </a> - </p> - </td> - </tr> - </xsl:template> + <h2>Install</h2> - <xsl:template match="/ronin-overlay/source-view"> - <tr id="overlay-source-view"> - <td valign="top"> - <p><strong>View Source:</strong></p> - </td> - <td valign="top"> - <p> - <a> - <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute> - <xsl:value-of select="." /> - </a> - </p> - </td> - </tr> + <p>To install this Overlay, simply run the following command:</p> + <pre class="shell">$ ronin install <xsl:value-of select="." /></pre> </xsl:template> - <xsl:template match="/ronin-overlay/website"> - <tr id="overlay-website"> - <td valign="top"> - <p><strong>Website:</strong></p> - </td> - <td valign="top"> - <p> - <a> - <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute> - <xsl:value-of select="." /> - </a> - </p> - </td> - </tr> - </xsl:template> - <xsl:template match="/ronin-overlay/maintainers"> - <tr id="overlay-maintainers"> - <td valign="top"> - <p><strong>Maintainers:</strong></p> - </td> - <td valign="top"> - <xsl:apply-templates /> - </td> - </tr> + <h2>Maintainers</h2> + + <ul> + <xsl:apply-templates select="maintainer" /> + </ul> </xsl:template> <xsl:template match="/ronin-overlay/maintainers/maintainer"> - <p class="maintainer"> + <li> <xsl:choose> <xsl:when test="email"> <a> <xsl:attribute name="href">mailto:<xsl:value-of select="email/." /></xsl:attribute> <xsl:value-of select="name/." /> </a> </xsl:when> <xsl:otherwise> - <strong><xsl:value-of select="name/." /></strong> + <xsl:value-of select="name/." /> </xsl:otherwise> </xsl:choose> - </p> + </li> </xsl:template> - <xsl:template match="/ronin-overlay/description"> - <tr id="overlay-description"> - <td valign="top"> - <p><strong>Description:</strong></p> - </td> - <td valign="top"> - <p><xsl:value-of select="." /></p> - </td> - </tr> + <xsl:template match="/ronin-overlay/license"> + <h2>License</h2> + + <p> + This Overlay is licensed under the + <a> + <xsl:attribute name="target">blank</xsl:attribute> + + <xsl:choose> + <xsl:when test="@href"> + <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'GPL-2'"> + <xsl:attribute name="href">http://www.gnu.org/licenses/gpl-2.0.html</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'GPL-3'"> + <xsl:attribute name="href">http://www.gnu.org/licenses/gpl-3.0.html</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'BSD'"> + <xsl:attribute name="href">http://www.opensource.org/licenses/bsd-license.php</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'MIT'"> + <xsl:attribute name="href">http://www.opensource.org/licenses/mit-license.html</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'CC-by'"> + <xsl:attribute name="href">http://creativecommons.org/licenses/by/3.0/</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'CC-by-nd'"> + <xsl:attribute name="href">http://creativecommons.org/licenses/by-nd/3.0/</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'CC-by-nc-nd'"> + <xsl:attribute name="href">http://creativecommons.org/licenses/by-nc-nd/3.0/</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'CC-by-nc'"> + <xsl:attribute name="href">http://creativecommons.org/licenses/by-nc/3.0/</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'CC-by-nc-sa'"> + <xsl:attribute name="href">http://creativecommons.org/licenses/by-nc-sa/3.0/</xsl:attribute> + </xsl:when> + + <xsl:when test=". = 'CC-sa'"> + <xsl:attribute name="href">http://creativecommons.org/licenses/sa/3.0/</xsl:attribute> + </xsl:when> + </xsl:choose> + + <xsl:value-of select="." /> + </a> license. + </p> </xsl:template> </xsl:stylesheet>