Create new 'feeds' page to merge OPDS/RSS pages

This commit is contained in:
Alex Cabal 2022-06-20 11:45:10 -05:00
parent 37830e173f
commit 93771ab1bc
4 changed files with 60 additions and 26 deletions

View file

@ -20,10 +20,7 @@
<a href="https://github.com/standardebooks">GitHub</a>
</li>
<li>
<a href="/opds">OPDS</a>
</li>
<li>
<a href="/rss">RSS</a>
<a href="/feeds">Ebook Feeds</a>
</li>
</ul>
<p>Content produced by or for Standard Ebooks L<sup>3</sup>C is dedicated to the <a href="https://en.wikipedia.org/wiki/Public_domain">public domain</a> via the <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 Universal Public Domain Dedication</a>.</p>

View file

@ -2475,6 +2475,14 @@ aside button.close:active{
transform: skewX(45deg) scale(1.05);
}
ul.feed p{
margin: 0;
}
ul.feed p:last-child{
font-style: italic;
}
@media (hover: none) and (pointer: coarse){ /* target ipads and smartphones without a mouse */
/* For iPad, unset the height so it matches the other elements */
select[multiple]{

51
www/feeds/index.php Normal file
View file

@ -0,0 +1,51 @@
<?
require_once('Core.php');
// A note on mime types:
// `application/rss+xml` is the de jure mime type for RSS feeds.
// But, serving that mime type doesn't display the feed in a browser; rather, it downloads it as an attachment.
// `text/xml` is the de facto RSS mime type, used by most popular feeds and recognized by all RSS readers.
// It also displays the feed in a browser so we can style it with XSLT.
// This is the same for OPDS (whose de jure mime type is `application/atom+xml`).
?><?= Template::Header(['description' => 'A list of available feeds of Standard Ebooks ebooks.']) ?>
<main>
<article>
<h1>Ebook Feeds</h1>
<p>We offers several feeds that you can use to get notified about new ebooks, or to browse and download from our catalog directly in your ereader.</p>
<section id="rss-feeds">
<h2>RSS feeds</h2>
<p>Currently theres only one RSS feed available.</p>
<ul class="feed">
<li>
<p><a href="/rss/new-releases">New releases</a> (RSS 2.0)</p>
<p><?= SITE_URL ?>/rss/new-releases</p>
<p>A list of the thirty latest Standard Ebooks ebook releases, most-recently-released first.</p>
</li>
</ul>
</section>
<section id="opds-feeds">
<h2>OPDS feeds</h2>
<p><a href="https://en.wikipedia.org/wiki/Open_Publication_Distribution_System">OPDS feeds</a> are designed for use with ereading systems like <a href="http://koreader.rocks/">KOreader</a> or <a href="https://calibre-ebook.com">Calibre</a>, or with ereaders like <a href="https://johnfactotum.github.io/foliate/">Foliate</a>. They allow you to search, browse, and download from our catalog, directly in your ereader.</p>
<ul class="feed">
<li>
<p><a href="/opds">The Standard Ebooks OPDS feed</a> (OPDS 1.1)</p>
<p><?= SITE_URL ?>/opds</p>
<p>The main OPDS feed to use with ereading systems that support OPDS.</p>
</li>
</ul>
<section>
<h3>OPDS how-tos and resources</h3>
<ul>
<li>
<p><a href="https://github.com/koreader/koreader/wiki/OPDS-support">Using OPDS with KOreader</a></p>
</li>
<li>
<p><a href="https://github.com/steinarb/opds-reader">OPDS Reader</a>, a plugin that adds OPDS support to Calibre</p>
</li>
</ul>
</section>
</section>
</article>
</main>
<?= Template::Footer() ?>

View file

@ -1,22 +0,0 @@
<?
require_once('Core.php');
?><?= Template::Header(['description' => 'A list of available RSS feeds of Standard Ebooks ebooks.']) ?>
<main>
<article>
<h1>RSS Feeds</h1>
<p>Currently there is only one RSS feed available:</p>
<ul>
<li>
<p><a href="/rss/new-releases">New releases</a>: A list of the 30 latest Standard Ebooks ebook releases, most-recently-released first.</p>
</li>
</ul>
<p>You may also be interested in our OPDS feed, which is designed for use with ebook libraries like Calibre:</p>
<ul>
<li>
<p><a href="/opds">The Standard Ebooks OPDS feed</a></p>
</li>
</ul>
</article>
</main>
<?= Template::Footer() ?>