From fcb52405855eb621ff93fb6409b7482e0ab8f8e2 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Tue, 31 Dec 2024 14:59:03 -0600 Subject: [PATCH] Tweak PD Day banner --- templates/Header.php | 4 ++-- www/css/core.css | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/Header.php b/templates/Header.php index 054ae00e..34654e58 100644 --- a/templates/Header.php +++ b/templates/Header.php @@ -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 `` elements download all ``s instead of the first supported match. // So, we try to detect Safari here, and don't use multiple `` if we find Safari. @@ -110,7 +110,7 @@ if(!$isXslt){
- Happy Public Domain Day ! See what’s free to read starting January 1. + Happy Public Domain Day ! See what’s free to read on January 1.
diff --git a/www/css/core.css b/www/css/core.css index d80520f5..1ac5dd7d 100644 --- a/www/css/core.css +++ b/www/css/core.css @@ -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;