mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 14:50:39 -04:00
Add donation drive scaffolding
This commit is contained in:
parent
60585024b1
commit
bbe89b0baf
21 changed files with 472 additions and 85 deletions
|
@ -28,3 +28,4 @@ parameters:
|
||||||
dynamicConstantNames:
|
dynamicConstantNames:
|
||||||
- DONATION_HOLIDAY_ALERT_ON
|
- DONATION_HOLIDAY_ALERT_ON
|
||||||
- DONATION_ALERT_ON
|
- DONATION_ALERT_ON
|
||||||
|
- DONATION_DRIVE_ON
|
||||||
|
|
|
@ -44,7 +44,8 @@ const AVERAGE_READING_WORDS_PER_MINUTE = 275;
|
||||||
define('PD_YEAR', intval(gmdate('Y')) - 96);
|
define('PD_YEAR', intval(gmdate('Y')) - 96);
|
||||||
|
|
||||||
define('DONATION_HOLIDAY_ALERT_ON', time() > strtotime('November 15, ' . gmdate('Y')) || time() < strtotime('January 7, ' . gmdate('Y')));
|
define('DONATION_HOLIDAY_ALERT_ON', time() > strtotime('November 15, ' . gmdate('Y')) || time() < strtotime('January 7, ' . gmdate('Y')));
|
||||||
define('DONATION_ALERT_ON', rand(1, 4) == 2);
|
define('DONATION_ALERT_ON', DONATION_HOLIDAY_ALERT_ON || rand(1, 4) == 2);
|
||||||
|
define('DONATION_DRIVE_ON', false);
|
||||||
|
|
||||||
// No trailing slash on any of the below constants.
|
// No trailing slash on any of the below constants.
|
||||||
const SITE_URL = 'https://standardebooks.org';
|
const SITE_URL = 'https://standardebooks.org';
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?
|
<?
|
||||||
class HttpInput{
|
class HttpInput{
|
||||||
public static function GetString(string $variable, bool $allowEmptyString = true, string $default = null): ?string{
|
public static function Str(int $type, string $variable, bool $allowEmptyString = true, string $default = null): ?string{
|
||||||
$var = self::GetHttpVar($variable, HTTP_VAR_STR, GET, $default);
|
$var = self::GetHttpVar($variable, HTTP_VAR_STR, $type, $default);
|
||||||
|
|
||||||
if(is_array($var)){
|
if(is_array($var)){
|
||||||
return $default;
|
return $default;
|
||||||
|
@ -14,16 +14,16 @@ class HttpInput{
|
||||||
return $var;
|
return $var;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetInt(string $variable, int $default = null): ?int{
|
public static function Int(int $type, string $variable, int $default = null): ?int{
|
||||||
return self::GetHttpVar($variable, HTTP_VAR_INT, GET, $default);
|
return self::GetHttpVar($variable, HTTP_VAR_INT, $type, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetBool(string $variable, bool $default = null): ?bool{
|
public static function Bool(int $type, string $variable, bool $default = null): ?bool{
|
||||||
return self::GetHttpVar($variable, HTTP_VAR_BOOL, GET, $default);
|
return self::GetHttpVar($variable, HTTP_VAR_BOOL, $type, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetDec(string $variable, float $default = null): ?float{
|
public static function Dec(int $type, string $variable, float $default = null): ?float{
|
||||||
return self::GetHttpVar($variable, HTTP_VAR_DEC, GET, $default);
|
return self::GetHttpVar($variable, HTTP_VAR_DEC, $type, $default);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
<?
|
|
||||||
if(!isset($holidays)){
|
|
||||||
$holidays = false;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<aside class="donation">
|
<aside class="donation">
|
||||||
<? if($holidays){ ?>
|
|
||||||
<p>We rely on your support to help us keep producing beautiful, free, and unrestricted editions of literature for the digital age.</p>
|
<p>We rely on your support to help us keep producing beautiful, free, and unrestricted editions of literature for the digital age.</p>
|
||||||
<p>Will you <a href="/donate">support our efforts with a donation</a>?</p>
|
<p>Will you <a href="/donate">support our efforts with a donation</a>?</p>
|
||||||
<? }else{ ?>
|
|
||||||
<p>We rely on your support to help us keep producing beautiful, free, and unrestricted editions of literature for the digital age. Will you <a href="/donate">support our efforts with a donation</a>?</p>
|
|
||||||
<? } ?>
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|
61
templates/DonationProgress.php
Normal file
61
templates/DonationProgress.php
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
<?
|
||||||
|
|
||||||
|
// Hide the alert if the user has closed it
|
||||||
|
if($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$autoHide = $autoHide ?? true;
|
||||||
|
$current = 0;
|
||||||
|
$target = 50;
|
||||||
|
$stretchCurrent = 0;
|
||||||
|
$stretchTarget = 20;
|
||||||
|
$totalCurrent = $current;
|
||||||
|
$totalTarget = $target;
|
||||||
|
$deadline = 'Feb. 15';
|
||||||
|
|
||||||
|
$stretchOn = false;
|
||||||
|
if($stretchTarget > 0 && $current >= $target){
|
||||||
|
$stretchOn = true;
|
||||||
|
$totalCurrent = $current + $stretchCurrent;
|
||||||
|
$totalTarget = $target + $stretchTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<aside class="donation">
|
||||||
|
<? if($autoHide){ ?>
|
||||||
|
<form action="/settings" method="post">
|
||||||
|
<input type="hidden" name="hide-donation-alert" value="1" />
|
||||||
|
<button class="close">Close this alert</button>
|
||||||
|
</form>
|
||||||
|
<? } ?>
|
||||||
|
<? if(!$stretchOn){ ?>
|
||||||
|
<header>
|
||||||
|
<p>Help us reach <?= number_format($target) ?> patrons by <?= $deadline ?></p>
|
||||||
|
</header>
|
||||||
|
<? }else{ ?>
|
||||||
|
<header>
|
||||||
|
<p>Help us meet our stretch goal of <?= number_format($totalTarget) ?> patrons by <?= $deadline ?></p>
|
||||||
|
</header>
|
||||||
|
<? } ?>
|
||||||
|
<div class="progress">
|
||||||
|
<div aria-hidden="true">
|
||||||
|
<p class="start">0</p>
|
||||||
|
<p><?= number_format($totalCurrent) ?>/<?= number_format($totalTarget) ?></p>
|
||||||
|
<? if($stretchOn){ ?>
|
||||||
|
<p class="stretch-base"><?= number_format($target) ?></p>
|
||||||
|
<? } ?>
|
||||||
|
<p class="target"><?= number_format($totalTarget) ?></p>
|
||||||
|
</div>
|
||||||
|
<progress max="<?= $target ?>" value="<?= $current ?>"></progress>
|
||||||
|
<? if($stretchOn){ ?><progress class="stretch" max="<?= $stretchTarget ?>" value="<?= $stretchCurrent ?>"></progress><? } ?>
|
||||||
|
</div>
|
||||||
|
<? if($stretchOn){ ?>
|
||||||
|
<p>When we started this drive, we set a goal of <?= number_format($target) ?> Patrons Circle members by Feb. 15. Thanks to the incredible generosity of literature lovers from all walks of life, we hit that goal in just over a week!</p>
|
||||||
|
<p>Since there are still weeks left in our drive, we thought we’d challenge our readers to help us reach our stretch goal of 70 patrons, so that we can start the year off on a rock-solid financial footing. Will you help us with a donation, and support free and unrestricted digital literature?</p>
|
||||||
|
<? }else{ ?>
|
||||||
|
<p>We want to make Standard Ebooks a sustainable project that can support the huge amount of work it takes to maintain and operate. Welcoming <?= number_format($target) ?> new Patrons Circle members by <?= $deadline ?> will help put us on the stable financial footing we need to continue producing beautiful ebooks as we enter the new year.</p>
|
||||||
|
<p>Will you help us reach that goal, and support free and unrestricted digital literature?</p>
|
||||||
|
<? } ?>
|
||||||
|
<p><a class="button" href="/donate#patrons-circle">Join the patrons circle</a></p>
|
||||||
|
</aside>
|
|
@ -4,13 +4,9 @@ if($view == ''){
|
||||||
$view = VIEW_GRID;
|
$view = VIEW_GRID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($collection)){
|
$collection = $collection ?? null;
|
||||||
$collection = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!isset($ebooks)){
|
$ebooks = $ebooks ?? [];
|
||||||
$ebooks = [];
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<ol<? if($view == VIEW_LIST){ ?> class="list"<? } ?><? if($collection !== null){ ?> typeof="schema:BookSeries" about="<?= $collection->Url ?>"<? } ?>>
|
<ol<? if($view == VIEW_LIST){ ?> class="list"<? } ?><? if($collection !== null){ ?> typeof="schema:BookSeries" about="<?= $collection->Url ?>"<? } ?>>
|
||||||
<? if($collection !== null){ ?>
|
<? if($collection !== null){ ?>
|
||||||
|
|
|
@ -1,21 +1,9 @@
|
||||||
<?
|
<?
|
||||||
|
|
||||||
if(!isset($title)){
|
$title = $title ?? '';
|
||||||
$title = '';
|
$highlight = $highlight ?? '';
|
||||||
}
|
$description = $description ?? '';
|
||||||
|
$manual = $manual ?? false;
|
||||||
if(!isset($highlight)){
|
|
||||||
$highlight = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!isset($description)){
|
|
||||||
$description = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!isset($manual)){
|
|
||||||
$manual = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$colorScheme = $_COOKIE['color-scheme'] ?? 'auto';
|
$colorScheme = $_COOKIE['color-scheme'] ?? 'auto';
|
||||||
|
|
||||||
header('content-type: application/xhtml+xml');
|
header('content-type: application/xhtml+xml');
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!isset($isCrawlable)){
|
$isCrawlable = $isCrawlable ?? false;
|
||||||
$isCrawlable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
|
print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -4,6 +4,9 @@ require_once('Core.php');
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article>
|
||||||
<h1>About Standard Ebooks</h1>
|
<h1>About Standard Ebooks</h1>
|
||||||
|
<? if(DONATION_DRIVE_ON){ ?>
|
||||||
|
<?= Template::DonationProgress() ?>
|
||||||
|
<? } ?>
|
||||||
<p>Standard Ebooks is a volunteer-driven effort to produce a collection of high quality, carefully formatted, accessible, open source, and free public domain ebooks that meet or exceed the quality of commercially produced ebooks. The text and cover art in our ebooks is already believed to be in the U.S. public domain, and Standard Ebooks dedicates its own work to the public domain, thus releasing the entirety of each ebook file into the public domain. All the ebooks we produce are distributed free of cost and free of U.S. copyright restrictions.</p>
|
<p>Standard Ebooks is a volunteer-driven effort to produce a collection of high quality, carefully formatted, accessible, open source, and free public domain ebooks that meet or exceed the quality of commercially produced ebooks. The text and cover art in our ebooks is already believed to be in the U.S. public domain, and Standard Ebooks dedicates its own work to the public domain, thus releasing the entirety of each ebook file into the public domain. All the ebooks we produce are distributed free of cost and free of U.S. copyright restrictions.</p>
|
||||||
<p>Standard Ebooks is organized as a “<a href="https://en.wikipedia.org/wiki/Low-profit_limited_liability_company">low-profit L.L.C.</a>,” or “L<sup>3</sup>C,” a kind of legal entity that blends the charitable focus of a traditional not-for-profit with the ease of organization and maintenance of a regular L.L.C. Our only source of income is <a href="/donate">donations from readers like you</a>.</p>
|
<p>Standard Ebooks is organized as a “<a href="https://en.wikipedia.org/wiki/Low-profit_limited_liability_company">low-profit L.L.C.</a>,” or “L<sup>3</sup>C,” a kind of legal entity that blends the charitable focus of a traditional not-for-profit with the ease of organization and maintenance of a regular L.L.C. Our only source of income is <a href="/donate">donations from readers like you</a>.</p>
|
||||||
<section id="more-information">
|
<section id="more-information">
|
||||||
|
@ -101,6 +104,14 @@ require_once('Core.php');
|
||||||
<section id="corporate-sponsors">
|
<section id="corporate-sponsors">
|
||||||
<h3>Corporate Sponsors</h3>
|
<h3>Corporate Sponsors</h3>
|
||||||
<ol class="donors corporate">
|
<ol class="donors corporate">
|
||||||
|
<? if(false){ ?>
|
||||||
|
<li>
|
||||||
|
<a href="https://www.threadablebooks.com">
|
||||||
|
<img src="/images/masthead/sponsors/threadable.svg" alt="" />
|
||||||
|
<p>Threadable</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<? } ?>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://www.scribophile.com">
|
<a href="https://www.scribophile.com">
|
||||||
<img src="/images/masthead/sponsors/scribophile.svg" alt="" />
|
<img src="/images/masthead/sponsors/scribophile.svg" alt="" />
|
||||||
|
@ -111,11 +122,26 @@ require_once('Core.php');
|
||||||
</section>
|
</section>
|
||||||
<section id="patrons-circle">
|
<section id="patrons-circle">
|
||||||
<h3>Patrons Circle</h3>
|
<h3>Patrons Circle</h3>
|
||||||
<p><a href="/donate#patrons-circle">Join the Patrons Circle</a> to support free literature and to have a direct voice in shaping the future of the Standard Ebooks catalog.</p>
|
<p><a href="/donate#patrons-circle">Join the Patrons Circle</a> to support beautiful, free, and unrestricted digital literature, and to have a direct voice in shaping the future of the Standard Ebooks catalog.</p>
|
||||||
<ol class="donors patrons">
|
<ol class="donors patrons">
|
||||||
|
<li>
|
||||||
|
<p>Jon Allen</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>David Ballenger</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Michael Barrineau</p>
|
<p>Michael Barrineau</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Leland Blanton</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Keith Bradner</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Chris Brooks</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Derrick Burns</p>
|
<p>Derrick Burns</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -131,6 +157,21 @@ require_once('Core.php');
|
||||||
<li>
|
<li>
|
||||||
<p>Maxwell Collins-Shenfield</p>
|
<p>Maxwell Collins-Shenfield</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Liza Daly</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>In memory of Georgia Dawson</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Mahdi Dibaiee</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Jeffrey Dlouhy</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Christian Eager</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Alec Feather</p>
|
<p>Alec Feather</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -140,12 +181,21 @@ require_once('Core.php');
|
||||||
<li>
|
<li>
|
||||||
<p>Mac Foster</p>
|
<p>Mac Foster</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Michael Ham</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Carey Handfield</p>
|
<p>Carey Handfield</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Richard Healey</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Curtis Hendzell</p>
|
<p>Curtis Hendzell</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Stephen Heywood</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>David Howell</p>
|
<p>David Howell</p>
|
||||||
</li>
|
</li>
|
||||||
|
@ -155,20 +205,62 @@ require_once('Core.php');
|
||||||
<li>
|
<li>
|
||||||
<p>Jared Joslin</p>
|
<p>Jared Joslin</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Leonard Kirke</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Eric Korhonen</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Brendan LeFebvre</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Monica & Matthew Levine</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Lance Linimon</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>James Luke</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Patrick Greeley Mahoney</p>
|
<p>Patrick Greeley Mahoney</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Judith Moore</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Ozan Ocal</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Andrew Roach</p>
|
<p>Andrew Roach</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Rollin Salsbery</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Brandon Sowers</p>
|
<p>Brandon Sowers</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Mark Swenson</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Joshua Tompkins</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Ted van der Togt</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Nathan West</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Blake Westerdahl</p>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Patrick Weyer</p>
|
<p>Patrick Weyer</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Anonymous × 5</p>
|
<p>Anonymous × 19</p>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -4,6 +4,9 @@ require_once('Core.php');
|
||||||
<main>
|
<main>
|
||||||
<article>
|
<article>
|
||||||
<h1>Get Involved</h1>
|
<h1>Get Involved</h1>
|
||||||
|
<? if(DONATION_DRIVE_ON){ ?>
|
||||||
|
<?= Template::DonationProgress() ?>
|
||||||
|
<? } ?>
|
||||||
<section id="intro">
|
<section id="intro">
|
||||||
<h2>Help create ebooks that are a pleasure to read</h2>
|
<h2>Help create ebooks that are a pleasure to read</h2>
|
||||||
<p>Standard Ebooks is a volunteer-driven project, and there’s room for people of all skill levels to contribute.</p>
|
<p>Standard Ebooks is a volunteer-driven project, and there’s room for people of all skill levels to contribute.</p>
|
||||||
|
|
225
www/css/core.css
225
www/css/core.css
|
@ -592,7 +592,6 @@ h1 + section > h2:first-child{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
a.button,
|
a.button,
|
||||||
.ebooks nav > a,
|
.ebooks nav > a,
|
||||||
form button{
|
form button{
|
||||||
|
@ -612,7 +611,6 @@ form button{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
height: calc(1.4rem + 2rem + 2px);
|
|
||||||
hyphens: none;
|
hyphens: none;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
@ -1036,7 +1034,7 @@ section#description h2{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
section#description p:first-of-type{
|
section#description > p:first-of-type{
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1809,12 +1807,15 @@ main.ebooks nav ol li.highlighted:nth-last-child(2)::after{
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.masthead ol.donors{
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(10rem, max-content));
|
|
||||||
}
|
|
||||||
|
|
||||||
.masthead ol.donors.patrons{
|
.masthead ol.donors.patrons{
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
display: block;
|
||||||
|
columns: 3;
|
||||||
|
margin-left: -.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.masthead ol.donors.patrons li{
|
||||||
|
padding: .25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.masthead ol.donors.patrons li:last-child{
|
.masthead ol.donors.patrons li:last-child{
|
||||||
|
@ -1943,6 +1944,7 @@ article.ebook section aside.donation{
|
||||||
background-color: rgba(255, 255, 255, .5);
|
background-color: rgba(255, 255, 255, .5);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
hyphens: none;
|
hyphens: none;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside.donation::before{
|
aside.donation::before{
|
||||||
|
@ -1953,6 +1955,7 @@ aside.donation::before{
|
||||||
width: calc(1rem + 2px);
|
width: calc(1rem + 2px);
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
-webkit-clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
||||||
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
border-radius: 0 0 0 .25rem;
|
border-radius: 0 0 0 .25rem;
|
||||||
|
@ -1967,6 +1970,7 @@ aside.donation::after{
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
-webkit-clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
||||||
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
border-radius: 0 0 0 .25rem;
|
border-radius: 0 0 0 .25rem;
|
||||||
|
@ -2051,6 +2055,184 @@ abbr.acronym{
|
||||||
font-variant: all-small-caps;
|
font-variant: all-small-caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aside header{
|
||||||
|
font-family: "League Spartan", Arial, sans-serif;
|
||||||
|
font-style: normal;
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress{
|
||||||
|
position: relative;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress > div{
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.donation a.button{
|
||||||
|
display: inline-block;
|
||||||
|
white-space: normal;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.donation > p{
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress + p{
|
||||||
|
margin-top: 2rem;
|
||||||
|
hyphens: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress p{
|
||||||
|
font-size: 1rem;
|
||||||
|
font-family: "League Spartan", Arial, sans-serif;
|
||||||
|
left: 0;
|
||||||
|
background: rgba(0, 0, 0, .1);
|
||||||
|
font-style: normal;
|
||||||
|
border-radius: .25rem;
|
||||||
|
padding: .25rem .5rem;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
align-self: center;
|
||||||
|
justify-self: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-shadow: 1px 1px 0px rgba(0, 0, 0, .5);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress p.start{
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: 1rem;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
font-size: .75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress p.target{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 1rem;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
padding: 0;
|
||||||
|
font-size: .75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress > div{
|
||||||
|
/* Animate the div instead of the bar itself, because animating the bar triggers an
|
||||||
|
FF bug that causes infinite requsts to stripes.svg */
|
||||||
|
background: url('/images/stripes.svg') transparent;
|
||||||
|
background-position: 0 0;
|
||||||
|
animation: progress 2s linear infinite;
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress{
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
height: 3rem;
|
||||||
|
border: 1px solid var(--input-border);
|
||||||
|
border-radius: .25rem;
|
||||||
|
width: 100%;
|
||||||
|
background: var(--body-bg);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress::-webkit-progress-bar{
|
||||||
|
background: var(--body-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
progress::-webkit-progress-value{
|
||||||
|
background: var(--button);
|
||||||
|
box-shadow: 1px 0 1px rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
|
||||||
|
progress::-moz-progress-bar{
|
||||||
|
background: var(--button);
|
||||||
|
box-shadow: 1px 0 1px rgba(0, 0, 0, .25);
|
||||||
|
}
|
||||||
|
|
||||||
|
p.stretch-base{
|
||||||
|
position: absolute;
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
padding: 0;
|
||||||
|
left: 70.5%;
|
||||||
|
font-size: .75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress.stretch{
|
||||||
|
--starting-pos: 71.5%;
|
||||||
|
position: absolute;
|
||||||
|
left: var(--starting-pos);
|
||||||
|
top: 0;
|
||||||
|
width: calc(100% - var(--starting-pos) + 1px);
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
overflow: auto; /* enable drop shadow glow */
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress.stretch::-webkit-progress-value{
|
||||||
|
background: #f2d745;
|
||||||
|
box-shadow: none;
|
||||||
|
filter: drop-shadow(0 0 10px #f2d745);
|
||||||
|
border-right: 1px solid #E9C91F;
|
||||||
|
border-left: 5px solid #E9C91F;
|
||||||
|
}
|
||||||
|
|
||||||
|
progress.stretch::-moz-progress-bar{
|
||||||
|
background: #f2d745;
|
||||||
|
box-shadow: none;
|
||||||
|
filter: drop-shadow(0 0 10px #f2d745);
|
||||||
|
border-right: 1px solid #E9C91F;
|
||||||
|
border-left: 5px solid #E9C91F;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside button.close{
|
||||||
|
font-size: 0;
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
padding: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 1rem;
|
||||||
|
right: 1rem;
|
||||||
|
background: url('/images/close.svg') transparent;
|
||||||
|
background-size: cover;
|
||||||
|
height: 1rem;
|
||||||
|
width: 1rem;
|
||||||
|
opacity: .75;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside button.close:hover{
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
aside button.close:active{
|
||||||
|
left: auto;
|
||||||
|
top: calc(1rem + 1px);
|
||||||
|
right: calc(1rem - 1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes progress{
|
||||||
|
0%{
|
||||||
|
background-position: -60px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
100%{
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.downloads-container{
|
.downloads-container{
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
@ -2497,6 +2679,12 @@ abbr.acronym{
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aside.donation p:last-child,
|
||||||
|
article.ebook section aside.donation p:last-child,
|
||||||
|
aside.donation header p{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
body > header{
|
body > header{
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
|
@ -2581,6 +2769,10 @@ abbr.acronym{
|
||||||
form[action*="list-manage.com"] fieldset{
|
form[action*="list-manage.com"] fieldset{
|
||||||
grid-column: 1 / span 2;
|
grid-column: 1 / span 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.masthead ol.donors.patrons{
|
||||||
|
columns: 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: 500px){
|
@media(max-width: 500px){
|
||||||
|
@ -2663,13 +2855,13 @@ abbr.acronym{
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
form[action="/settings"] button{
|
form[action="/settings"] button:not(.close){
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
form[action="/settings"] button,
|
form[action="/settings"] button:not(.close),
|
||||||
form[action="/settings"] span,
|
form[action="/settings"] span,
|
||||||
form[action="/settings"] select{
|
form[action="/settings"] select{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -2703,6 +2895,17 @@ abbr.acronym{
|
||||||
footer ul li::after{
|
footer ul li::after{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.progress p.start,
|
||||||
|
.progress p.target,
|
||||||
|
.progress p.stretch-base{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress p{
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: 380px){
|
@media(max-width: 380px){
|
||||||
|
@ -2776,6 +2979,10 @@ abbr.acronym{
|
||||||
max-width: 50%;
|
max-width: 50%;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.masthead ol.donors.patrons{
|
||||||
|
columns: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports not(hyphens: auto){
|
@supports not(hyphens: auto){
|
||||||
|
|
|
@ -80,3 +80,7 @@ label.search::before{
|
||||||
h1,h2,h3,h4,h5,h6{
|
h1,h2,h3,h4,h5,h6{
|
||||||
text-shadow: 2px 2px 0 rgba(0, 0, 0, .75);
|
text-shadow: 2px 2px 0 rgba(0, 0, 0, .75);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aside button.close{
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
|
|
@ -7,6 +7,9 @@ require_once('Core.php');
|
||||||
<h1>Donate to Standard Ebooks</h1>
|
<h1>Donate to Standard Ebooks</h1>
|
||||||
<h2>and help bring the beauty of literature to the digital age</h2>
|
<h2>and help bring the beauty of literature to the digital age</h2>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
|
<? if(DONATION_DRIVE_ON){ ?>
|
||||||
|
<?= Template::DonationProgress(['autoHide' => false]) ?>
|
||||||
|
<? } ?>
|
||||||
<picture>
|
<picture>
|
||||||
<source srcset="/images/the-quiet-hour@2x.avif 2x, /images/the-quiet-hour.avif 1x" type="image/avif"/>
|
<source srcset="/images/the-quiet-hour@2x.avif 2x, /images/the-quiet-hour.avif 1x" type="image/avif"/>
|
||||||
<source srcset="/images/the-quiet-hour@2x.jpg 2x, /images/the-quiet-hour.jpg 1x" type="image/jpg"/>
|
<source srcset="/images/the-quiet-hour@2x.jpg 2x, /images/the-quiet-hour.jpg 1x" type="image/jpg"/>
|
||||||
|
@ -23,27 +26,29 @@ require_once('Core.php');
|
||||||
</section>
|
</section>
|
||||||
<section id="patrons-circle">
|
<section id="patrons-circle">
|
||||||
<h2>Join the Patrons Circle</h2>
|
<h2>Join the Patrons Circle</h2>
|
||||||
<p>Start a monthly donation of $10/month or more to become a member of the Patrons Circle. <strong>For less than the cost of a meal out, Patrons Circle members have a direct voice in shaping the future of the Standard Ebooks catalog.</strong></p>
|
<p>Members of the Patrons Circle are steadfast supporters of free, unrestricted, and beautifully presented digital literature. Besides helping support the creation of gorgeous ebooks for everyone to enjoy, they also have a direct voice in shaping the future of the Standard Ebooks catalog.</p>
|
||||||
|
<p><i>Join the Patrons Circle with a donation of $10/month or more, or join for one year with a one-time donation of $100 or more.</i></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Patrons Circle members have their name listed on our <a href="/about#masthead">masthead</a> for the duration of their gift.</p>
|
<p>Patrons Circle members have their name <a href="/about#patrons-circle">listed on our masthead</a> for the duration of their gift.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Once per quarter, Patrons Circle members may submit a book for inclusion on our <a href="/contribute/wanted-ebooks">Wanted Ebooks list</a>. (Submissions must conform to our <a href="/contribute/collections-policy">collections policy</a> and may be subject to approval.)</p>
|
<p>Once per quarter, Patrons Circle members may submit a book for inclusion on our <a href="/contribute/wanted-ebooks">Wanted Ebooks list</a>. (Submissions must conform to our <a href="/contribute/collections-policy">collections policy</a> and are subject to approval.)</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p><strong>Periodically, members of the Patrons Circle vote on a selection from our <a href="/contribute/wanted-ebooks">Wanted Ebooks list</a> to choose an ebook for immediate production.</strong> The resulting ebook will be a permanent addition to our <a href="/ebooks">online catalog of free digital literature</a>.</p>
|
<p><strong>Periodically, members of the Patrons Circle vote on a selection from our <a href="/contribute/wanted-ebooks">Wanted Ebooks list</a> to choose an ebook for immediate production.</strong> The resulting ebook will be a permanent addition to our <a href="/ebooks">online catalog of free digital literature</a>.</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="button-row center">
|
<p class="button-row">
|
||||||
<a href="https://fundraising.fracturedatlas.org/standard-ebooks/monthly_support" class="button">Donate $10/month or more</a>
|
<a href="https://fundraising.fracturedatlas.org/standard-ebooks/monthly_support" class="button">Donate $10/month or more</a>
|
||||||
|
<a href="https://fundraising.fracturedatlas.org/donor_intents/new?donation_intent=cd005756-7327-463d-bd53-a08acc5eaa4a" class="button">Donate $100 or more</a>
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
<section id="sponsor-an-ebook">
|
<section id="sponsor-an-ebook">
|
||||||
<h2>Sponsor an ebook of your choice</h2>
|
<h2>Sponsor an ebook of your choice</h2>
|
||||||
<p>Is there a book you want to see made into a beautiful digital edition? You can give the gift of literature to readers everywhere by sponsoring an addition to the Standard Ebooks catalog.</p>
|
<p>Is there a book you want to see made into a beautiful digital edition? You can give the gift of literature to readers everywhere by sponsoring an addition to the Standard Ebooks catalog.</p>
|
||||||
<p>Donate at one of the levels below and a book you select will be carefully hand-produced into an ebook edition that meets our high standard of quality, before becoming a permanent addition to our online catalog for the world to read, share, and reuse free of cost or U.S. copyright restrictions. Your name will appear in the ebook’s colophon and metadata, sealing your legacy as a sponsor of the literate arts.</p>
|
<p>Donate at one of the levels below and a book you select will be carefully hand-produced into an ebook edition that meets our high standard of quality, before becoming a permanent addition to our online catalog for the world to read, share, and reuse free of cost or U.S. copyright restrictions. Your name will appear in the ebook’s colophon and metadata, sealing your legacy as a sponsor of the literate arts.</p>
|
||||||
<p><em>Before you make your donation</em>, <a href="/about#masthead">contact the S.E. Editor-in-Chief</a> to confirm that your ebook selection will be accepted at your chosen donation level. These are the general rules:</p>
|
<p><em>Before you make your donation</em>, <a href="/about#editor-in-chief">contact the S.E. Editor-in-Chief</a> to confirm that your ebook selection will be accepted at your chosen donation level. These are the general rules:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Your selection must conform to our <a href="/contribute/collections-policy">collections policy</a>. The S.E. Editor-in-Chief reserves the right to modify or reject a selection for any reason.</p>
|
<p>Your selection must conform to our <a href="/contribute/collections-policy">collections policy</a>. The S.E. Editor-in-Chief reserves the right to modify or reject a selection for any reason.</p>
|
||||||
|
@ -52,7 +57,7 @@ require_once('Core.php');
|
||||||
<p>Your selection must have a usable transcription available online, for example at <a href="https://www.gutenberg.org">Project Gutenberg</a> or <a href="https://en.wikisource.org">Wikisource</a>. In general, Standard Ebooks doesn’t create new transcriptions or work with raw <a href="https://en.wikipedia.org/wiki/Optical_character_recognition">O.C.R.</a> output.</p>
|
<p>Your selection must have a usable transcription available online, for example at <a href="https://www.gutenberg.org">Project Gutenberg</a> or <a href="https://en.wikisource.org">Wikisource</a>. In general, Standard Ebooks doesn’t create new transcriptions or work with raw <a href="https://en.wikipedia.org/wiki/Optical_character_recognition">O.C.R.</a> output.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Your selection’s word count will be calculated from the source transcription using the <a href="/tools">S.E. toolset</a>, and includes front and back matter like forewords and endnotes. <a href="/about#masthead">Contact the S.E. Editor-in-Chief</a> before donating so that we can calculate your selection’s word count for you; a word processor can give you an estimate, but we must make the final determination. Note that the final ebook’s word count will differ.</p>
|
<p>Your selection’s word count will be calculated from the source transcription using the <a href="/tools">S.E. toolset</a>, and includes front and back matter like forewords and endnotes. <a href="/about#editor-in-chief">Contact the S.E. Editor-in-Chief</a> before donating so that we can calculate your selection’s word count for you; a word processor can give you an estimate, but we must make the final determination. Note that the final ebook’s word count will differ.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Standard Ebooks is the sole decisionmaker regarding all aspects of ebook editing and production. Trust us to create an artifact of beauty.</p>
|
<p>Standard Ebooks is the sole decisionmaker regarding all aspects of ebook editing and production. Trust us to create an artifact of beauty.</p>
|
||||||
|
@ -117,7 +122,7 @@ require_once('Core.php');
|
||||||
<p>Sponsorships at the corporate level are a great way to show your organization’s commitment to the support of the literate arts.</p>
|
<p>Sponsorships at the corporate level are a great way to show your organization’s commitment to the support of the literate arts.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>Your organization’s logo and a link will be <a href="/about">listed on our masthead</a>, which is prominently linked to on the Standard Ebooks website’s header and footer.</p>
|
<p>Your organization’s logo and a link will be <a href="/about#corporate-sponsors">listed on our masthead</a>, which is prominently linked to on the Standard Ebooks website’s header and footer.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Get customized <abbr class="acronym">ONIX</abbr>, OPDS, or RSS feeds of our ebook catalog for use by your organization for the duration of your sponsorship.</p>
|
<p>Get customized <abbr class="acronym">ONIX</abbr>, OPDS, or RSS feeds of our ebook catalog for use by your organization for the duration of your sponsorship.</p>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require_once('Core.php');
|
require_once('Core.php');
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path', true, '')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
$urlPath = trim(str_replace('.', '', HttpInput::Str(GET, 'url-path', true, '')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
||||||
$wwwFilesystemPath = EBOOKS_DIST_PATH . $urlPath; // Path to the deployed WWW files for this ebook
|
$wwwFilesystemPath = EBOOKS_DIST_PATH . $urlPath; // Path to the deployed WWW files for this ebook
|
||||||
|
|
||||||
if($urlPath == '' || mb_stripos($wwwFilesystemPath, EBOOKS_DIST_PATH) !== 0 || !is_dir($wwwFilesystemPath)){
|
if($urlPath == '' || mb_stripos($wwwFilesystemPath, EBOOKS_DIST_PATH) !== 0 || !is_dir($wwwFilesystemPath)){
|
||||||
|
|
|
@ -9,7 +9,7 @@ use function Safe\apcu_fetch;
|
||||||
use function Safe\shuffle;
|
use function Safe\shuffle;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$urlPath = trim(str_replace('.', '', HttpInput::GetString('url-path', true, '')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
$urlPath = trim(str_replace('.', '', HttpInput::Str(GET, 'url-path', true, '')), '/'); // Contains the portion of the URL (without query string) that comes after https://standardebooks.org/ebooks/
|
||||||
$wwwFilesystemPath = EBOOKS_DIST_PATH . $urlPath; // Path to the deployed WWW files for this ebook
|
$wwwFilesystemPath = EBOOKS_DIST_PATH . $urlPath; // Path to the deployed WWW files for this ebook
|
||||||
|
|
||||||
if($urlPath == '' || mb_stripos($wwwFilesystemPath, EBOOKS_DIST_PATH) !== 0){
|
if($urlPath == '' || mb_stripos($wwwFilesystemPath, EBOOKS_DIST_PATH) !== 0){
|
||||||
|
@ -127,8 +127,8 @@ catch(InvalidEbookException $ex){
|
||||||
|
|
||||||
<section id="description">
|
<section id="description">
|
||||||
<h2>Description</h2>
|
<h2>Description</h2>
|
||||||
<? if(DONATION_HOLIDAY_ALERT_ON){ ?>
|
<? if(DONATION_DRIVE_ON){ ?>
|
||||||
<?= Template::DonationAlert(['holidays' => true]) ?>
|
<?= Template::DonationProgress() ?>
|
||||||
<? }elseif(DONATION_ALERT_ON){ ?>
|
<? }elseif(DONATION_ALERT_ON){ ?>
|
||||||
<?= Template::DonationAlert() ?>
|
<?= Template::DonationAlert() ?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
|
|
|
@ -4,13 +4,13 @@ require_once('Core.php');
|
||||||
use function Safe\preg_replace;
|
use function Safe\preg_replace;
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$page = HttpInput::GetInt('page', 1);
|
$page = HttpInput::Int(GET, 'page', 1);
|
||||||
$perPage = HttpInput::GetInt('per-page', EBOOKS_PER_PAGE);
|
$perPage = HttpInput::Int(GET, 'per-page', EBOOKS_PER_PAGE);
|
||||||
$query = HttpInput::GetString('query', false);
|
$query = HttpInput::Str(GET, 'query', false);
|
||||||
$tags = HttpInput::GetArray('tags', []);
|
$tags = HttpInput::GetArray('tags', []);
|
||||||
$collection = HttpInput::GetString('collection', false);
|
$collection = HttpInput::Str(GET, 'collection', false);
|
||||||
$view = HttpInput::GetString('view', false);
|
$view = HttpInput::Str(GET, 'view', false);
|
||||||
$sort = HttpInput::GetString('sort', false);
|
$sort = HttpInput::Str(GET, 'sort', false);
|
||||||
$pages = 0;
|
$pages = 0;
|
||||||
$totalEbooks = 0;
|
$totalEbooks = 0;
|
||||||
$collectionObject = null;
|
$collectionObject = null;
|
||||||
|
@ -135,8 +135,10 @@ catch(InvalidCollectionException $ex){
|
||||||
?><?= Template::Header(['title' => $pageTitle, 'highlight' => 'ebooks', 'description' => $pageDescription]) ?>
|
?><?= Template::Header(['title' => $pageTitle, 'highlight' => 'ebooks', 'description' => $pageDescription]) ?>
|
||||||
<main class="ebooks">
|
<main class="ebooks">
|
||||||
<h1><?= $pageHeader ?></h1>
|
<h1><?= $pageHeader ?></h1>
|
||||||
<? if(DONATION_HOLIDAY_ALERT_ON){ ?>
|
<? if(DONATION_DRIVE_ON){ ?>
|
||||||
<?= Template::DonationAlert(['holidays' => true]) ?>
|
<?= Template::DonationProgress() ?>
|
||||||
|
<? }elseif(DONATION_HOLIDAY_ALERT_ON){ ?>
|
||||||
|
<?= Template::DonationAlert() ?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<? if($collection === null){ ?>
|
<? if($collection === null){ ?>
|
||||||
<?= Template::SearchForm(['query' => $query, 'tags' => $tags, 'sort' => $sort, 'view' => $view, 'perPage' => $perPage]) ?>
|
<?= Template::SearchForm(['query' => $query, 'tags' => $tags, 'sort' => $sort, 'view' => $view, 'perPage' => $perPage]) ?>
|
||||||
|
|
16
www/images/close.svg
Normal file
16
www/images/close.svg
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
width="10"
|
||||||
|
height="10"
|
||||||
|
viewBox="0 0 10 10"
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:1.7522;"
|
||||||
|
d="M 0.61949671,0.61949 9.3805033,9.3805"
|
||||||
|
/>
|
||||||
|
<path
|
||||||
|
style="fill:none;stroke:#000000;stroke-width:1.7522;"
|
||||||
|
d="M 9.3805033,0.61949 0.61949672,9.3805"
|
||||||
|
/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 418 B |
13
www/images/masthead/sponsors/threadable.svg
Normal file
13
www/images/masthead/sponsors/threadable.svg
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<svg width="300" height="100" viewBox="0 0 300 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="300" height="100" fill="#00545E"/>
|
||||||
|
<path d="M44.4037 61.2337C44.887 60.8165 45.31 60.6079 45.6725 60.6079C46.035 60.6079 46.322 60.7271 46.5334 60.9655C46.7449 61.2039 46.8506 61.487 46.8506 61.8148C46.8506 62.5002 46.473 63.2154 45.7178 63.9604C43.9354 65.7782 41.5942 66.6871 38.6941 66.6871C36.7909 66.6871 35.1747 66.2103 33.8455 65.2567C32.5465 64.3031 31.897 63.1558 31.897 61.8148C31.897 61.6956 31.9272 60.7271 31.9876 58.9093C32.0481 57.0915 32.0783 55.5717 32.0783 54.3499V47.1086H29.6766C29.1631 47.1086 28.7552 46.9894 28.4531 46.751C28.151 46.4828 28 46.1401 28 45.7229C28 45.0375 28.5136 44.4117 29.5407 43.8455C30.9907 43.1005 32.1387 42.2959 32.9845 41.4317C33.8304 40.5675 34.6309 39.3755 35.3862 37.8557C35.8393 37.1405 36.1414 36.6786 36.2925 36.47C36.4435 36.2316 36.6399 36.0081 36.8815 35.7995C37.1534 35.5909 37.4404 35.4866 37.7425 35.4866C38.4977 35.4866 38.8754 36.023 38.8754 37.0958V43.7561H45.2646C46.0199 43.7561 46.3975 44.1137 46.3975 44.8289C46.3975 45.0673 46.3522 45.4547 46.2615 45.9911C46.1407 46.7361 45.7329 47.1086 45.0381 47.1086H38.8754V58.2388C38.8754 59.848 39.1019 60.9804 39.5551 61.636C40.0384 62.2618 40.7181 62.5747 41.5942 62.5747C42.4099 62.5747 43.3463 62.1277 44.4037 61.2337Z" fill="#FFFBED"/>
|
||||||
|
<path d="M71.8972 52.0255L72.9848 60.3397C73.1056 61.2337 73.3322 61.9489 73.6645 62.4853C74.027 62.9919 74.3744 63.3197 74.7067 63.4687C75.039 63.6177 75.3411 63.8114 75.613 64.0498C75.8849 64.2882 76.0208 64.616 76.0208 65.0332C76.0208 65.808 75.477 66.1954 74.3895 66.1954C74.0874 66.1954 73.4832 66.1656 72.5769 66.106C71.6707 66.0762 70.7795 66.0613 69.9034 66.0613C68.9971 66.0613 68.0758 66.0762 67.1393 66.106C66.233 66.1656 65.6288 66.1954 65.3267 66.1954C64.209 66.1954 63.6501 65.7782 63.6501 64.9438C63.6501 64.5862 63.786 64.2882 64.0579 64.0498C64.3298 63.8114 64.6319 63.6475 64.9642 63.5581C65.2965 63.4389 65.5986 63.2303 65.8705 62.9323C66.1424 62.6343 66.2783 62.2469 66.2783 61.7701C66.2783 61.5913 66.233 61.0996 66.1424 60.295L65.1908 53.6794C64.7074 50.1332 63.3631 48.3602 61.1578 48.3602C60.0099 48.3602 59.013 48.8519 58.1671 49.8352C57.3212 50.7888 56.8983 52.2937 56.8983 54.3499V60.8761C56.8983 61.6211 57.0342 62.2171 57.3061 62.6641C57.6082 63.1111 57.9254 63.3942 58.2577 63.5134C58.59 63.6326 58.8921 63.8114 59.164 64.0498C59.4661 64.2882 59.6171 64.6011 59.6171 64.9885C59.6171 65.3163 59.4812 65.6143 59.2093 65.8825C58.9676 66.1209 58.59 66.2401 58.0765 66.2401C57.8348 66.2401 57.2306 66.2103 56.2639 66.1507C55.2972 66.1209 54.3758 66.106 53.4997 66.106C52.6539 66.106 51.7627 66.1209 50.8262 66.1507C49.8897 66.2103 49.2855 66.2401 49.0137 66.2401C48.5001 66.2401 48.1074 66.1209 47.8355 65.8825C47.5938 65.6441 47.473 65.3461 47.473 64.9885C47.473 64.6011 47.6089 64.2882 47.8808 64.0498C48.1527 63.8114 48.4548 63.6326 48.7871 63.5134C49.1194 63.3942 49.4215 63.1111 49.6934 62.6641C49.9653 62.2171 50.1012 61.6211 50.1012 60.8761V40.0013C50.1012 39.3755 49.935 38.8987 49.6027 38.5709C49.3006 38.2133 48.9683 38.0047 48.6058 37.9451C48.2433 37.8557 47.8959 37.6918 47.5636 37.4534C47.2615 37.215 47.1105 36.8723 47.1105 36.4253C47.1105 35.9783 47.3975 35.5611 47.9714 35.1737C48.5454 34.7863 49.7085 34.2052 51.4606 33.4304C53.6659 32.4768 55.0404 32 55.5842 32C56.4603 32 56.8983 32.6556 56.8983 33.9668V47.6897C57.6535 46.4083 58.6806 45.3504 59.9796 44.516C61.2787 43.6816 62.774 43.2644 64.4657 43.2644C66.671 43.2644 68.3778 44.069 69.5862 45.6782C70.7946 47.2874 71.5649 49.4032 71.8972 52.0255Z" fill="#FFFBED"/>
|
||||||
|
<path d="M93.9797 43.2197C95.2183 43.2197 96.2303 43.5177 97.0157 44.1137C97.8012 44.7097 98.1939 45.4249 98.1939 46.2593C98.1939 47.2725 97.6803 48.9859 96.6532 51.3997C96.2605 52.3533 95.7167 52.8301 95.0219 52.8301C94.4177 52.8301 93.9041 52.398 93.4812 51.5338C92.6354 49.8352 91.6989 48.986 90.6717 48.986C89.6144 48.986 88.5873 49.6713 87.5904 51.0421C86.6237 52.4129 86.1403 54.3201 86.1403 56.7637V60.8761C86.1403 61.6211 86.3065 62.2171 86.6388 62.6641C86.9711 63.0813 87.3487 63.3495 87.7717 63.4687C88.1946 63.5581 88.5722 63.7369 88.9045 64.0051C89.2368 64.2435 89.403 64.5713 89.403 64.9885C89.403 65.3163 89.267 65.6143 88.9951 65.8825C88.7535 66.1209 88.3758 66.2401 87.8623 66.2401C87.5904 66.2401 86.9107 66.2103 85.8232 66.1507C84.7356 66.1209 83.7085 66.106 82.7418 66.106C81.8959 66.106 80.9897 66.1209 80.023 66.1507C79.0865 66.2103 78.4823 66.2401 78.2104 66.2401C77.6968 66.2401 77.3041 66.1209 77.0322 65.8825C76.7906 65.6441 76.6697 65.3461 76.6697 64.9885C76.6697 64.6011 76.8057 64.2882 77.0775 64.0498C77.3494 63.8114 77.6515 63.6326 77.9838 63.5134C78.3463 63.3942 78.6635 63.1111 78.9354 62.6641C79.2073 62.2171 79.3432 61.6211 79.3432 60.8761V51.4444C79.3432 50.7888 79.1771 50.2971 78.8448 49.9693C78.5427 49.6117 78.2104 49.4031 77.8479 49.3435C77.4854 49.2541 77.138 49.0903 76.8057 48.8519C76.5036 48.6135 76.3525 48.2857 76.3525 47.8685C76.3525 47.3917 76.6546 46.9596 77.2588 46.5722C77.863 46.1848 79.0109 45.6186 80.7027 44.8736C82.9079 43.8902 84.2523 43.3985 84.7356 43.3985C85.6721 43.3985 86.1403 44.1137 86.1403 45.5441V49.2094C86.8352 47.4811 87.9076 46.0507 89.3576 44.9183C90.8379 43.7859 92.3786 43.2197 93.9797 43.2197Z" fill="#FFFBED"/>
|
||||||
|
<path d="M121.07 59.5798C121.372 59.5798 121.629 59.7139 121.84 59.9821C122.052 60.2205 122.158 60.4738 122.158 60.742C122.158 61.0698 122.022 61.4572 121.75 61.9042C120.904 63.2154 119.469 64.3925 117.445 65.4355C115.421 66.4785 113.125 67 110.557 67C107.023 67 104.107 65.9123 101.812 63.7369C99.5156 61.5615 98.3677 58.6858 98.3677 55.1098C98.3677 51.504 99.5912 48.5688 102.038 46.304C104.485 44.0094 107.43 42.8621 110.874 42.8621C113.956 42.8621 116.448 43.771 118.351 45.5888C120.285 47.4066 121.251 49.4776 121.251 51.802C121.251 52.398 121.161 52.8152 120.979 53.0536C120.798 53.2622 120.481 53.441 120.028 53.59L106.434 57.7024C107.159 59.1626 108.156 60.3397 109.424 61.2337C110.693 62.1277 112.128 62.5747 113.729 62.5747C115.783 62.5747 117.717 61.8297 119.529 60.3397C120.224 59.8331 120.738 59.5798 121.07 59.5798ZM109.923 46.2593C108.533 46.2593 107.4 46.8404 106.524 48.0026C105.678 49.1349 105.255 50.6696 105.255 52.6066C105.255 53.4112 105.316 54.1115 105.437 54.7075L113.231 52.2043C113.956 51.9957 114.318 51.5338 114.318 50.8186C114.318 49.716 113.895 48.688 113.049 47.7344C112.204 46.751 111.161 46.2593 109.923 46.2593Z" fill="#FFFBED"/>
|
||||||
|
<path d="M149.268 62.2171C149.842 62.3065 150.129 62.6045 150.129 63.1111C150.129 63.8561 149.586 64.6011 148.498 65.3461C147.441 66.0911 146.096 66.4636 144.465 66.4636C142.199 66.4636 140.568 65.4504 139.571 63.424C137.336 65.5696 134.541 66.6424 131.188 66.6424C128.741 66.6424 126.778 66.0017 125.297 64.7203C123.847 63.4389 123.122 61.785 123.122 59.7586C123.122 57.6428 123.968 55.8995 125.66 54.5287C127.352 53.1579 129.678 52.4725 132.638 52.4725C134.451 52.4725 136.158 52.7109 137.759 53.1877L137.713 52.696C137.2 49.1796 135.568 47.4215 132.819 47.4215C131.188 47.4215 129.496 47.9877 127.744 49.1201C126.959 49.5671 126.385 49.7906 126.022 49.7906C125.72 49.7906 125.448 49.6862 125.207 49.4777C124.965 49.2393 124.844 48.9264 124.844 48.539C124.844 47.8834 125.328 47.1384 126.294 46.304C128.469 44.218 131.384 43.175 135.04 43.175C140.478 43.175 143.559 45.7676 144.284 50.9527L145.326 58.2835C145.507 59.6841 145.87 60.6228 146.414 61.0996C146.957 61.5764 147.909 61.9489 149.268 62.2171ZM134.088 62.7535C134.995 62.7535 135.871 62.5598 136.716 62.1724C137.593 61.7552 138.287 61.2635 138.801 60.6973L138.166 56.0038C137.17 55.676 136.052 55.5121 134.813 55.5121C133.363 55.5121 132.215 55.8101 131.369 56.4061C130.554 57.0021 130.146 57.8663 130.146 58.9987C130.146 60.1311 130.508 61.04 131.233 61.7254C131.989 62.4108 132.94 62.7535 134.088 62.7535Z" fill="#FFFBED"/>
|
||||||
|
<path d="M175.257 34.1456V58.9987C175.257 59.6245 175.423 60.1311 175.755 60.5185C176.087 60.9059 176.435 61.1741 176.797 61.3231C177.19 61.4423 177.553 61.636 177.885 61.9042C178.217 62.1426 178.383 62.4555 178.383 62.8429C178.383 63.3495 178.066 63.7816 177.432 64.1392C176.797 64.4968 175.589 64.9736 173.807 65.5696C171.692 66.3146 170.378 66.6871 169.864 66.6871C168.928 66.6871 168.46 65.957 168.46 64.4968V62.4406C166.466 65.361 163.687 66.8212 160.122 66.8212C157.192 66.8212 154.745 65.7931 152.781 63.7369C150.817 61.6509 149.836 58.8497 149.836 55.3333C149.836 51.7871 150.984 48.8519 153.279 46.5275C155.575 44.2031 158.445 43.0409 161.889 43.0409C164.547 43.0409 166.738 43.771 168.46 45.2312V39.8672C168.46 39.2116 168.278 38.7199 167.916 38.3921C167.553 38.0643 167.146 37.8706 166.692 37.811C166.269 37.7216 165.877 37.5577 165.514 37.3193C165.152 37.0809 164.97 36.7382 164.97 36.2912C164.97 35.8144 165.273 35.3823 165.877 34.9949C166.511 34.6075 167.765 34.0413 169.638 33.2963C171.813 32.4321 173.218 32 173.852 32C174.788 32 175.257 32.7152 175.257 34.1456ZM163.248 62.1277C164.699 62.1277 165.922 61.5615 166.919 60.4291C167.946 59.2669 168.46 57.7471 168.46 55.8697V54.3052C168.46 52.1 167.84 50.2375 166.602 48.7178C165.393 47.198 163.958 46.4381 162.297 46.4381C160.696 46.4381 159.412 47.0639 158.445 48.3155C157.509 49.567 157.04 51.2656 157.04 53.4112C157.04 55.974 157.66 58.0749 158.898 59.7139C160.137 61.3231 161.587 62.1277 163.248 62.1277Z" fill="#FFFBED"/>
|
||||||
|
<path d="M205.249 62.2171C205.823 62.3065 206.11 62.6045 206.11 63.1111C206.11 63.8561 205.566 64.6011 204.479 65.3461C203.421 66.0911 202.077 66.4636 200.446 66.4636C198.18 66.4636 196.549 65.4504 195.552 63.424C193.316 65.5696 190.522 66.6424 187.169 66.6424C184.722 66.6424 182.758 66.0017 181.278 64.7203C179.828 63.4389 179.103 61.785 179.103 59.7586C179.103 57.6428 179.949 55.8995 181.64 54.5287C183.332 53.1579 185.658 52.4725 188.619 52.4725C190.431 52.4725 192.138 52.7109 193.739 53.1877L193.694 52.696C193.18 49.1796 191.549 47.4215 188.8 47.4215C187.169 47.4215 185.477 47.9877 183.725 49.1201C182.939 49.5671 182.365 49.7906 182.003 49.7906C181.701 49.7906 181.429 49.6862 181.187 49.4777C180.945 49.2393 180.825 48.9264 180.825 48.539C180.825 47.8834 181.308 47.1384 182.275 46.304C184.45 44.218 187.365 43.175 191.02 43.175C196.458 43.175 199.539 45.7676 200.264 50.9527L201.307 58.2835C201.488 59.6841 201.85 60.6228 202.394 61.0996C202.938 61.5764 203.889 61.9489 205.249 62.2171ZM190.069 62.7535C190.975 62.7535 191.851 62.5598 192.697 62.1724C193.573 61.7552 194.268 61.2635 194.781 60.6973L194.147 56.0038C193.15 55.676 192.032 55.5121 190.794 55.5121C189.344 55.5121 188.196 55.8101 187.35 56.4061C186.534 57.0021 186.126 57.8663 186.126 58.9987C186.126 60.1311 186.489 61.04 187.214 61.7254C187.969 62.4108 188.921 62.7535 190.069 62.7535Z" fill="#FFFBED"/>
|
||||||
|
<path d="M222.945 43.0409C225.966 43.0409 228.428 44.0839 230.331 46.1699C232.264 48.2559 233.231 51.057 233.231 54.5734C233.231 58.1196 232.038 61.0549 229.651 63.3793C227.295 65.6739 224.395 66.8212 220.951 66.8212C219.501 66.8212 218.232 66.6722 217.145 66.3742C216.057 66.0762 215.181 65.7782 214.516 65.4802C213.882 65.1822 213.399 65.0332 213.066 65.0332C212.583 65.0332 211.858 65.2865 210.891 65.7931C209.955 66.2699 209.305 66.5083 208.943 66.5083C207.976 66.5083 207.493 65.9421 207.493 64.8097V40.0013C207.493 39.3755 207.311 38.8987 206.949 38.5709C206.617 38.2133 206.239 38.0047 205.816 37.9451C205.393 37.8557 205 37.6918 204.638 37.4534C204.306 37.215 204.139 36.8723 204.139 36.4253C204.139 35.9485 204.426 35.5313 205 35.1737C205.605 34.7863 206.798 34.2052 208.58 33.4304C210.876 32.4768 212.311 32 212.885 32C213.822 32 214.29 32.6556 214.29 33.9668V47.5556C216.404 44.5458 219.289 43.0409 222.945 43.0409ZM220.498 63.4687C222.129 63.4687 223.458 62.8727 224.485 61.6807C225.513 60.4887 226.026 58.7603 226.026 56.4955C226.026 53.9625 225.422 51.8765 224.214 50.2375C223.005 48.5688 221.525 47.7344 219.773 47.7344C218.232 47.7344 216.933 48.3304 215.876 49.5223C214.818 50.7143 214.29 52.2639 214.29 54.1711V55.9144C214.29 58.06 214.864 59.8629 216.012 61.3231C217.16 62.7535 218.655 63.4687 220.498 63.4687Z" fill="#FFFBED"/>
|
||||||
|
<path d="M236.228 66.2401C235.714 66.2401 235.321 66.1209 235.05 65.8825C234.808 65.6441 234.687 65.3461 234.687 64.9885C234.687 64.6011 234.823 64.2882 235.095 64.0498C235.367 63.8114 235.669 63.6326 236.001 63.5134C236.334 63.3942 236.636 63.1111 236.907 62.6641C237.179 62.2171 237.315 61.6211 237.315 60.8761V40.0013C237.315 39.3755 237.149 38.8987 236.817 38.5709C236.515 38.2133 236.182 38.0047 235.82 37.9451C235.457 37.8557 235.11 37.6918 234.778 37.4534C234.476 37.215 234.325 36.8723 234.325 36.4253C234.325 35.9783 234.612 35.5611 235.186 35.1737C235.76 34.7863 236.923 34.2052 238.675 33.4304C240.88 32.4768 242.224 32 242.708 32C243.644 32 244.112 32.7152 244.112 34.1456V60.8761C244.112 61.6211 244.248 62.2171 244.52 62.6641C244.822 63.1111 245.14 63.3942 245.472 63.5134C245.804 63.6326 246.106 63.8114 246.378 64.0498C246.68 64.2882 246.831 64.6011 246.831 64.9885C246.831 65.3163 246.695 65.6143 246.423 65.8825C246.182 66.1209 245.804 66.2401 245.291 66.2401C245.049 66.2401 244.445 66.2103 243.478 66.1507C242.511 66.1209 241.59 66.106 240.714 66.106C239.868 66.106 238.977 66.1209 238.04 66.1507C237.104 66.2103 236.5 66.2401 236.228 66.2401Z" fill="#FFFBED"/>
|
||||||
|
<path d="M270.912 59.5798C271.215 59.5798 271.471 59.7139 271.683 59.9821C271.894 60.2205 272 60.4738 272 60.742C272 61.0698 271.864 61.4572 271.592 61.9042C270.746 63.2154 269.311 64.3925 267.287 65.4355C265.263 66.4785 262.967 67 260.4 67C256.865 67 253.95 65.9123 251.654 63.7369C249.358 61.5615 248.21 58.6858 248.21 55.1098C248.21 51.504 249.434 48.5688 251.881 46.304C254.328 44.0094 257.273 42.8621 260.717 42.8621C263.798 42.8621 266.29 43.771 268.194 45.5888C270.127 47.4066 271.094 49.4776 271.094 51.802C271.094 52.398 271.003 52.8152 270.822 53.0536C270.641 53.2622 270.323 53.441 269.87 53.59L256.276 57.7024C257.001 59.1626 257.998 60.3397 259.267 61.2337C260.536 62.1277 261.97 62.5747 263.572 62.5747C265.626 62.5747 267.559 61.8297 269.372 60.3397C270.067 59.8331 270.58 59.5798 270.912 59.5798ZM259.765 46.2593C258.376 46.2593 257.243 46.8404 256.367 48.0026C255.521 49.1349 255.098 50.6696 255.098 52.6066C255.098 53.4112 255.158 54.1115 255.279 54.7075L263.073 52.2043C263.798 51.9957 264.161 51.5338 264.161 50.8186C264.161 49.716 263.738 48.688 262.892 47.7344C262.046 46.751 261.004 46.2593 259.765 46.2593Z" fill="#FFFBED"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 14 KiB |
|
@ -8,7 +8,7 @@ use function Safe\sort;
|
||||||
|
|
||||||
$currentManual = Manual::GetLatestVersion();
|
$currentManual = Manual::GetLatestVersion();
|
||||||
|
|
||||||
$url = HttpInput::GetString('url', true, '');
|
$url = HttpInput::Str(GET, 'url', true, '');
|
||||||
$url = preg_replace('|^/|ius', '', $url);
|
$url = preg_replace('|^/|ius', '', $url);
|
||||||
$url = preg_replace('|\.php$|ius', '', $url);
|
$url = preg_replace('|\.php$|ius', '', $url);
|
||||||
$url = preg_replace('|/$|ius', '', $url);
|
$url = preg_replace('|/$|ius', '', $url);
|
||||||
|
|
|
@ -6,7 +6,7 @@ $now = new DateTime('now', new DateTimeZone('UTC'));
|
||||||
$ebooks = [];
|
$ebooks = [];
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$query = HttpInput::GetString('query', false);
|
$query = HttpInput::Str(GET, 'query', false);
|
||||||
|
|
||||||
if($query !== null){
|
if($query !== null){
|
||||||
$ebooks = Library::Search($query);
|
$ebooks = Library::Search($query);
|
||||||
|
|
|
@ -3,8 +3,14 @@ require_once('Core.php');
|
||||||
|
|
||||||
use function Safe\strtotime;
|
use function Safe\strtotime;
|
||||||
|
|
||||||
$colorScheme = $_POST['color-scheme'] ?? 'auto';
|
$hideDonationAlert = HttpInput::Bool(POST, 'hide-donation-alert');
|
||||||
|
$colorScheme = HttpInput::Str(POST, 'color-scheme');
|
||||||
|
|
||||||
|
if($hideDonationAlert !== null){
|
||||||
|
setcookie('hide-donation-alert', $hideDonationAlert ? 'true' : 'false', strtotime('+1 month'), '/', '', true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($colorScheme !== null){
|
||||||
if($colorScheme !== 'dark' && $colorScheme !== 'light' && $colorScheme !== 'auto'){
|
if($colorScheme !== 'dark' && $colorScheme !== 'light' && $colorScheme !== 'auto'){
|
||||||
$colorScheme = 'auto';
|
$colorScheme = 'auto';
|
||||||
}
|
}
|
||||||
|
@ -14,10 +20,13 @@ if($colorScheme == 'auto'){
|
||||||
setcookie('color-scheme', '', 0, '/', '', true, true);
|
setcookie('color-scheme', '', 0, '/', '', true, true);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
setcookie('color-scheme', $colorScheme, strtotime('+10 years'), '/', '', true, true);
|
setcookie('color-scheme', $colorScheme, strtotime('+1 year'), '/', '', true, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTTP 303, See other
|
// HTTP 303, See other
|
||||||
http_response_code(303);
|
http_response_code(303);
|
||||||
header('Location: /settings');
|
|
||||||
|
$redirect = $_SERVER['HTTP_REFERER'] ?? '/';
|
||||||
|
header('Location: ' . $redirect);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue