mirror of
https://github.com/standardebooks/web.git
synced 2025-07-19 12:54:48 -04:00
Further refinment to OPDS/RSS generation and also add Atom feeds
This commit is contained in:
parent
d75d847004
commit
f9fd6c8a02
23 changed files with 733 additions and 859 deletions
|
@ -5,23 +5,37 @@ require_once('Core.php');
|
|||
header('Content-Type: text/xsl');
|
||||
print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
|
||||
?>
|
||||
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
|
||||
<xsl:output method="html" html-version="5.0" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat"/> <? /* doctype-system outputs the HTML5 doctype */ ?>
|
||||
<xsl:template match="/">
|
||||
<?= Template::Header(['xmlDeclaration' => false]) ?>
|
||||
<main>
|
||||
<main class="opds">
|
||||
<h1><xsl:value-of select="substring-after(/rss/channel/title, 'Standard Ebooks - ')"/></h1>
|
||||
<p><xsl:value-of select="/rss/channel/description"/></p>
|
||||
<p>This page is an RSS feed. The URL in your browser’s address bar (<a class="url"><xsl:attribute name="href"><xsl:value-of select="/rss/channel/atom:link/@href"/></xsl:attribute><xsl:value-of select="/rss/channel/atom:link/@href"/></a>) can be used in any RSS reader.</p>
|
||||
<ol class="rss">
|
||||
<p>This page is an RSS 2.0 feed. The URL in your browser’s address bar (<a class="url"><xsl:attribute name="href"><xsl:value-of select="/rss/channel/atom:link/@href"/></xsl:attribute><xsl:value-of select="/rss/channel/atom:link/@href"/></a>) can be used in any RSS reader.</p>
|
||||
<ol class="ebooks-list list rss">
|
||||
<xsl:for-each select="/rss/channel/item">
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="link"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="title"/>
|
||||
</a>
|
||||
<div class="thumbnail-container">
|
||||
<a tabindex="-1">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="link"/>
|
||||
</xsl:attribute>
|
||||
<img alt="" width="224" height="335">
|
||||
<xsl:attribute name="src">
|
||||
<xsl:value-of select="media:thumbnail/@url"/>
|
||||
</xsl:attribute>
|
||||
</img>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="link"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="title"/>
|
||||
</a>
|
||||
</p>
|
||||
<ul class="tags">
|
||||
<xsl:for-each select="category">
|
||||
<li>
|
||||
|
@ -29,9 +43,11 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n")
|
|||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<p>
|
||||
<xsl:value-of select="description"/>
|
||||
</p>
|
||||
<div class="details">
|
||||
<p>
|
||||
<xsl:value-of select="description"/>
|
||||
</p>
|
||||
</div>
|
||||
<xsl:if test="enclosure">
|
||||
<p class="download">Read</p>
|
||||
<ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue