media.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {{-- 분류/정렬/목록 수 --}}
  2. @include('mobile.board.component.tab')
  3. {{-- 공지사항 --}}
  4. @include('mobile.board.component.notice')
  5. {{-- 사진/동영상 게시글 --}}
  6. @if($posts->total > 0)
  7. <section>
  8. <div class="row row-cols-1 row-cols-xxs-2 row-cols-sm-3 row-cols-md-4 row-cols-lg-5 row-cols-xl-6 gx-2 gy-3">
  9. @foreach($posts->list as $row)
  10. <div class="col">
  11. <figure class="figure h-100 d-flex flex-column">
  12. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" class="ratio ratio-4x3">
  13. @if($row->thumbnail)
  14. <img src="{{ $row->thumbnail }}" class="figure-img img-fluid rounded object-fit-cover" alt="{{ $row->subject }}" onerror="{{ NO_IMAGE_NORMAL_SRC }}'"/>
  15. @else
  16. <img src="{{ NO_IMAGE_NORMAL_SRC }}" class="figure-img img-fluid rounded object-fit-cover" alt="No Image"/>
  17. @endif
  18. </a>
  19. <figcaption class="figure-caption">
  20. <p>
  21. @if($boardMeta->use_category && $row->categoryName)
  22. <label>
  23. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" class="me-0" rel="search">
  24. [{{ $row->categoryName }}]
  25. </a>
  26. </label>
  27. @endif
  28. @if($row->is_secret)
  29. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">
  30. <i class="fas fa-lock"></i> 비밀글입니다.
  31. </a>
  32. @elseif($row->isBlame)
  33. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  34. @else
  35. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" target="_self">{{ $row->subject }}</a>
  36. @endif
  37. @if($row->comment_rows > 0)
  38. <var>[{{ $row->comment_rows }}]</var>
  39. @endif
  40. @if($row->file_rows > 0)
  41. <i class="fas fa-save"></i>
  42. @endif
  43. @if($row->link_rows > 0)
  44. <i class="fas fa-external-link-alt"></i>
  45. @endif
  46. @if($row->image_rows > 0)
  47. <i class="fas fa-image"></i>
  48. @endif
  49. @if($row->isNew)
  50. <span class="badge bg-warning text-dark">New</span>
  51. @endif
  52. @if($row->isHot)
  53. <span class="badge bg-danger">Hot</span>
  54. @endif
  55. </p>
  56. </figcaption>
  57. <strong>{{ $row->user->name }}</strong>
  58. <small>{{ $row->createdAt }}</small>
  59. <ul>
  60. <li>조회 <small>{{ $row->hit }}</small></li>
  61. <li>좋아요 <small>{{ $row->like }}</small></li>
  62. </ul>
  63. </figure>
  64. </div>
  65. @endforeach
  66. </div>
  67. </section>
  68. @else
  69. <div class="p-5 text-center">
  70. 게시글이 존재하지 않습니다.
  71. </div>
  72. @endif
  73. @if($posts->total > 0)
  74. <div class="pagination">
  75. {{ $posts->list->onEachSide($params->pageCount)->links('mobile.board.component.pagination') }}
  76. </div>
  77. @endif