A new Riff-radio.org site with a static approach.

atom.xsl 1.7KB

1234567891011121314151617181920212223242526272829
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" version="1.0">
  3. <xsl:output method="xml"/>
  4. <xsl:template match="/">
  5. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  6. <head>
  7. <meta charset="UTF-8"/>
  8. <meta name="viewport" content="width=device-width"/>
  9. <title><xsl:value-of select="feed/title"/> (Atom feed)</title>
  10. <style><![CDATA[html{margin:0;padding:0;}body{color:hsl(180,1%,31%);font-family:Helvetica,Arial,sans-serif;font-size:17px;line-height:1.4;margin:5%;max-width:35rem;padding:0;}input{min-width:20rem;margin-left:.2rem;padding-left:.2rem;padding-right:.2rem;}ol{list-style-type:disc;padding-left:1rem;}h2{font-size:22px;font-weight:inherit;}]]></style>
  11. </head>
  12. <body>
  13. <h1><xsl:value-of select="feed/title"/> (Atom feed)</h1>
  14. <p>This is an Atom feed. To subscribe to it, copy its address and paste it when your feed reader asks for it. It will be updated periodically in your reader. New to feeds? <a href="https://duckduckgo.com/?q=how+to+get+started+with+rss+feeds" title="Search on the web to learn more">Learn more</a>.</p>
  15. <p>
  16. <label for="address">Atom feed address:</label>
  17. <input><xsl:attribute name="type">url</xsl:attribute><xsl:attribute name="id">address</xsl:attribute><xsl:attribute name="spellcheck">false</xsl:attribute><xsl:attribute name="value"><xsl:value-of select="feed/link[@rel='self']/@href"/></xsl:attribute></input>
  18. </p>
  19. <p>Preview of the feed’s current headlines:</p>
  20. <ol>
  21. <xsl:for-each select="feed/entry">
  22. <li><h2><a><xsl:attribute name="href"><xsl:value-of select="link[@rel='alternate']/@href"/></xsl:attribute><xsl:value-of select="title"/></a></h2></li>
  23. </xsl:for-each>
  24. </ol>
  25. </body>
  26. </html>
  27. </xsl:template>
  28. </xsl:stylesheet>