|
7 | 7 | @section('content') |
8 | 8 | <main class="py-4" style="min-height: 88vh"> |
9 | 9 | <div class="container"> |
10 | | - <section class="news-section news mb-2"> |
11 | | - <h2 class="news__header">News</h2> |
| 10 | + <section class="news-section news mb-2 row"> |
| 11 | + <h2 class="news__header col-12 order-2 order-sm-0">News</h2> |
12 | 12 |
|
13 | | - <div class="news-section__news new row flex-wrap"> |
| 13 | + <div class="news-section__news new col-sm-8 col-lg-10 order-2 order-sm-0"> |
14 | 14 | @forelse($news as $new) |
15 | 15 | <div class="new__item d-flex col-md-6 "> |
16 | | - <div class="new__heading d-flex flex-column p-3 border rounded mb-4 shadow-sm"> |
| 16 | + <div class="new__heading d-flex flex-column p-3 w-100 border rounded mb-4 shadow-sm"> |
17 | 17 | <strong class="mb-2 text-primary">new #{{ $new->id }}</strong> |
18 | 18 |
|
19 | 19 | <h3 class="new__name mb-0">{{ $new->name }}</h3> |
|
22 | 22 |
|
23 | 23 | <p class="new__preview card-text flex-grow-1 text-justify"> {{ str_limit($new->text, $limit = 200, $end = '...') }} </p> |
24 | 24 |
|
25 | | - <div class="d-flex justify-content-end"> |
| 25 | + @if($new->tags->isNotEmpty()) |
| 26 | + <div class="post__tags mb-2"> |
| 27 | + @foreach($new->tags as $tag) |
| 28 | + <span class="badge badge-info text-white">{{ $tag->name }}</span> |
| 29 | + @endforeach |
| 30 | + </div> |
| 31 | + @endif |
| 32 | + |
| 33 | + <div class="new__actions d-flex justify-content-end"> |
26 | 34 | <a href="{{ route('news.show', $new) }}" class="btn btn-outline-secondary" style="width: 80px; font-size: 0.7rem">Read</a> |
27 | 35 |
|
28 | 36 | <a href="{{ route('news.edit', $new) }}" class="btn btn-outline-secondary mx-1" style="width: 80px; font-size: 0.7rem">Edit</a> |
|
33 | 41 |
|
34 | 42 | <button type="submit" class="btn btn-outline-secondary" style="width: 80px; font-size: 0.7rem">Delete</button> |
35 | 43 | </form> |
36 | | - |
37 | | -{{-- <a href="{{ route('news.destroy', $new) }}" class="btn btn-outline-secondary ml-1" style="width: 80px; font-size: 0.7rem">Delete</a>--}} |
38 | 44 | </div> |
39 | 45 | </div> |
40 | 46 | </div> |
|
0 commit comments