mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 01:52:02 -04:00
Tweak authorization for feeds/downloads, add hero to feeds page
This commit is contained in:
parent
8090f3f9f7
commit
d659fb9649
11 changed files with 117 additions and 93 deletions
|
@ -280,12 +280,13 @@ Define webroot /standardebooks.org/web
|
||||||
# Enable mod_authn_dbd
|
# Enable mod_authn_dbd
|
||||||
DBDriver mysql
|
DBDriver mysql
|
||||||
DBDParams "dbname=se user=www-data"
|
DBDParams "dbname=se user=www-data"
|
||||||
<DirectoryMatch "^${webroot}/www/feeds/(opds|rss|atom).*">
|
# HTTP Basic Auth configuration for:
|
||||||
# Enable HTTP Basic auth for feeds
|
# /patrons-circle/downloads
|
||||||
|
# /feeds
|
||||||
|
<DirectoryMatch "^${webroot}/www/(patrons-circle/downloads|feeds/(opds|rss|atom).*)">
|
||||||
AuthType Basic
|
AuthType Basic
|
||||||
AuthName "Enter your Patrons Circle email address or your API key, and a blank password."
|
AuthName "Enter your Patrons Circle email address and leave the password empty."
|
||||||
Require valid-user
|
Require valid-user
|
||||||
ErrorDocument 401 /feeds/401
|
|
||||||
|
|
||||||
# Credentials caching to prevent slamming the DB. socache must be ahead of dbd
|
# Credentials caching to prevent slamming the DB. socache must be ahead of dbd
|
||||||
AuthBasicProvider socache dbd
|
AuthBasicProvider socache dbd
|
||||||
|
@ -304,6 +305,23 @@ Define webroot /standardebooks.org/web
|
||||||
select Email, Uuid from FeedUsers fu inner join Users u using (UserId) where fu.Ended is null \
|
select Email, Uuid from FeedUsers fu inner join Users u using (UserId) where fu.Ended is null \
|
||||||
) x where %s in (Email, Uuid) limit 1 \
|
) x where %s in (Email, Uuid) limit 1 \
|
||||||
"
|
"
|
||||||
|
</DirectoryMatch>
|
||||||
|
|
||||||
|
# Specific config for /patrons-circle
|
||||||
|
<DirectoryMatch "^${webroot}/www/patrons-circle">
|
||||||
|
<FilesMatch "\.php$">
|
||||||
|
# Disable HTTP Basic auth for the index and 401 pages
|
||||||
|
Require all granted
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
<FilesMatch "\.zip$">
|
||||||
|
ErrorDocument 401 /patrons-circle/downloads
|
||||||
|
</FilesMatch>
|
||||||
|
</DirectoryMatch>
|
||||||
|
|
||||||
|
# Specific config for /feeds
|
||||||
|
<DirectoryMatch "^${webroot}/www/feeds/(opds|rss|atom).*">
|
||||||
|
ErrorDocument 401 /feeds/401
|
||||||
|
|
||||||
<FilesMatch "^(style\.php|new-releases\.xml|index\.php|index\.xml)$">
|
<FilesMatch "^(style\.php|new-releases\.xml|index\.php|index\.xml)$">
|
||||||
# Disable HTTP Basic auth for the feed XSL stylesheet and the new releases feeds
|
# Disable HTTP Basic auth for the feed XSL stylesheet and the new releases feeds
|
||||||
|
|
|
@ -262,12 +262,13 @@ Define webroot /standardebooks.org/web
|
||||||
# Enable mod_authn_dbd
|
# Enable mod_authn_dbd
|
||||||
DBDriver mysql
|
DBDriver mysql
|
||||||
DBDParams "dbname=se user=www-data"
|
DBDParams "dbname=se user=www-data"
|
||||||
<DirectoryMatch "^${webroot}/www/feeds/(opds|rss|atom).*">
|
# HTTP Basic Auth configuration for:
|
||||||
# Enable HTTP Basic auth for feeds
|
# /patrons-circle/downloads
|
||||||
|
# /feeds
|
||||||
|
<DirectoryMatch "^${webroot}/www/(patrons-circle/downloads|feeds/(opds|rss|atom).*)">
|
||||||
AuthType Basic
|
AuthType Basic
|
||||||
AuthName "Enter your Patrons Circle email address or your API key, and a blank password."
|
AuthName "Enter your Patrons Circle email address and leave the password empty."
|
||||||
Require valid-user
|
Require valid-user
|
||||||
ErrorDocument 401 /feeds/401
|
|
||||||
|
|
||||||
# Credentials caching to prevent slamming the DB. socache must be ahead of dbd
|
# Credentials caching to prevent slamming the DB. socache must be ahead of dbd
|
||||||
AuthBasicProvider socache dbd
|
AuthBasicProvider socache dbd
|
||||||
|
@ -286,6 +287,23 @@ Define webroot /standardebooks.org/web
|
||||||
select Email, Uuid from FeedUsers fu inner join Users u using (UserId) where fu.Ended is null \
|
select Email, Uuid from FeedUsers fu inner join Users u using (UserId) where fu.Ended is null \
|
||||||
) x where %s in (Email, Uuid) limit 1 \
|
) x where %s in (Email, Uuid) limit 1 \
|
||||||
"
|
"
|
||||||
|
</DirectoryMatch>
|
||||||
|
|
||||||
|
# Specific config for /patrons-circle
|
||||||
|
<DirectoryMatch "^${webroot}/www/patrons-circle">
|
||||||
|
<FilesMatch "\.php$">
|
||||||
|
# Disable HTTP Basic auth for the index and 401 pages
|
||||||
|
Require all granted
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
<FilesMatch "\.zip$">
|
||||||
|
ErrorDocument 401 /patrons-circle/downloads
|
||||||
|
</FilesMatch>
|
||||||
|
</DirectoryMatch>
|
||||||
|
|
||||||
|
# Specific config for /feeds
|
||||||
|
<DirectoryMatch "^${webroot}/www/feeds/(opds|rss|atom).*">
|
||||||
|
ErrorDocument 401 /feeds/401
|
||||||
|
|
||||||
<FilesMatch "^(style\.php|new-releases\.xml|index\.php|index\.xml)$">
|
<FilesMatch "^(style\.php|new-releases\.xml|index\.php|index\.xml)$">
|
||||||
# Disable HTTP Basic auth for the feed XSL stylesheet and the new releases feeds
|
# Disable HTTP Basic auth for the feed XSL stylesheet and the new releases feeds
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<section id="accessing-the-feeds">
|
<section id="accessing-the-feeds">
|
||||||
<h2>Accessing the feeds</h2>
|
<h2>Accessing the feeds</h2>
|
||||||
<p>Our New Releases feeds are accessible by the public. Access to our other, more detailed feeds is available to our supporters in the <a href="/donate#patrons-circle">Patrons Circle</a>.</p>
|
<p>Our New Releases feeds are accessible by the public. Access to our other, more detailed feeds is available to our supporters in the <a href="/donate#patrons-circle">Patrons Circle</a> and <a href="/donate#corporate-sponsors">corporate sponsors</a>.</p>
|
||||||
<section id="individuals">
|
<section id="individuals">
|
||||||
<h3>Individuals</h3>
|
<h3>Individuals</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -679,11 +679,11 @@ ul.message.error li:only-child{
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-downloads i{
|
ul.download-list i{
|
||||||
color: var(--sub-text);
|
color: var(--sub-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-downloads > ul{
|
ul.download-list{
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
gap: 4rem;
|
gap: 4rem;
|
||||||
|
@ -693,16 +693,16 @@ ul.message.error li:only-child{
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-downloads > ul > li{
|
ul.download-list > li{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-downloads ul ul{
|
ul.download-list ul{
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bulk-downloads > ul > li li:first-of-type{
|
ul.download-list > li li:first-of-type{
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1873,6 +1873,12 @@ main.ebooks nav ol li.highlighted:nth-last-child(2)::after{
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 + ul.message,
|
||||||
|
.has-hero picture + ul.message{
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.has-hero img{
|
.has-hero img{
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
|
|
|
@ -3,6 +3,12 @@ require_once('Core.php');
|
||||||
|
|
||||||
use function Safe\preg_match;
|
use function Safe\preg_match;
|
||||||
|
|
||||||
|
$ex = null;
|
||||||
|
|
||||||
|
if(isset($_SERVER['PHP_AUTH_USER'])){
|
||||||
|
$ex = new Exceptions\InvalidPatronException();
|
||||||
|
}
|
||||||
|
|
||||||
$type = '';
|
$type = '';
|
||||||
preg_match('/^\/feeds\/(opds|rss|atom)/ius', $_SERVER['REQUEST_URI'], $matches);
|
preg_match('/^\/feeds\/(opds|rss|atom)/ius', $_SERVER['REQUEST_URI'], $matches);
|
||||||
|
|
||||||
|
@ -25,20 +31,36 @@ if($type == 'atom'){
|
||||||
|
|
||||||
?><?= Template::Header(['title' => 'The Standard Ebooks OPDS feed', 'highlight' => '', 'description' => 'Get access to the Standard Ebooks OPDS feed for use in ereading programs in scripting.']) ?>
|
?><?= Template::Header(['title' => 'The Standard Ebooks OPDS feed', 'highlight' => '', 'description' => 'Get access to the Standard Ebooks OPDS feed for use in ereading programs in scripting.']) ?>
|
||||||
<main>
|
<main>
|
||||||
<section class="narrow">
|
<section class="narrow has-hero">
|
||||||
<? if($type == 'opds'){ ?>
|
<? if($type == 'opds'){ ?>
|
||||||
<h1>The Standard Ebooks OPDS Feed</h1>
|
<h1>The Standard Ebooks OPDS Feed</h1>
|
||||||
|
<? }elseif($type == 'rss'){ ?>
|
||||||
|
<h1>Standard Ebooks RSS Feeds</h1>
|
||||||
|
<? }elseif($type == 'atom'){ ?>
|
||||||
|
<h1>Standard Ebooks Atom Feeds</h1>
|
||||||
|
<? }else{ ?>
|
||||||
|
<h1>Standard Ebooks Ebook Feeds</h1>
|
||||||
|
<? } ?>
|
||||||
|
<picture>
|
||||||
|
<source srcset="/images/new-york-daily-news@2x.avif 2x, /images/new-york-daily-news.avif 1x" type="image/avif"/>
|
||||||
|
<source srcset="/images/new-york-daily-news@2x.jpg 2x, /images/new-york-daily-news.jpg 1x" type="image/jpg"/>
|
||||||
|
<img src="/images/new-york-daily-news@2x.jpg" alt="A mug next to a pipe and a newspaper."/>
|
||||||
|
</picture>
|
||||||
|
<? if($ex !== null){ ?>
|
||||||
|
<ul class="message error">
|
||||||
|
<li>
|
||||||
|
<p><?= Formatter::ToPlainText($ex->getMessage()) ?></p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<? } ?>
|
||||||
|
<? if($type == 'opds'){ ?>
|
||||||
<p><a href="https://en.wikipedia.org/wiki/Open_Publication_Distribution_System">OPDS feeds</a> are designed for use with ereading apps on your phone or tablet, or with ereading systems like <a href="http://koreader.rocks/">KOreader</a>. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.</p>
|
<p><a href="https://en.wikipedia.org/wiki/Open_Publication_Distribution_System">OPDS feeds</a> are designed for use with ereading apps on your phone or tablet, or with ereading systems like <a href="http://koreader.rocks/">KOreader</a>. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.</p>
|
||||||
<p>They’re also perfect for scripting, or for libraries or other organizations who wish to download and process our catalog of ebooks.</p>
|
<p>They’re also perfect for scripting, or for libraries or other organizations who wish to download and process our catalog of ebooks.</p>
|
||||||
<? }elseif($type == 'rss'){ ?>
|
<? }elseif($type == 'rss'){ ?>
|
||||||
<h1>Standard Ebooks RSS Feeds</h1>
|
<p>RSS feeds are the predecessors of <a href="/feeds/atom">Atom feeds</a>. They contain less information than Atom feeds, but might be better supported by some news readers.</p>
|
||||||
<p>RSS feeds are an alternative to <a href="/feeds/atom">Atom feeds</a>. They contain less information than Atom feeds, but might be better supported by some RSS readers.</p>
|
|
||||||
<? }elseif($type == 'atom'){ ?>
|
<? }elseif($type == 'atom'){ ?>
|
||||||
<h1>Standard Ebooks Atom Feeds</h1>
|
<p>Atom feeds can be read by one of the many <a href="https://en.wikipedia.org/wiki/Comparison_of_feed_aggregators">RSS clients</a> available for download, like <a href="https://www.thunderbird.net/en-US/">Thunderbird</a>. They contain more information than regular <a href="/feeds/rss">RSS feeds</a>. Most RSS clients can read both Atom and RSS feeds.</p>
|
||||||
<p>Atom feeds can be read by one of the many <a href="https://en.wikipedia.org/wiki/Comparison_of_feed_aggregators">RSS clients</a> available for download, like <a href="https://www.thunderbird.net/en-US/">Thunderbird</a>. They contain more information than regular RSS feeds. Most RSS clients can read both Atom and RSS feeds.</p>
|
|
||||||
<p>Note that some RSS readers may show these feeds ordered by when an ebook was last updated, even though the feeds are ordered by when an ebook was first released. You should be able to change the sort order in your RSS reader.</p>
|
<p>Note that some RSS readers may show these feeds ordered by when an ebook was last updated, even though the feeds are ordered by when an ebook was first released. You should be able to change the sort order in your RSS reader.</p>
|
||||||
<? }else{ ?>
|
|
||||||
<h1>Standard Ebooks Ebook Feeds</h1>
|
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<?= Template::FeedHowTo() ?>
|
<?= Template::FeedHowTo() ?>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -1,22 +1,20 @@
|
||||||
<?
|
<?
|
||||||
require_once('Core.php');
|
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 Atom/OPDS (whose de jure mime type is `application/atom+xml`).
|
|
||||||
|
|
||||||
?><?= Template::Header(['title' => 'Ebook Feeds', 'description' => 'A list of available feeds of Standard Ebooks ebooks.']) ?>
|
?><?= Template::Header(['title' => 'Ebook Feeds', 'description' => 'A list of available feeds of Standard Ebooks ebooks.']) ?>
|
||||||
<main>
|
<main>
|
||||||
<section class="narrow">
|
<section class="narrow has-hero">
|
||||||
<h1>Ebook Feeds</h1>
|
<h1>Ebook Feeds</h1>
|
||||||
<p>We offer several ebook feeds that you can use in your ereading app to browse, search, and download from our catalog. You can also add our feeds to your RSS client to get notified of new ebooks as they’re released.</p>
|
<picture>
|
||||||
|
<source srcset="/images/new-york-daily-news@2x.avif 2x, /images/new-york-daily-news.avif 1x" type="image/avif"/>
|
||||||
|
<source srcset="/images/new-york-daily-news@2x.jpg 2x, /images/new-york-daily-news.jpg 1x" type="image/jpg"/>
|
||||||
|
<img src="/images/new-york-daily-news@2x.jpg" alt="A mug next to a pipe and a newspaper."/>
|
||||||
|
</picture>
|
||||||
|
<p>We offer several ebook feeds that you can use in your ereading app to browse, search, and download from our catalog. You can also add our feeds to your RSS client to get notified of new ebooks as they’re released, or to browse our catalog from your news reader.</p>
|
||||||
<?= Template::FeedHowTo() ?>
|
<?= Template::FeedHowTo() ?>
|
||||||
<section id="opds-feeds">
|
<section id="opds-feeds">
|
||||||
<h2>OPDS 1.2 feeds</h2>
|
<h2>OPDS 1.2 feeds</h2>
|
||||||
<p><a href="https://en.wikipedia.org/wiki/Open_Publication_Distribution_System">OPDS feeds</a> are designed for use with ereading apps on your phone or tablet, or with ereading systems like <a href="http://koreader.rocks/">KOreader</a>. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.</p>
|
<p><a href="https://en.wikipedia.org/wiki/Open_Publication_Distribution_System">OPDS feeds</a>, or “catalogs,” can be added to ereading apps on phones and tablets, or to ereading systems like <a href="http://koreader.rocks/">KOreader</a>. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.</p>
|
||||||
<p>They’re also perfect for scripting, or for libraries or other organizations who wish to download and process our catalog of ebooks.</p>
|
<p>They’re also perfect for scripting, or for libraries or other organizations who wish to download and process our catalog of ebooks.</p>
|
||||||
<ul class="feed">
|
<ul class="feed">
|
||||||
<li>
|
<li>
|
||||||
|
@ -24,72 +22,21 @@ require_once('Core.php');
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/opds</p>
|
<p class="url"><?= SITE_URL ?>/feeds/opds</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<section id="opds-how-tos-and-resources">
|
|
||||||
<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>
|
</section>
|
||||||
<section id="atom-feeds">
|
<section id="atom-feeds">
|
||||||
<h2>Atom 1.0 feeds</h2>
|
<h2>Atom 1.0 feeds</h2>
|
||||||
<p>Atom feeds can be read by one of the many <a href="https://en.wikipedia.org/wiki/Comparison_of_feed_aggregators">RSS clients</a> available for download, like <a href="https://www.thunderbird.net/en-US/">Thunderbird</a>. They contain more information than regular RSS feeds. Most RSS clients can read both Atom and RSS feeds.</p>
|
<p>Atom feeds can be read by one of the many <a href="https://en.wikipedia.org/wiki/Comparison_of_feed_aggregators">RSS clients</a> available for download, like <a href="https://www.thunderbird.net/en-US/">Thunderbird</a>. They contain more information than regular <a href="/feeds/rss">RSS feeds</a>. Most RSS clients can read both Atom and RSS feeds.</p>
|
||||||
<p>Note that some RSS readers may show these feeds ordered by when an ebook was last updated, even though the feeds are ordered by when an ebook was first released. You should be able to change the sort order in your RSS reader.</p>
|
<p>Note that some RSS readers may show these feeds ordered by when an ebook was last updated, even though the feeds are ordered by when an ebook was first released. You should be able to change the sort order in your RSS reader.</p>
|
||||||
<ul class="feed">
|
<ul class="feed">
|
||||||
<li>
|
<li><p><a href="/feeds/atom">Standard Ebooks Atom feeds</a></p></li>
|
||||||
<p><a href="/feeds/atom/new-releases">New releases</a> (Public)</p>
|
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/atom/new-releases</p>
|
|
||||||
<p>The fifteen latest Standard Ebooks, most-recently-released first.</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<p><a href="/feeds/atom/all">All ebooks</a></p>
|
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/atom/all</p>
|
|
||||||
<p>All Standard Ebooks, most-recently-released first.</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<section id="atom-ebooks-by-subject">
|
|
||||||
<h3>Ebooks by subject</h3>
|
|
||||||
<ul class="feed">
|
|
||||||
<? foreach(SE_SUBJECTS as $subject){ ?>
|
|
||||||
<li>
|
|
||||||
<p><a href="/feeds/atom/subjects/<?= Formatter::MakeUrlSafe($subject) ?>"><?= Formatter::ToPlainText($subject) ?></a></p>
|
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/atom/subjects/<?= Formatter::MakeUrlSafe($subject) ?></p>
|
|
||||||
</li>
|
|
||||||
<? } ?>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
<section id="rss-feeds">
|
<section id="rss-feeds">
|
||||||
<h2>RSS 2.0 feeds</h2>
|
<h2>RSS 2.0 feeds</h2>
|
||||||
<p>RSS feeds are an alternative to Atom feeds. They contain less information than Atom feeds, but might be better supported by some RSS readers.</p>
|
<p>RSS feeds are the predecessors of <a href="/feeds/atom">Atom feeds</a>. They contain less information than Atom feeds, but might be better supported by some news readers.</p>
|
||||||
<ul class="feed">
|
<ul class="feed">
|
||||||
<li>
|
<li><p><a href="/feeds/rss">Standard Ebooks RSS feeds</a></p></li>
|
||||||
<p><a href="/feeds/rss/new-releases">New releases</a> (Public)</p>
|
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/rss/new-releases</p>
|
|
||||||
<p>The fifteen latest Standard Ebooks, most-recently-released first.</p>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<p><a href="/feeds/rss/all">All ebooks</a></p>
|
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/rss/all</p>
|
|
||||||
<p>All Standard Ebooks, most-recently-released first.</p>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
<section id="rss-ebooks-by-subject">
|
|
||||||
<h3>Ebooks by subject</h3>
|
|
||||||
<ul class="feed">
|
|
||||||
<? foreach(SE_SUBJECTS as $subject){ ?>
|
|
||||||
<li>
|
|
||||||
<p><a href="/feeds/rss/subjects/<?= Formatter::MakeUrlSafe($subject) ?>"><?= Formatter::ToPlainText($subject) ?></a></p>
|
|
||||||
<p class="url"><?= SITE_URL ?>/feeds/rss/subjects/<?= Formatter::MakeUrlSafe($subject) ?></p>
|
|
||||||
</li>
|
|
||||||
<? } ?>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
BIN
www/images/new-york-daily-news.avif
Normal file
BIN
www/images/new-york-daily-news.avif
Normal file
Binary file not shown.
BIN
www/images/new-york-daily-news.jpg
Normal file
BIN
www/images/new-york-daily-news.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
www/images/new-york-daily-news@2x.avif
Normal file
BIN
www/images/new-york-daily-news@2x.avif
Normal file
Binary file not shown.
BIN
www/images/new-york-daily-news@2x.jpg
Normal file
BIN
www/images/new-york-daily-news@2x.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
|
@ -1,6 +1,12 @@
|
||||||
<?
|
<?
|
||||||
require_once('Core.php');
|
require_once('Core.php');
|
||||||
|
|
||||||
|
$ex = null;
|
||||||
|
|
||||||
|
if(isset($_SERVER['PHP_AUTH_USER'])){
|
||||||
|
$ex = new Exceptions\InvalidPatronException();
|
||||||
|
}
|
||||||
|
|
||||||
$files = glob(WEB_ROOT . '/patrons-circle/downloads/*.zip');
|
$files = glob(WEB_ROOT . '/patrons-circle/downloads/*.zip');
|
||||||
rsort($files);
|
rsort($files);
|
||||||
|
|
||||||
|
@ -27,26 +33,33 @@ foreach($files as $file){
|
||||||
$years[$year][] = $obj;
|
$years[$year][] = $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
?><?= Template::Header(['title' => 'Download Ebooks by Month', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?>
|
?><?= Template::Header(['title' => 'Bulk Ebook Download', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?>
|
||||||
<main>
|
<main>
|
||||||
<section class="bulk-downloads has-hero">
|
<section class="narrow bulk-downloads has-hero">
|
||||||
<h1>Download Ebooks by Month</h1>
|
<h1>Bulk Ebook Download</h1>
|
||||||
<picture>
|
<picture>
|
||||||
<source srcset="/images/the-shop-of-the-bookdealer@2x.avif 2x, /images/the-shop-of-the-bookdealer.avif 1x" type="image/avif"/>
|
<source srcset="/images/the-shop-of-the-bookdealer@2x.avif 2x, /images/the-shop-of-the-bookdealer.avif 1x" type="image/avif"/>
|
||||||
<source srcset="/images/the-shop-of-the-bookdealer@2x.jpg 2x, /images/the-shop-of-the-bookdealer.jpg 1x" type="image/jpg"/>
|
<source srcset="/images/the-shop-of-the-bookdealer@2x.jpg 2x, /images/the-shop-of-the-bookdealer.jpg 1x" type="image/jpg"/>
|
||||||
<img src="/images/the-shop-of-the-bookdealer@2x.jpg" alt="A pile of moldering books."/>
|
<img src="/images/the-shop-of-the-bookdealer@2x.jpg" alt="A gentleman in regency-era dress buys books from a bookseller."/>
|
||||||
</picture>
|
</picture>
|
||||||
|
<? if($ex !== null){ ?>
|
||||||
|
<ul class="message error">
|
||||||
|
<li>
|
||||||
|
<p><?= Formatter::ToPlainText($ex->getMessage()) ?></p>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<? } ?>
|
||||||
<p><a href="/about#patrons-circle">Patrons circle members</a> can download zip files containing all of the ebooks that were released in a given month of Standard Ebooks history. You can <a href="/donate#patrons-circle">join the Patrons Circle</a> with a small donation in support of our continuing mission to create free, beautiful digital literature.</p>
|
<p><a href="/about#patrons-circle">Patrons circle members</a> can download zip files containing all of the ebooks that were released in a given month of Standard Ebooks history. You can <a href="/donate#patrons-circle">join the Patrons Circle</a> with a small donation in support of our continuing mission to create free, beautiful digital literature.</p>
|
||||||
<p>These zip files contain each ebook in every format we offer, and are updated once daily with the latest versions of each ebook.</p>
|
<p>These zip files contain each ebook in every format we offer, and are updated once daily with the latest versions of each ebook.</p>
|
||||||
<p>If you’re a Patrons Circle member, when prompted enter your email address and no password to download these files.</p>
|
<p>If you’re a Patrons Circle member, when prompted enter your email address and leave the password blank to download these files.</p>
|
||||||
<ul>
|
<ul class="download-list">
|
||||||
<? foreach($years as $year => $items){ ?>
|
<? foreach($years as $year => $items){ ?>
|
||||||
<li>
|
<li>
|
||||||
<section>
|
<section>
|
||||||
<h2><?= Formatter::ToPlainText($year) ?></h2>
|
<h2><?= Formatter::ToPlainText($year) ?></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<? foreach($items as $item){ ?>
|
<? foreach($items as $item){ ?>
|
||||||
<li><p><a href="<?= Formatter::ToPlainText($item->Url) ?>"><?= Formatter::ToPlainText($item->Month) ?></a> <i>(Updated <?= Formatter::ToPlainText($obj->Updated) ?>)</i></p></li>
|
<li><p><a download="" href="<?= Formatter::ToPlainText($item->Url) ?>"><?= Formatter::ToPlainText($item->Month) ?></a> <i>(Updated <?= Formatter::ToPlainText($obj->Updated) ?>)</i></p></li>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue