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