This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-astro/public/feeds/feed.xsl

74 lines
No EOL
2.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>
<xsl:value-of select="/rss/channel/title" />
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="color-scheme" content="light dark" />
<link rel="stylesheet" href="/assets/styles/index.css" type="text/css" />
</head>
<body class="feed">
<div class="main-wrapper">
<main>
<section class="main-title">
<h1>
<a href="/feeds" tabindex="0">Cory Dransfeldt</a>
</h1>
</section>
<div class="default-wrapper">
<h2><xsl:value-of select="/rss/channel/title" /></h2>
<article class="intro">
<p>
<xsl:value-of select="/rss/channel/description" />
</p>
<p>
<strong class="highlight-text">Subscribe by adding the URL below to your feed reader
of choice.</strong>
</p>
<p>
<pre class="small">
<code><xsl:value-of select="rss/channel/atom:link/@href"/></code>
</pre>
</p>
<p>
<a href="/feeds">View more of the feeds from my site.</a>
</p>
</article>
<section>
<xsl:for-each select="/rss/channel/item">
<article>
<time>Published: <xsl:value-of select="pubDate" /></time>
<h3>
<a>
<xsl:attribute name="href">
<xsl:value-of select="link" />
</xsl:attribute>
<xsl:value-of select="title" />
</a>
</h3>
<xsl:value-of select="description" disable-output-escaping="yes" />
<xsl:if test="enclosure">
<img class="image-banner" src="{enclosure/@url}" alt="{title}" />
</xsl:if>
</article>
</xsl:for-each>
</section>
</div>
</main>
<footer>
<p>Subscribe by adding <code>
<xsl:value-of select="rss/channel/atom:link/@href" />
</code> to your
feed reader of choice.</p>
</footer>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>