From 1089e7e890d4feeb2d7e90cc49f439b637374ada Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Mon, 27 Jun 2022 16:40:03 -0500 Subject: [PATCH] Tweak donation bar --- templates/DonationProgress.php | 12 +++++++----- www/css/core.css | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/templates/DonationProgress.php b/templates/DonationProgress.php index 270ff9a4..82f2ab4a 100644 --- a/templates/DonationProgress.php +++ b/templates/DonationProgress.php @@ -5,15 +5,17 @@ if(!DONATION_DRIVE_ON || ($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false) return; } +$startDate = new DateTime('2022-07-01'); +$endDate = new DateTime('2022-07-31'); $autoHide = $autoHide ?? true; $showDonateButton = $showDonateButton ?? true; -$current = 0; -$target = 50; +$current = (Db::Query('select count(*) as PatronCount from Patrons where Timestamp >= ?', [$startDate]))[0]->PatronCount; +$target = 70; $stretchCurrent = 0; $stretchTarget = 20; $totalCurrent = $current; $totalTarget = $target; -$deadline = 'Feb. 15'; +$deadline = $endDate->format('M. j'); $stretchOn = false; if($stretchTarget > 0 && $current >= $target){ @@ -52,10 +54,10 @@ if($stretchTarget > 0 && $current >= $target){ -

When we started this drive, we set a goal of 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!

+

When we started this drive, we set a goal of Patrons Circle members by . Thanks to the incredible generosity of literature lovers from all walks of life, we hit that goal in just over a week!

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?

-

We want to make Standard Ebooks a sustainable project that can support the huge amount of work it takes to maintain and operate. Welcoming new Patrons Circle members by will help put us on the stable financial footing we need to continue producing beautiful ebooks as we enter the new year.

+

We want to make Standard Ebooks a sustainable project that can support the huge amount of work it takes to maintain and operate. Welcoming new Patrons Circle members by will help keep us on the stable financial footing we need to continue producing beautiful ebooks.

Will you help us reach that goal, and support free and unrestricted digital literature?

diff --git a/www/css/core.css b/www/css/core.css index d3107c87..97109502 100644 --- a/www/css/core.css +++ b/www/css/core.css @@ -2256,7 +2256,7 @@ aside header{ FF bug that causes infinite requsts to stripes.svg */ background: url("/images/stripes.svg") transparent; background-position: 0 0; - animation: progress 2s linear infinite; + animation: progress 4s linear infinite; z-index: 3; }