diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf index c3c51195..59698cff 100644 --- a/config/apache/standardebooks.org.conf +++ b/config/apache/standardebooks.org.conf @@ -280,12 +280,13 @@ Define webroot /standardebooks.org/web # Enable mod_authn_dbd DBDriver mysql DBDParams "dbname=se user=www-data" - - # Enable HTTP Basic auth for feeds + # HTTP Basic Auth configuration for: + # /patrons-circle/downloads + # /feeds + 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 - ErrorDocument 401 /feeds/401 # Credentials caching to prevent slamming the DB. socache must be ahead of 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 \ ) x where %s in (Email, Uuid) limit 1 \ " + + + # Specific config for /patrons-circle + + + # Disable HTTP Basic auth for the index and 401 pages + Require all granted + + + + ErrorDocument 401 /patrons-circle/downloads + + + + # Specific config for /feeds + + ErrorDocument 401 /feeds/401 # Disable HTTP Basic auth for the feed XSL stylesheet and the new releases feeds diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf index 1cb7e7af..690dd3a7 100644 --- a/config/apache/standardebooks.test.conf +++ b/config/apache/standardebooks.test.conf @@ -262,12 +262,13 @@ Define webroot /standardebooks.org/web # Enable mod_authn_dbd DBDriver mysql DBDParams "dbname=se user=www-data" - - # Enable HTTP Basic auth for feeds + # HTTP Basic Auth configuration for: + # /patrons-circle/downloads + # /feeds + 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 - ErrorDocument 401 /feeds/401 # Credentials caching to prevent slamming the DB. socache must be ahead of 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 \ ) x where %s in (Email, Uuid) limit 1 \ " + + + # Specific config for /patrons-circle + + + # Disable HTTP Basic auth for the index and 401 pages + Require all granted + + + + ErrorDocument 401 /patrons-circle/downloads + + + + # Specific config for /feeds + + ErrorDocument 401 /feeds/401 # Disable HTTP Basic auth for the feed XSL stylesheet and the new releases feeds diff --git a/templates/FeedHowTo.php b/templates/FeedHowTo.php index d2481581..53c825ab 100644 --- a/templates/FeedHowTo.php +++ b/templates/FeedHowTo.php @@ -1,6 +1,6 @@

Accessing the feeds

-

Our New Releases feeds are accessible by the public. Access to our other, more detailed feeds is available to our supporters in the Patrons Circle.

+

Our New Releases feeds are accessible by the public. Access to our other, more detailed feeds is available to our supporters in the Patrons Circle and corporate sponsors.

