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-eleventy/src/assets/styles/feed.liquid

81 lines
No EOL
3.3 KiB
Text

---
permalink: /assets/styles/feed.xsl
---
<?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" /> / {{ globals.site_name }}
</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" />
<meta name="theme-color" content="{{ globals.theme_color }}" />
<meta name="fediverse:creator" content="{{ globals.mastodon }}" />
<meta name="generator" content="Eleventy" />
<meta name="robots" content="noai, noimageai" />
<link rel="preload" href="/assets/fonts/ml.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="preload" href="/assets/fonts/mlb.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
<link rel="stylesheet" href="/assets/styles/index.css?v={% appVersion %}" type="text/css" />
</head>
<body class="feed">
<div class="main-wrapper">
<main>
{% render "header.liquid", globals:globals, page:page, nav:nav %}
<div class="default-wrapper">
<h2 class="page-title">
<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>
{% render "footer.liquid",
page:page,
nav:nav,
updated:updated,
pageUpdated:page.updated
%}
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>