latest.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. @if($boardMeta->show_list_from_view)
  2. <br/>
  3. @if($latest && $latest->total > 0)
  4. <div id="latest">
  5. @if($boardMeta->use_personal)
  6. {{-- 1:1문의 시작 --}}
  7. <table class="table">
  8. <tbody>
  9. @foreach($latest->list as $row)
  10. <tr>
  11. <td>
  12. <div class="row">
  13. <div class="col col-md-10">
  14. <p>
  15. @if($boardMeta->use_category && $row->categoryName)
  16. <label>
  17. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" class="me-0" rel="search">
  18. [{{ $row->categoryName }}]
  19. </a>
  20. </label>
  21. @endif
  22. @if($row->is_secret)
  23. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  24. <i class="fas fa-lock"></i> 비밀글입니다.
  25. </a>
  26. @elseif($row->isBlame)
  27. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  28. @else
  29. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  30. @endif
  31. @if($row->comment_rows > 0)
  32. <var>[{{ $row->comment_rows }}]</var>
  33. @endif
  34. @if($row->file_rows > 0)
  35. <i class="fas fa-save"></i>
  36. @endif
  37. @if($row->link_rows > 0)
  38. <i class="fas fa-external-link-alt"></i>
  39. @endif
  40. @if($row->image_rows > 0)
  41. <i class="fas fa-image"></i>
  42. @endif
  43. @if($row->isNew)
  44. <span class="badge bg-warning text-dark">New</span>
  45. @endif
  46. @if($row->isHot)
  47. <span class="badge bg-danger">Hot</span>
  48. @endif
  49. </p>
  50. <ul>
  51. <li>{{ $row->user->name }}</li>
  52. <li>{{ $row->createdAt }}</li>
  53. <li>조회 {{ $row->hit }}</li>
  54. <li>추천 {{ $row->like }}</li>
  55. </ul>
  56. </div>
  57. <div class="col-3 col-md-2 align-self-center text-end">
  58. @if($row->is_reply)
  59. <div class="badge bg-success p-2">답변완료</div>
  60. @else
  61. <div class="badge bg-secondary p-2">접수완료</div>
  62. @endif
  63. </div>
  64. </div>
  65. </td>
  66. </tr>
  67. @endforeach
  68. </tbody>
  69. </table>
  70. @if($latest->total > 0)
  71. <div class="pagination">
  72. {{ $latest->list->onEachSide($pageCount)->links('mobile.board.component.pagination') }}
  73. </div>
  74. @endif
  75. {{-- 1:1문의 종료 --}}
  76. @elseif($boardMeta->board_layout_type == BOARD_LAYOUT_NORMAL)
  77. {{-- 일반 게시글 시작 --}}
  78. <table class="table">
  79. <tbody>
  80. @foreach($latest->list as $row)
  81. <tr>
  82. <td>
  83. <div class="row">
  84. <div class="col col-md-10">
  85. <p>
  86. @if($boardMeta->use_category && $row->categoryName)
  87. <label>
  88. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" rel="search">
  89. [{{ $row->categoryName }}]
  90. </a>
  91. </label>
  92. @endif
  93. @if($row->is_secret)
  94. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  95. <i class="fas fa-lock"></i> 비밀글입니다.
  96. </a>
  97. @elseif($row->isBlame)
  98. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  99. @else
  100. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  101. @endif
  102. @if($row->comment_rows > 0)
  103. <var>[{{ $row->comment_rows }}]</var>
  104. @endif
  105. @if($row->file_rows > 0)
  106. <i class="fas fa-save"></i>
  107. @endif
  108. @if($row->link_rows > 0)
  109. <i class="fas fa-external-link-alt"></i>
  110. @endif
  111. @if($row->image_rows > 0)
  112. <i class="fas fa-image"></i>
  113. @endif
  114. @if($row->isNew)
  115. <span class="badge bg-warning text-dark">New</span>
  116. @endif
  117. @if($row->isHot)
  118. <span class="badge bg-danger">Hot</span>
  119. @endif
  120. </p>
  121. <ul>
  122. <li>{{ $row->user->name }}</li>
  123. <li>{{ $row->createdAt }}</li>
  124. <li>조회 {{ $row->hit }}</li>
  125. <li>추천 {{ $row->like }}</li>
  126. </ul>
  127. </div>
  128. @if($row->thumbnail)
  129. <div class="col-3 col-md-2 align-self-center">
  130. <div class="thumbnail">
  131. <img src="{{ $row->thumbnail }}" class="img-fluid rounded" alt="{{ $row->subject }}" onerror="this.src='{{ NO_IMAGE_NORMAL_SRC }}'"/>
  132. </div>
  133. </div>
  134. @endif
  135. </div>
  136. </td>
  137. </tr>
  138. @endforeach
  139. </tbody>
  140. </table>
  141. @if($latest->total > 0)
  142. <div class="pagination">
  143. {{ $latest->list->onEachSide($pageCount)->links('mobile.board.component.pagination') }}
  144. </div>
  145. @endif
  146. {{-- 일반 게시글 종료 --}}
  147. @elseif($boardMeta->board_layout_type == BOARD_LAYOUT_TYPE_1)
  148. {{-- 사진/동영상 게시글 시작 --}}
  149. @if($latest->total > 0)
  150. <section>
  151. <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">
  152. @foreach($latest->list as $row)
  153. <div class="col">
  154. <figure class="figure h-100 d-flex flex-column">
  155. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html" class="ratio ratio-4x3">
  156. @if($row->thumbnail)
  157. <img src="{{ $row->thumbnail }}" class="figure-img img-fluid rounded object-fit-cover" alt="{{ $row->subject }}" onerror="{{ NO_IMAGE_NORMAL_SRC }}'"/>
  158. @else
  159. <img src="{{ NO_IMAGE_NORMAL_SRC }}" class="figure-img img-fluid rounded object-fit-cover" alt="No Image"/>
  160. @endif
  161. </a>
  162. <figcaption class="figure-caption">
  163. <p>
  164. @if($boardMeta->use_category && $row->categoryName)
  165. <label>
  166. <a href="{{ $listURL }}?category={{ $row->board_category_id }}" rel="search">
  167. [{{ $row->categoryName }}]
  168. </a>
  169. </label>
  170. @endif
  171. @if($row->is_secret)
  172. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">
  173. <i class="fas fa-lock"></i> 비밀글입니다.
  174. </a>
  175. @elseif($row->isBlame)
  176. <i class="fas fa-ban"></i> <del>{{ $row->subject }}</del>
  177. @else
  178. <a href="{{ $row->viewURL }}" hreflang="ko" referrerpolicy="origin" type="text/html">{{ $row->subject }}</a>
  179. @endif
  180. @if($row->comment_rows > 0)
  181. <var>[{{ $row->comment_rows }}]</var>
  182. @endif
  183. @if($row->file_rows > 0)
  184. <i class="fas fa-save"></i>
  185. @endif
  186. @if($row->link_rows > 0)
  187. <i class="fas fa-external-link-alt"></i>
  188. @endif
  189. @if($row->image_rows > 0)
  190. <i class="fas fa-image"></i>
  191. @endif
  192. @if($row->isNew)
  193. <span class="badge bg-warning text-dark">New</span>
  194. @endif
  195. @if($row->isHot)
  196. <span class="badge bg-danger">Hot</span>
  197. @endif
  198. </p>
  199. </figcaption>
  200. <strong>{{ $row->user->name }}</strong>
  201. <ul>
  202. <li>{{ $row->createdAt }}</li>
  203. <li>조회 <small>{{ $row->hit }}</small></li>
  204. <li>좋아요 <small>{{ $row->like }}</small></li>
  205. </ul>
  206. </figure>
  207. </div>
  208. @endforeach
  209. </div>
  210. </section>
  211. @else
  212. <div class="p-5 text-center">
  213. 게시글이 존재하지 않습니다.
  214. </div>
  215. @endif
  216. @if($latest->total > 0)
  217. <div class="pagination">
  218. {{ $latest->list->onEachSide($pageCount)->links('mobile.board.component.pagination') }}
  219. </div>
  220. @endif
  221. {{-- 사진/동영상 게시글 종료 --}}
  222. @endif
  223. </div>
  224. @endif
  225. @endif
  226. @push('styles')
  227. <link rel="stylesheet" href="{{ asset('css/mobile/board/latest.css') }}"/>
  228. @endpush