media.blade.php 3.8 KB

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