Skip to content

Commit a99e929

Browse files
authored
Merge pull request #9 from wast/patch-3
Configurable full post size on index - has bug
2 parents d3175a6 + 8a4d9c4 commit a99e929

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

src/Config/blogetc.php

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

181-
];
181+
'index_full_post' => false,
182+
];

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

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@
55
<div class="" style='max-width:600px; margin: 50px auto; background: #fffbea;border-radius:3px;padding:0;' >
66

77
<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+
<?=$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>
1313

14-
<p>{!! mb_strimwidth($post->post_body_output(), 0, 400, "...") !!}</p>
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
1519

16-
<div class='text-center'>
17-
<a href="{{$post->url()}}" class="btn btn-primary">View Post</a>
18-
</div>
20+
<div class='text-center'>
21+
<a href="{{$post->url()}}" class="btn btn-primary">View Post</a>
1922
</div>
23+
</div>
2024
</div>

0 commit comments

Comments
 (0)