diff --git a/composer.json b/composer.json index 18cef1b..ce484f9 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "filament/spatie-laravel-media-library-plugin": "^2.0", "filament/spatie-laravel-tags-plugin": "^2.0", "filament/spatie-laravel-translatable-plugin": "^2.0", - "lara-zeus/core": "dev-main", + "lara-zeus/core": "^2.1", "mohamedsabil83/filament-forms-tinyeditor": "^1.5", "spatie/laravel-medialibrary": "^10.0.0", "spatie/laravel-sluggable": "^3.3", diff --git a/composer.lock b/composer.lock index 01a2bb4..4b9b484 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bdad389cf0707567621f96ec2ad8215a", + "content-hash": "a4ff2cda0933687d746f0a28e2bb2086", "packages": [ { "name": "akaunting/laravel-money", @@ -2030,23 +2030,23 @@ }, { "name": "lara-zeus/core", - "version": "dev-main", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/lara-zeus/core.git", - "reference": "309d8630a7aaf35494e272b3f13bb99c869a5b09" + "reference": "9928661836e820efb84de6b52d5e3bb5e6242bf7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lara-zeus/core/zipball/309d8630a7aaf35494e272b3f13bb99c869a5b09", - "reference": "309d8630a7aaf35494e272b3f13bb99c869a5b09", + "url": "https://api.github.com/repos/lara-zeus/core/zipball/9928661836e820efb84de6b52d5e3bb5e6242bf7", + "reference": "9928661836e820efb84de6b52d5e3bb5e6242bf7", "shasum": "" }, "require": { "archtechx/laravel-seo": "^0.4.0", "calebporzio/sushi": "^2.4", "codeat3/blade-iconpark": "^1.4", - "filament/filament": "^2.10", + "filament/filament": "^2.13", "illuminate/support": "^8.0 || ^9.0", "php": "^8.0" }, @@ -2054,7 +2054,6 @@ "orchestra/testbench": "^6.0 || ^7.0", "phpunit/phpunit": "^9.5.10" }, - "default-branch": true, "type": "library", "extra": { "laravel": { @@ -2093,7 +2092,7 @@ ], "support": { "issues": "https://github.com/lara-zeus/core/issues", - "source": "https://github.com/lara-zeus/core/tree/main" + "source": "https://github.com/lara-zeus/core/tree/2.1.0" }, "funding": [ { @@ -2101,7 +2100,7 @@ "type": "patreon" } ], - "time": "2022-04-19T12:26:56+00:00" + "time": "2022-07-10T17:16:33+00:00" }, { "name": "laravel/framework", @@ -10270,9 +10269,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "lara-zeus/core": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/resources/lang/ar.json b/resources/lang/ar.json index c3c56a6..122ced8 100644 --- a/resources/lang/ar.json +++ b/resources/lang/ar.json @@ -48,5 +48,7 @@ "frequently asked questions": "الأسئلة الشائعة", "FAQs": "الأسئلة الشائعة", "Question": "السؤال", - "Answer": "الإجابة" + "Answer": "الإجابة", + "Clear": "مسح", + "Showing Search result of": "عرض نتائج البحث عن" } diff --git a/resources/lang/en.json b/resources/lang/en.json index 6ddef43..8634281 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -48,5 +48,7 @@ "frequently asked questions": "frequently asked questions", "FAQs": "FAQs", "Question": "Question", - "Answer": "Answer" + "Answer": "Answer", + "Clear": "Clear", + "Showing Search result of": "Showing Search result of" } diff --git a/resources/views/themes/zeus/home.blade.php b/resources/views/themes/zeus/home.blade.php index f703c24..582ad18 100644 --- a/resources/views/themes/zeus/home.blade.php +++ b/resources/views/themes/zeus/home.blade.php @@ -1,8 +1,4 @@
- {{-- You can override the used class in config/zeus-sky.php 'search_result_highlight_css_class'' --}} - @unless($stickies->isEmpty())
@foreach($stickies as $post) @@ -16,10 +12,14 @@
@unless ($posts->isEmpty()) -
-

Posts

-
- @each($theme.'.partial.post', $posts, 'post') +
+

{{ __('Posts') }}

+
+ @if(request()->filled('search')) + {{ __('Showing Search result of') }}: {{ request('search') }} + + @endif + @each($theme.'.partial.post', $posts, 'post') @else @include($theme.'.partial.empty') @endunless diff --git a/resources/views/themes/zeus/partial/post.blade.php b/resources/views/themes/zeus/partial/post.blade.php index bc125b0..cdd5849 100644 --- a/resources/views/themes/zeus/partial/post.blade.php +++ b/resources/views/themes/zeus/partial/post.blade.php @@ -10,11 +10,13 @@
- {{ $post->title ?? '' }} + {!! $post->title !!} -

- {{ $post->description ?? '' }} -

+ @if($post->description !== null) +

+ {!! $post->description !!} +

+ @endif
Read more diff --git a/resources/views/themes/zeus/partial/sidebar/search.blade.php b/resources/views/themes/zeus/partial/sidebar/search.blade.php index 13d398f..4f22925 100644 --- a/resources/views/themes/zeus/partial/sidebar/search.blade.php +++ b/resources/views/themes/zeus/partial/sidebar/search.blade.php @@ -1,8 +1,8 @@ -
-

Search

-
+
+

{{ __('Search') }}

+
- +
diff --git a/src/Http/Livewire/Posts.php b/src/Http/Livewire/Posts.php index 2fc087d..fba5050 100644 --- a/src/Http/Livewire/Posts.php +++ b/src/Http/Livewire/Posts.php @@ -13,7 +13,7 @@ class Posts extends Component { public function render() { - $search = strtolower(request()->get('search')); + $search = strtolower(request('search')); $posts = Post::NotSticky(); $posts = $this->applySearch($posts, $search); @@ -69,7 +69,9 @@ private function highlightSearchResults(Collection $posts, ?string $search = nul } foreach ($posts as $i => $post) { + $posts[$i]->title = static::hl($post->title, [$search]); $posts[$i]->content = static::hl($post->content, [$search]); + $posts[$i]->description = static::hl($post->description, [$search]); } return $posts;