Skip to content

Commit d7599b0

Browse files
committed
Change error link color
1 parent cbe4c6f commit d7599b0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/card.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ function generateErrorCard(string $message, array $params = null): string
252252
return "<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' style='isolation:isolate' viewBox='0 0 495 195' width='495px' height='195px'>
253253
<style>
254254
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
255+
a {
256+
fill: {$theme["dates"]};
257+
}
255258
</style>
256259
<defs>
257260
<clipPath id='_clipPath_OZGVUqgkTHHpPTYeqOmK3uLgktRVSwWw'>
@@ -307,11 +310,11 @@ function convertSvgToPng(string $svg): string
307310
$svg = trim($svg);
308311

309312
// remove style and animations
310-
$svg = preg_replace('/(<style>\X*?<\/style>)/m', '', $svg);
313+
$svg = preg_replace('/(<style>\X*<\/style>)/m', '', $svg);
311314
$svg = preg_replace('/(opacity: 0;)/m', 'opacity: 1;', $svg);
312315
$svg = preg_replace('/(animation: fadein.*?;)/m', 'opacity: 1;', $svg);
313316
$svg = preg_replace('/(animation: currentstreak.*?;)/m', 'font-size: 28px;', $svg);
314-
$svg = preg_replace('/<a href\X*?>(\X*?)<\/a>/m', '\1', $svg);
317+
$svg = preg_replace('/<a \X*?>(\X*?)<\/a>/m', '\1', $svg);
315318

316319
// create canvas
317320
$imagick = new Imagick();

0 commit comments

Comments
 (0)