diff --git a/Classes/Service/PlaceholderImageService.php b/Classes/Service/PlaceholderImageService.php index a004deb..625a083 100644 --- a/Classes/Service/PlaceholderImageService.php +++ b/Classes/Service/PlaceholderImageService.php @@ -60,7 +60,7 @@ private function generateBitmap(int $width, int $height, string $format, string 'fontColor' => self::COLOR, 'fontSize' => round($width / 9), 'align' => 'center', - 'offset' => implode(',', [0, $height / 1.75]), + 'offset' => implode(',', [0, $height / 2 + ($width / 9 / 3)]), ], ]; diff --git a/Resources/Private/Templates/Placeholder.svg b/Resources/Private/Templates/Placeholder.svg index 5643a6c..610bb42 100644 --- a/Resources/Private/Templates/Placeholder.svg +++ b/Resources/Private/Templates/Placeholder.svg @@ -4,7 +4,7 @@ rect { fill:{backgroundColor}; width: 100%; height: 100%; } foreignObject { width: 100%; height: 100%; } div { container-type: inline-size; position: absolute; top: 0; right: 0; bottom: 0; left: 0; } - p { color: {color}; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: {width/9}px; position: absolute; left: 0; width: 100%; text-align: center; transform: translateY(-100%); top: 50%; } + p { color: {color}; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: {width/9}px; position: absolute; left: 0; width: 100%; text-align: center; margin: 0; transform: translateY(-50%); top: 50%; } .corner { border-color: {color}; border-style: solid; border-width: 3px; display: block; position: absolute; width: 15px; height: 15px; } .corner-tl { border-bottom: none; border-right: none; left: 0; top: 0; } .corner-tr { border-bottom: none; border-left: none; top: 0; right: 0; }