diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index a27fa1a..7876648 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -17,7 +17,7 @@ public function __construct() public function index() { // grab the latest posts - $posts = Post::where('published', true)->orderBy('published_at', 'desc')->take(5)->get(); + $posts = Post::where('published', true)->orderBy('published_at', 'desc')->take(2)->get(); return view('home.index', [ 'posts' => $posts diff --git a/public/assets/css/freelancer.css b/public/assets/css/freelancer.css index 364e4f2..85ff568 100644 --- a/public/assets/css/freelancer.css +++ b/public/assets/css/freelancer.css @@ -499,4 +499,9 @@ section.no-padding{ display: block; padding-top: 16px; font-size: 20px; +} + +.alert-custom { + background: #2c3e50; + color: #fff; } \ No newline at end of file diff --git a/resources/views/home/index.blade.php b/resources/views/home/index.blade.php index 9be463e..4cfc873 100644 --- a/resources/views/home/index.blade.php +++ b/resources/views/home/index.blade.php @@ -7,31 +7,65 @@
-

Recent Blog Posts

+

Most Recent Post


@foreach($posts as $post) -
+
-
-

- - {{ $post->title }} - - {{ date('F d, Y g:i A', strtotime($post->published_at)) }} ({{ $post->published_at->diffForHumans() }}) -

- {!! str_limit(strip_tags($post->content, '
'), 300) !!} -
- - read more - +
+

+ {{ $post->title }} +

+ +
+ Posted {{ date('F d, Y g:i A', strtotime($post->published_at)) }} ({{ $post->published_at->diffForHumans() }}) +
+ +
+ {!! $post->content !!} +
+ +
+
+ Share: +
+ +
-
+ +
+
+ Tags: +
+ @if($post->categories->count() > 0) + @foreach($post->categories as $idx => $category) + {{ $category->name }} @if($idx != (count($post->categories) - 1 )) | @endif + @endforeach + @else +
+

Sorry

+ There are no tags for this post +
+ @endif +
+ + @if(env('DISQUS_ENABLED', false)) + + @endif +
- @endforeach +
+ @endforeach
@@ -41,14 +75,14 @@
-

Want to see more entries?

+

There is tons more to read