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.

46 lines
1.4 KiB

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

Powered by TurnKey Linux.