Mayx's Home Page https://mabbs.github.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

  1. {% if page.layout == "xslt" %}<?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xml" href="/feed.xslt.xml"?>
  3. <xsl:stylesheet
  4. version="3.0"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. xmlns:atom="http://www.w3.org/2005/Atom">
  7. <xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes" doctype-system="about:legacy-compat" />
  8. <xsl:template match="/">
  9. {{ content }}
  10. </xsl:template>
  11. <xsl:template match="atom:feed/atom:entry">
  12. <div class="item">
  13. <h2>
  14. <a>
  15. <xsl:attribute name="href">
  16. <xsl:value-of select="atom:link/@href"/>
  17. </xsl:attribute>
  18. <xsl:value-of select="atom:title"/>
  19. </a>
  20. </h2>
  21. <small class="gray">
  22. Published at <xsl:value-of select="substring(atom:published, 0, 11)" />
  23. </small>
  24. <p><xsl:value-of select="atom:summary"/></p>
  25. <hr />
  26. </div>
  27. </xsl:template>
  28. <xsl:template match="/rss/channel/item">
  29. <div class="item">
  30. <h2>
  31. <a>
  32. <xsl:attribute name="href">
  33. <xsl:value-of select="link"/>
  34. </xsl:attribute>
  35. <xsl:value-of select="title"/>
  36. </a>
  37. </h2>
  38. <small class="gray">
  39. Published at <xsl:value-of select="substring(pubDate, 0, 17)" />
  40. </small>
  41. <p><xsl:value-of select="description"/></p>
  42. <hr />
  43. </div>
  44. </xsl:template>
  45. </xsl:stylesheet>
  46. {% else %}<!DOCTYPE html>
  47. {{ content }}
  48. {% endif %}

Powered by TurnKey Linux.