added comment area & post view & time-spend

master
A1Gard 3 months ago
parent b42e1b460d
commit 1733b9c1c1

@ -17,6 +17,7 @@ class Area extends Model
'categories',
'categories_page',
'category',
'comments',
'clip',
'clips',
'comments',

@ -87,7 +87,7 @@ class Post extends Model implements HasMedia
$word = strlen(strip_tags($this->body));
$m = ceil($word / 1350);
return $m . ' ' . __('minute');
return $m . ' ' . __('minute(s)');
}

@ -39,7 +39,7 @@ class AreaSeeder extends Seeder
'name' => 'post',
'valid_segments' => json_encode(
["top", "header", "footer", "menu",
"parallax","other","post"]
"parallax", "other", "post", "comments"]
),
'max' => 6,
'preview' => 'client.post',

@ -3,12 +3,15 @@
<div class="p-2">
<h1>
{{$post->title}}
<span class="float-end text-muted">
Time spend: {{$post->spendTime()}}
</span>
</h1>
<img src="{{$post->orgUrl()}}" alt="" class="img-fluid">
<p class="text-muted my-3">
{{$post->subtitle}}
</p>
<div class="row">
<div class="row text-center">
<div class="col-md">
<i class="ri-calendar-line"></i>
{{$post->created_at->ldate('Y/m/d H:i')}}
@ -17,6 +20,11 @@
<i class="ri-message-line"></i>
{{number_format($post->approvedComments()->count())}}
</div>
<div class="col-md">
<i class="ri-eye-line"></i>
{{number_format($post->view)}}
</div>
@if($post->tags()->count() > 0)
<div class="col-md-6">
{{__("Tags")}}:
@foreach($post->tags as $tag)
@ -26,6 +34,7 @@
</a>
@endforeach
</div>
@endif
</div>
<hr>
{!! $post->body !!}

@ -4,6 +4,12 @@
font-size: 27px;
padding: 1rem;
color: var(--xshop-primary);
span{
font-size: 16px;
margin-top: 5px;
display: inline-block;
}
}
img{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 KiB

After

Width:  |  Height:  |  Size: 312 KiB

Loading…
Cancel
Save