Skip to content

Commit 1931a9a

Browse files
committed
new features and a fix
1 parent a99e929 commit 1931a9a

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ After upgraded to latest version follows these steps:
141141
- run `php artisan vendor:publish --provider="WebDevEtc\BlogEtc\BlogEtcServiceProvider"`
142142

143143
## Version History
144+
- 7.2.2
145+
- bug fix: do not show search bar when it's disabled
146+
- feature: configure to show full text post or preview
144147
- 7.2.1 - adds logout button at admin panel
145148
- 7.2.0
146149
- adds sub-category functionality to blog

src/Config/blogetc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,6 @@
178178
'search_enabled' => true, //you can easily turn off search functionality
179179
],
180180

181-
'index_full_post' => false,
181+
//Shows full text of post in listing pages like search result page or category page. Now it shows a preview
182+
'show_full_text_at_list' => true,
182183
];

src/Views/blogetc/partials/index_loop.blade.php

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,29 @@
22
{{--See the guide on webdevetc.com for how to copy these files to your /resources/views/ directory--}}
33
{{--https://webdevetc.com/laravel/packages/blogetc-blog-system-for-your-laravel-app/help-documentation/laravel-blog-package-blogetc#guide_to_views--}}
44

5-
<div class="" style='max-width:600px; margin: 50px auto; background: #fffbea;border-radius:3px;padding:0;' >
5+
<div class="col-md-6">
6+
<div class="blog-item">
67

7-
<div class='text-center'>
8-
<?=$post->image_tag("medium", true, ''); ?>
9-
</div>
10-
<div style='padding:10px;'>
11-
<h3 class=''><a href='{{$post->url()}}'>{{$post->title}}</a></h3>
12-
<h5 class=''>{{$post->subtitle}}</h5>
8+
<div class='text-center blog-image'>
9+
<?=$post->image_tag("medium", true, ''); ?>
10+
</div>
11+
<div class="blog-inner-item">
12+
<h3 class=''><a href='{{$post->url()}}'>{{$post->title}}</a></h3>
13+
<h5 class=''>{{$post->subtitle}}</h5>
1314

14-
@if (config('index_full_post'))
15-
<p>{!! $post->post_body_output() !!}</p>
16-
@else
17-
<p>{!! mb_strimwidth($post->post_body_output(), 0, 400, "...") !!}</p>
18-
@endif
15+
@if (config('blogetc.show_full_text_at_list'))
16+
<p>{!! $post->post_body_output() !!}</p>
17+
@else
18+
<p>{!! mb_strimwidth($post->post_body_output(), 0, 400, "...") !!}</p>
19+
@endif
1920

20-
<div class='text-center'>
21-
<a href="{{$post->url()}}" class="btn btn-primary">View Post</a>
21+
<div class="post-details-bottom">
22+
<span class="light-text">Authored by: </span> {{$post->author->name}} <span class="light-text">Posted at: </span> {{date('d M Y ', strtotime($post->posted_at))}}
23+
</div>
24+
<div class='text-center'>
25+
<a href="{{$post->url()}}" class="btn btn-primary">View Post</a>
26+
</div>
2227
</div>
2328
</div>
24-
</div>
29+
30+
</div>

0 commit comments

Comments
 (0)