From a0fcf87d8e80fe2ec11f6ae661af48bc0b85a07d Mon Sep 17 00:00:00 2001 From: IsharaEkanayaka Date: Tue, 17 Sep 2024 09:14:36 +0530 Subject: [PATCH] Add top banner and read time estimate --- .../views/backend/event/index-table-row.blade.php | 2 +- resources/views/backend/event/preview.blade.php | 11 +++++++++++ .../views/backend/news/index-table-row.blade.php | 2 +- resources/views/backend/news/preview.blade.php | 12 ++++++++++++ .../views/includes/partials/event-preview.blade.php | 5 +++++ .../views/includes/partials/news-preview.blade.php | 5 +++++ 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 resources/views/includes/partials/event-preview.blade.php create mode 100644 resources/views/includes/partials/news-preview.blade.php diff --git a/resources/views/backend/event/index-table-row.blade.php b/resources/views/backend/event/index-table-row.blade.php index 1e8e394..6ccab86 100644 --- a/resources/views/backend/event/index-table-row.blade.php +++ b/resources/views/backend/event/index-table-row.blade.php @@ -47,7 +47,7 @@
- + + @include('includes.partials.event-preview')
@@ -20,6 +21,16 @@ @endif + @if($event->description) + @php + $words = str_word_count(strip_tags($event->description)); + $read_time = ceil($words / 200); + @endphp + + {{ $read_time }} mins read + + @endif +
@if($event->image) diff --git a/resources/views/backend/news/index-table-row.blade.php b/resources/views/backend/news/index-table-row.blade.php index 3795cfd..747adc5 100644 --- a/resources/views/backend/news/index-table-row.blade.php +++ b/resources/views/backend/news/index-table-row.blade.php @@ -31,7 +31,7 @@