From fad760f46abb43d17271506f484dc8ccebfa05b4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Sep 2023 17:03:59 -0400 Subject: [PATCH] Add icon placeholder for images in image grid --- src/Model/Profile.php | 8 +++++--- src/Module/Photo.php | 2 +- view/global.css | 1 + view/theme/frio/scheme/black.css | 4 ++++ view/theme/frio/scheme/dark.css | 4 ++++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index b80c83881a..9c7aab54ad 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -813,12 +813,14 @@ class Profile /** * Set the visitor cookies (see remote_user()) for signed HTTP requests - ( + * + * @param array $server The content of the $_SERVER superglobal * @return array Visitor contact array + * @throws InternalServerErrorException */ - public static function addVisitorCookieForHTTPSigner(): array + public static function addVisitorCookieForHTTPSigner(array $server): array { - $requester = HTTPSignature::getSigner('', $_SERVER); + $requester = HTTPSignature::getSigner('', $server); if (empty($requester)) { return []; } diff --git a/src/Module/Photo.php b/src/Module/Photo.php index c8e0656d2d..be2408edf2 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -77,7 +77,7 @@ class Photo extends BaseApi throw new NotModifiedException(); } - Profile::addVisitorCookieForHTTPSigner(); + Profile::addVisitorCookieForHTTPSigner($this->server); $customsize = 0; $square_resize = true; diff --git a/view/global.css b/view/global.css index 054ac05159..6bee34b8bc 100644 --- a/view/global.css +++ b/view/global.css @@ -697,6 +697,7 @@ audio { */ .imagegrid-row figure { position: relative; + background: center / auto rgba(0, 0, 0, 0.05) url(/images/icons/image.png) no-repeat; } .imagegrid-row figure img{ position: absolute; diff --git a/view/theme/frio/scheme/black.css b/view/theme/frio/scheme/black.css index debf9d99b3..21a40f1c7c 100644 --- a/view/theme/frio/scheme/black.css +++ b/view/theme/frio/scheme/black.css @@ -394,3 +394,7 @@ input[type="text"].tt-input { textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-edit-text:focus + .comment-edit-form .preview { border-color: $link_color; } + +.imagegrid-row figure { + background-color: rgba(255, 255, 255, 0.15); +} diff --git a/view/theme/frio/scheme/dark.css b/view/theme/frio/scheme/dark.css index add36fff10..29b2782da2 100644 --- a/view/theme/frio/scheme/dark.css +++ b/view/theme/frio/scheme/dark.css @@ -354,3 +354,7 @@ input[type="text"].tt-input { textarea#profile-jot-text:focus + #preview_profile-jot-text, textarea.comment-edit-text:focus + .comment-edit-form .preview { border-color: $link_color; } + +.imagegrid-row figure { + background-color: rgba(255, 255, 255, 0.05); +} -- 2.39.5