mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Tweak PD Day banner
This commit is contained in:
parent
6ad882e2cc
commit
fcb5240585
2 changed files with 7 additions and 2 deletions
|
@ -14,7 +14,7 @@ $isErrorPage = $isErrorPage ?? false;
|
|||
$downloadUrl = $downloadUrl ?? null;
|
||||
$canonicalUrl = $canonicalUrl ?? null;
|
||||
$css = $css ?? [];
|
||||
$showPublicDomainDayBanner = PD_NOW < new DateTimeImmutable('January 14', LATEST_CONTINENTAL_US_TZ) && !(HttpInput::Bool(COOKIE, 'hide-public-domain-day-banner') ?? false);
|
||||
$showPublicDomainDayBanner = PD_NOW > new DateTimeImmutable('January 1, 8:00 AM', new DateTimeZone('America/Chicago')) && PD_NOW < new DateTimeImmutable('January 14', LATEST_CONTINENTAL_US_TZ) && !(HttpInput::Bool(COOKIE, 'hide-public-domain-day-banner') ?? false);
|
||||
|
||||
// As of Sep. 2022, all versions of Safari have a bug where if the page is served as XHTML, then `<picture>` elements download all `<source>`s instead of the first supported match.
|
||||
// So, we try to detect Safari here, and don't use multiple `<source>` if we find Safari.
|
||||
|
@ -110,7 +110,7 @@ if(!$isXslt){
|
|||
<div class="confetti"></div>
|
||||
<div class="confetti"></div>
|
||||
</div>
|
||||
<a href="/blog/public-domain-day-<?= PD_DAY_YEAR ?>"><strong>Happy Public Domain Day <?= PD_DAY_YEAR ?>!</strong> See what’s free to read starting January 1.</a>
|
||||
<a href="/blog/public-domain-day-<?= PD_DAY_YEAR ?>"><strong>Happy Public Domain Day <?= PD_DAY_YEAR ?>!</strong> See what’s free to read on January 1.</a>
|
||||
<form action="/settings" method="<?= Enums\HttpMethod::Post->value ?>">
|
||||
<input type="hidden" name="_method" value="<?= Enums\HttpMethod::Patch->value ?>" />
|
||||
<input type="hidden" name="hide-public-domain-day-banner" value="true" />
|
||||
|
|
|
@ -3210,6 +3210,11 @@ hr + p{
|
|||
box-shadow: 0 0 1rem rgba(0, 0, 0, .75);
|
||||
}
|
||||
|
||||
.public-domain-day-banner a{
|
||||
margin-left: -2.5rem;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.public-domain-day-banner button.close{
|
||||
background-image: url('/images/close-dark.svg');
|
||||
top: 2px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue