Style OPML export
All checks were successful
Lint / lint (push) Successful in 20s
Sync gmem.ca / sync (push) Successful in 33s

This commit is contained in:
Gabriel Simmer 2024-03-22 12:26:36 +00:00
parent f27638bc30
commit 407eb085af
Signed by: arch
SSH key fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ
3 changed files with 47 additions and 0 deletions

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/rss.xsl" type="text/xsl"?>
<opml xmlns:frss="https://freshrss.org/opml" version="2.0">
<head>
<title>ArSS</title>

42
gmem.ca/rss.xsl Normal file
View file

@ -0,0 +1,42 @@
<?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>
RSS Feeds | <xsl:value-of select="opml/head/title"/>
</title>
<link rel="stylesheet" href="/styles.css"/>
</head>
<body>
<main>
<h1><xsl:value-of select="opml/head/title"/></h1>
<p>
Export of Arch's subscribed RSS feeds.
This is a valid OPML file! Just save and import it into your RSS reader
of choice.
</p>
<h2>Subscrptions</h2>
<xsl:for-each select="opml/body/outline">
<div class="rss-group">
<h3><xsl:value-of select="@text"/></h3>
<xsl:for-each select="outline">
<p>
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="@htmlUrl"/>
</xsl:attribute>
<xsl:value-of select="@text"/>
</a>
</p>
</xsl:for-each>
</div>
</xsl:for-each>
</main>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View file

@ -97,3 +97,7 @@ footer {
padding: 0.5em 10px;
}
}
.rss-group {
margin: 10px 0;
}