Improve XML feed styling

This commit is contained in:
N-Upchurch 2023-08-21 18:27:53 -05:00
parent 0e991b1dee
commit 25529178d0

View File

@ -13,23 +13,49 @@
<link rel="stylesheet" href="../css/webfonts/webfonts.css"/>
</head>
<body>
<p>
This is an RSS feed. Subscribe by copying the URL from the address bar into your newsreader. Don't have a newsreader? Visit
<a href="https://aboutfeeds.com">About Feeds</a>
to learn more and get started. Its free.
</p>
<h1>RSS Feed Preview</h1>
<h2>Recent blog posts</h2>
<xsl:for-each select="/atom:feed/atom:entry">
<h3><a>
<xsl:attribute name="href">
<xsl:value-of select="atom:link/@href"/>
</xsl:attribute>
<xsl:value-of select="atom:title"/>
</a></h3>
Last updated:
<xsl:value-of select="substring(atom:updated, 0, 11)" />
</xsl:for-each>
<main>
<p>
<i>This is an RSS feed. Subscribe by copying the URL from the address bar into your newsreader. Don't have a newsreader? <a href="../about-feeds/">Learn more and get started</a>. Its free.</i>
</p><hr />
<h1>RSS Feed Preview</h1>
<p class="nodropcap page-block">Here's the sort of thing you'll see in your newsreader when you subscribe. Done here? <a href="../">Go back to nathanupchurch.com</a></p>
<h2>Latest posts</h2>
<xsl:for-each select="/atom:feed/atom:entry">
<article class="postlist-item">
<a class="postlist-link">
<xsl:attribute name="href">
<xsl:value-of select="atom:link/@href"/>
</xsl:attribute>
<div class="post-image-container">
<img class="post-image">
<xsl:attribute name="src">
<xsl:value-of select="atom:image/atom:url" />
</xsl:attribute>
</img>
</div>
</a>
<div class="post-copy">
<a class="postlist-link">
<xsl:attribute name="href">
<xsl:value-of select="atom:link/@href"/>
</xsl:attribute>
<h3>
<xsl:value-of select="atom:title"/>
</h3>
</a>
<time class="postlist-date">
<xsl:attribute name="datetime">
<xsl:value-of select="substring(atom:updated, 0, 11)" />
</xsl:attribute>
<xsl:value-of select="substring(atom:updated, 0, 11)" />
</time>
<p>
<xsl:value-of select="atom:description" />
</p>
</div>
</article>
</xsl:for-each>
</main>
</body>
</html>
</xsl:template>