Individuals

    diff --git a/www/css/core.css b/www/css/core.css index 75119b56..2f802b9c 100644 --- a/www/css/core.css +++ b/www/css/core.css @@ -679,11 +679,11 @@ ul.message.error li:only-child{ margin-right: auto; } -.bulk-downloads i{ +ul.download-list i{ color: var(--sub-text); } -.bulk-downloads > ul{ +ul.download-list{ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4rem; @@ -693,16 +693,16 @@ ul.message.error li:only-child{ margin-right: auto; } -.bulk-downloads > ul > li{ +ul.download-list > li{ margin: 0; } -.bulk-downloads ul ul{ +ul.download-list ul{ list-style: none; margin: 0; } -.bulk-downloads > ul > li li:first-of-type{ +ul.download-list > li li:first-of-type{ margin-top: 1rem; } @@ -1873,6 +1873,12 @@ main.ebooks nav ol li.highlighted:nth-last-child(2)::after{ margin-top: 0; } +h1 + ul.message, +.has-hero picture + ul.message{ + margin-top: 0; + margin-bottom: 1rem; +} + .has-hero img{ border: 1px solid var(--border); border-radius: .25rem; diff --git a/www/feeds/401.php b/www/feeds/401.php index 776f69f6..2edd3949 100644 --- a/www/feeds/401.php +++ b/www/feeds/401.php @@ -3,6 +3,12 @@ require_once('Core.php'); use function Safe\preg_match; +$ex = null; + +if(isset($_SERVER['PHP_AUTH_USER'])){ + $ex = new Exceptions\InvalidPatronException(); +} + $type = ''; preg_match('/^\/feeds\/(opds|rss|atom)/ius', $_SERVER['REQUEST_URI'], $matches); @@ -25,20 +31,36 @@ if($type == 'atom'){ ?> 'The Standard Ebooks OPDS feed', 'highlight' => '', 'description' => 'Get access to the Standard Ebooks OPDS feed for use in ereading programs in scripting.']) ?>
    -
    +

    The Standard Ebooks OPDS Feed

    + +

    Standard Ebooks RSS Feeds

    + +

    Standard Ebooks Atom Feeds

    + +

    Standard Ebooks Ebook Feeds

    + + + + + A mug next to a pipe and a newspaper. + + +
      +
    • +

      getMessage()) ?>

      +
    • +
    + +

    OPDS feeds are designed for use with ereading apps on your phone or tablet, or with ereading systems like KOreader. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.

    They’re also perfect for scripting, or for libraries or other organizations who wish to download and process our catalog of ebooks.

    -

    Standard Ebooks RSS Feeds

    -

    RSS feeds are an alternative to Atom feeds. They contain less information than Atom feeds, but might be better supported by some RSS readers.

    +

    RSS feeds are the predecessors of Atom feeds. They contain less information than Atom feeds, but might be better supported by some news readers.

    -

    Standard Ebooks Atom Feeds

    -

    Atom feeds can be read by one of the many RSS clients available for download, like Thunderbird. They contain more information than regular RSS feeds. Most RSS clients can read both Atom and RSS feeds.

    +

    Atom feeds can be read by one of the many RSS clients available for download, like Thunderbird. They contain more information than regular RSS feeds. Most RSS clients can read both Atom and RSS feeds.

    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.

    - -

    Standard Ebooks Ebook Feeds

    diff --git a/www/feeds/index.php b/www/feeds/index.php index 708e2464..1ac6511c 100644 --- a/www/feeds/index.php +++ b/www/feeds/index.php @@ -1,22 +1,20 @@ 'Ebook Feeds', 'description' => 'A list of available feeds of Standard Ebooks ebooks.']) ?>
    -
    +

    Ebook Feeds

    -

    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.

    + + + + A mug next to a pipe and a newspaper. + +

    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.

    OPDS 1.2 feeds

    -

    OPDS feeds are designed for use with ereading apps on your phone or tablet, or with ereading systems like KOreader. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.

    +

    OPDS feeds, or “catalogs,” can be added to ereading apps on phones and tablets, or to ereading systems like KOreader. Add our OPDS feed to your ereading app to search, browse, and download from our entire catalog, directly in your ereader.

    They’re also perfect for scripting, or for libraries or other organizations who wish to download and process our catalog of ebooks.

    • @@ -24,72 +22,21 @@ require_once('Core.php');

      /feeds/opds

    -
    -

    OPDS how-tos and resources

    - -

    Atom 1.0 feeds

    -

    Atom feeds can be read by one of the many RSS clients available for download, like Thunderbird. They contain more information than regular RSS feeds. Most RSS clients can read both Atom and RSS feeds.

    +

    Atom feeds can be read by one of the many RSS clients available for download, like Thunderbird. They contain more information than regular RSS feeds. Most RSS clients can read both Atom and RSS feeds.

    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.

      -
    • -

      New releases (Public)

      -

      /feeds/atom/new-releases

      -

      The fifteen latest Standard Ebooks, most-recently-released first.

      -
    • -
    • -

      All ebooks

      -

      /feeds/atom/all

      -

      All Standard Ebooks, most-recently-released first.

      -
    • +
    • Standard Ebooks Atom feeds

    -
    -

    Ebooks by subject

    -
      - -
    • -

      -

      /feeds/atom/subjects/

      -
    • - -
    -

    RSS 2.0 feeds

    -

    RSS feeds are an alternative to Atom feeds. They contain less information than Atom feeds, but might be better supported by some RSS readers.

    +

    RSS feeds are the predecessors of Atom feeds. They contain less information than Atom feeds, but might be better supported by some news readers.

      -
    • -

      New releases (Public)

      -

      /feeds/rss/new-releases

      -

      The fifteen latest Standard Ebooks, most-recently-released first.

      -
    • -
    • -

      All ebooks

      -

      /feeds/rss/all

      -

      All Standard Ebooks, most-recently-released first.

      -
    • +
    • Standard Ebooks RSS feeds

    -
    -

    Ebooks by subject

    -
      - -
    • -

      -

      /feeds/rss/subjects/

      -
    • - -
    -
    diff --git a/www/images/new-york-daily-news.avif b/www/images/new-york-daily-news.avif new file mode 100644 index 00000000..f50ebf1a Binary files /dev/null and b/www/images/new-york-daily-news.avif differ diff --git a/www/images/new-york-daily-news.jpg b/www/images/new-york-daily-news.jpg new file mode 100644 index 00000000..7d1ba87d Binary files /dev/null and b/www/images/new-york-daily-news.jpg differ diff --git a/www/images/new-york-daily-news@2x.avif b/www/images/new-york-daily-news@2x.avif new file mode 100644 index 00000000..753f7f66 Binary files /dev/null and b/www/images/new-york-daily-news@2x.avif differ diff --git a/www/images/new-york-daily-news@2x.jpg b/www/images/new-york-daily-news@2x.jpg new file mode 100644 index 00000000..00d9f91b Binary files /dev/null and b/www/images/new-york-daily-news@2x.jpg differ diff --git a/www/patrons-circle/downloads/index.php b/www/patrons-circle/downloads/index.php index eb61c6e3..f909ef19 100644 --- a/www/patrons-circle/downloads/index.php +++ b/www/patrons-circle/downloads/index.php @@ -1,6 +1,12 @@ 'Download Ebooks by Month', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?> +?> 'Bulk Ebook Download', 'highlight' => '', 'description' => 'Download zip files containing all of the Standard Ebooks released in a given month.']) ?>
    -
    -

    Download Ebooks by Month

    +
    +

    Bulk Ebook Download

    - A pile of moldering books. + A gentleman in regency-era dress buys books from a bookseller. + +
      +
    • +

      getMessage()) ?>

      +
    • +
    +

    Patrons circle members can download zip files containing all of the ebooks that were released in a given month of Standard Ebooks history. You can join the Patrons Circle with a small donation in support of our continuing mission to create free, beautiful digital literature.

    These zip files contain each ebook in every format we offer, and are updated once daily with the latest versions of each ebook.

    -

    If you’re a Patrons Circle member, when prompted enter your email address and no password to download these files.

    -
      +

      If you’re a Patrons Circle member, when prompted enter your email address and leave the password blank to download these files.

      +