diff --git a/resources/views/platform/_news-card.blade.php b/resources/views/platform/_news-card.blade.php new file mode 100644 index 0000000..55ce0e7 --- /dev/null +++ b/resources/views/platform/_news-card.blade.php @@ -0,0 +1,12 @@ +
+
+ {{ $post->title }} + + Posted {{ $post->created_at->diffForHumansAt() }} + +
+
+ {!! \Markdown::convertToHtml($post->content) !!} +
+
diff --git a/resources/views/platform/admin/news/_card.blade.php b/resources/views/platform/admin/news/_card.blade.php index da1af22..19ed068 100644 --- a/resources/views/platform/admin/news/_card.blade.php +++ b/resources/views/platform/admin/news/_card.blade.php @@ -1,4 +1,4 @@ -
+
News
@endcomponent + + @include('platform._news-card', ['post' => $news]) @endsection diff --git a/resources/views/platform/dashboard.blade.php b/resources/views/platform/dashboard.blade.php index 7794a8d..6b3432a 100644 --- a/resources/views/platform/dashboard.blade.php +++ b/resources/views/platform/dashboard.blade.php @@ -3,18 +3,7 @@ @section('content') @if($news->isNotEmpty()) @foreach($news as $post) -
-
- {{ $post->title }} - - Posted {{ $post->created_at->diffForHumansAt() }} - -
-
- {!! \Markdown::convertToHtml($post->content) !!} -
-
+ @include('platform._news-card') @endforeach
{{ $news->links() }}