source: resources/views/blog/category.blade.php@ 0924b6c

Last change on this file since 0924b6c was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago

initial commit

  • Property mode set to 100644
File size: 1.8 KB
Line 
1@extends('layouts.blog')
2
3@section('title')
4{{ "Technoblog | " . $category->name }}
5@endsection
6
7@section('blog_content')
8
9 <div class="mainContent">
10
11 <div class="container-fluid">
12
13 <div class="row">
14
15 <style>
16 .default_sectionTitle_{{ strtolower($category->name) }}:before,
17 .default_sectionTitle_{{ strtolower($category->name) }} span,
18 .default_sectionTitle_{{ strtolower($category->name) }} a {
19 background: {{ $category->color }};
20 color: {{ $category->color }} !important;
21 }
22 </style>
23
24 <div class="col-md-12">
25 <header class="default_sectionTitle default_sectionTitle_{{ strtolower($category->name) }}"><span>TechnoBlog / {{ $category->name }}</span></header>
26 </div>
27
28 @for ($i = 0; $i < count($posts); $i++)
29
30 @if (count($posts) > 2)
31 @if ($i < 2) @php $strLimit = 200; $class = "col-md-6"; @endphp
32 @else @php $strLimit = 90; $class = "col-md-4"; @endphp @endif
33 @else @php $strLimit = 90; $class = "col-md-4"; @endphp @endif
34
35 <div class="{{ $class }} mb-4 post-item">
36 <div class="card">
37 <div class="card-img-top-wrapper">
38 <img class="card-img-top" src="/uploads/{{ $posts[$i]->image_link }}" alt="Card image cap">
39 </div>
40 <div class="card-body">
41 <h5 class="card-title">
42 <a href="/category/{{ strtolower($posts[$i]->category->name) }}/{{ $posts[$i]->slug }}">{{ $posts[$i]->title }}</a>
43 </h5>
44 <p class="card-text">{!! str_limit($posts[$i]->content, $strLimit) !!}</p>
45 </div>
46 <div class="card-footer">
47 <small class="text-muted">{{ $posts[$i]->ago() }}</small>
48 </div>
49 </div>
50 </div>
51 @endfor
52
53 <div class="col-md-12 mt-4 mb-5">
54 {{ $posts->links() }}
55 </div>
56
57 </div>
58
59 </div>
60
61 </div>
62
63@endsection
Note: See TracBrowser for help on using the repository browser.