rss-style.tx 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:atom="http://www.w3.org/2005/Atom">
  4. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  5. <xsl:template match="/">
  6. <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  7. <head>
  8. <title>
  9. RSS Feed |
  10. <xsl:value-of select="/atom:feed/atom:title"/>
  11. </title>
  12. <meta charset="utf-8"/>
  13. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  14. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  15. <link rel="stylesheet" href="/assets/styles.css"/>
  16. </head>
  17. <body>
  18. <main class="layout-content">
  19. <dk-alert-box type="info">
  20. <strong>This is an RSS feed</strong>. Subscribe by copying
  21. the URL from the address bar into your newsreader. Visit <a
  22. href="https://aboutfeeds.com">About Feeds
  23. </a> to learn more and get started. It’s free.
  24. </dk-alert-box>
  25. <div class="py-7">
  26. <h1 class="flex items-start">
  27. <!-- https://commons.wikimedia.org/wiki/File:Feed-icon.svg -->
  28. <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
  29. class="mr-5"
  30. style="flex-shrink: 0; width: 1em; height: 1em;"
  31. viewBox="0 0 256 256">
  32. <defs>
  33. <linearGradient x1="0.085" y1="0.085" x2="0.915" y2="0.915"
  34. id="RSSg">
  35. <stop offset="0.0" stop-color="#E3702D"/>
  36. <stop offset="0.1071" stop-color="#EA7D31"/>
  37. <stop offset="0.3503" stop-color="#F69537"/>
  38. <stop offset="0.5" stop-color="#FB9E3A"/>
  39. <stop offset="0.7016" stop-color="#EA7C31"/>
  40. <stop offset="0.8866" stop-color="#DE642B"/>
  41. <stop offset="1.0" stop-color="#D95B29"/>
  42. </linearGradient>
  43. </defs>
  44. <rect width="256" height="256" rx="55" ry="55" x="0" y="0"
  45. fill="#CC5D15"/>
  46. <rect width="246" height="246" rx="50" ry="50" x="5" y="5"
  47. fill="#F49C52"/>
  48. <rect width="236" height="236" rx="47" ry="47" x="10" y="10"
  49. fill="url(#RSSg)"/>
  50. <circle cx="68" cy="189" r="24" fill="#FFF"/>
  51. <path
  52. d="M160 213h-34a82 82 0 0 0 -82 -82v-34a116 116 0 0 1 116 116z"
  53. fill="#FFF"/>
  54. <path
  55. d="M184 213A140 140 0 0 0 44 73 V 38a175 175 0 0 1 175 175z"
  56. fill="#FFF"/>
  57. </svg>
  58. RSS Feed Preview
  59. </h1>
  60. <h2><: $domain :></h2>
  61. <p>
  62. <xsl:value-of select="/atom:feed/atom:subtitle"/>
  63. </p>
  64. <a>
  65. <xsl:attribute name="href">
  66. <xsl:value-of select="/atom:feed/atom:link[2]/@href"/>
  67. </xsl:attribute>
  68. Visit Website &#x2192;
  69. </a>
  70. <h2>Recent blog posts</h2>
  71. <xsl:for-each select="/atom:feed/atom:entry">
  72. <div class="pb-7">
  73. <div class="text-4 font-bold">
  74. <a>
  75. <xsl:attribute name="href">
  76. <xsl:value-of select="atom:link/@href"/>
  77. </xsl:attribute>
  78. <xsl:value-of select="atom:title"/>
  79. </a>
  80. </div>
  81. <div class="text-2 text-offset">
  82. Published on
  83. <xsl:value-of select="substring(atom:published, 0, 11)" />
  84. </div>
  85. </div>
  86. </xsl:for-each>
  87. </div>
  88. </main>
  89. </body>
  90. </html>
  91. </xsl:template>
  92. </xsl:stylesheet>