From c2a46493881edb57d1d15bf8a57bc6557539f726 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Sun, 1 Dec 2024 05:33:01 +0330 Subject: [PATCH] fixed bug post modern bg --- .../views/segments/posts/PostModernPosts/PostModernPosts.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/views/segments/posts/PostModernPosts/PostModernPosts.php b/resources/views/segments/posts/PostModernPosts/PostModernPosts.php index 93dc977..b116e05 100644 --- a/resources/views/segments/posts/PostModernPosts/PostModernPosts.php +++ b/resources/views/segments/posts/PostModernPosts/PostModernPosts.php @@ -66,7 +66,8 @@ class PostModernPosts public static function onMount(Part $part = null) { $data = file_get_contents(public_path('upload/images/').$part->area_name . '.' . $part->part.'.svg'); - $data = str_replace('fill:#eeeeee','fill:'.getSetting($part->area_name.'_'.$part->part.'_bg'),$data); + $re = '/style\=\"fill\:(.*)\;stroke\-width\:0/m'; + $data = preg_replace($re, 'style="fill:'.getSetting($part->area_name.'_'.$part->part.'_bg').';stroke-width:0',$data); file_put_contents(public_path('upload/images/').$part->area_name . '.' . $part->part.'.svg',$data); return $part; }