details.blade.php 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. @extends('views.layouts.master')
  2. @section('content')
  3. <div class="sub_wrap blog blog_details">
  4. <div class="blog-details-part">
  5. <div class="container">
  6. <div class="row justify-content-center">
  7. <div class="col-lg-12 col-xl-10">
  8. <div class="blog-details">
  9. @switch($postType['C5'])
  10. @case('image')
  11. @case('gallery')
  12. <div class="blog-details-thumb">
  13. <img src="{{ msset($post['C1']) }}" alt="blog">
  14. </div>
  15. @break
  16. @case('movie')
  17. <div class="movie-details-thumb">
  18. <iframe src="{{ $post['T1'] }}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
  19. </div>
  20. @break
  21. @endswitch
  22. <div class="blog-details-content">
  23. <ul class="blog-details-meta">
  24. <li>
  25. <i class="fa-regular fa-calendar-days"></i>
  26. <span>{{ $post['C7'] }}</span>
  27. </li>
  28. <li>
  29. <i class="fa-solid fa-user"></i>
  30. <span>{{ $post['C11'] }}</span>
  31. </li>
  32. </ul>
  33. <h2 class="blog-details-title">{!! $post['C5'] !!}</h2>
  34. <div class="blog_cont_wrap">
  35. {!! $post['C6'] !!}
  36. </div>
  37. </div>
  38. <div class="blog_bottom">
  39. <div class="blog-details-navigate">
  40. @if ($prePost)
  41. <div class="blog-details-prev">
  42. <a class="nav-arrow" href="{{ route('dbrbbs.details', [$postCode, $prePost[0]['C3']]) }}"><i class="fa-solid fa-arrow-left"></i>이전</a>
  43. </div>
  44. @endif
  45. @if ($nextPost)
  46. <div class="blog-details-next">
  47. <a class="nav-arrow" href="{{ route('dbrbbs.details', [$postCode, $nextPost[0]['C3']]) }}">다음<i class="fa-solid fa-arrow-right"></i></a>
  48. </div>
  49. @endif
  50. </div>
  51. <div class="btn_wrap">
  52. <button type="button" class="btn btn_basic" onclick="location.href='{{ route('dbrbbs.list', $postCode) }}'">목록</button>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- 댓글 -->
  61. <div class="comments">
  62. <div class="row">
  63. <div class="col-lg-12 col-xl-10">
  64. <div class="comment_write">
  65. <h3>댓글쓰기</h3>
  66. <form class="form-prevent-multiple-submits" action="{{ route('dbrbbs.comment.store') }}" method="POST">
  67. @csrf
  68. <input type="hidden" name="post_id" value="{{ $post['Id'] }}">
  69. <textarea placeholder="댓글을 입력해 주세요." name="bd_contents" required></textarea>
  70. <button type="submit" class="button-prevent-multiple-submits btn btn_basic btn_mid">
  71. <i class="spinner fa fa-spinner fa-spin"></i>
  72. 댓글쓰기
  73. </button>
  74. </form>
  75. </div>
  76. <div class="comment_list">
  77. <ul>
  78. @forelse($comments ?? [] as $index => $comment)
  79. <li>
  80. <div class="info">
  81. <span class="img_box">
  82. <img src="/themes/pro/dasol/resources/images/pic4.jpg">
  83. </span>
  84. <span class="name">{{ $comment['C4'] }}</span>
  85. <span class="time">{{ DataConverter::execute($comment['C1'], 'diffForHumans') }}</span>
  86. <span class="btn_report"><i class="fa-solid fa-triangle-exclamation"></i> 신고</span>
  87. </div>
  88. <div class="comment_cont">
  89. {{ $comment['C3'] }}
  90. </div>
  91. <div class="btn_wrap">
  92. <button type="button" class="btn btn_outline" data-toggle="collapse" data-target="#reply_comment_{{ $comment['Id'] }}" aria-expanded="false" aria-controls="reply_comment">답글</button>
  93. <span class="btn_good">
  94. <button type="button" class="btn"><i class="far fa-thumbs-up"></i></button>000
  95. </span>
  96. <span class="btn_bad">
  97. <button type="button" class="btn"><i class="far fa-thumbs-down"></i></button>000
  98. </span>
  99. </div>
  100. <div class="collapse reply_write" id="reply_comment_{{ $comment['Id'] }}">
  101. <form class="form-prevent-multiple-submits" action="{{ route('dbrbbs.comment.store') }}" method="POST">
  102. @csrf
  103. <input type="hidden" name="post_id" value="{{ $post['Id'] }}">
  104. <input type="hidden" name="parent_id" value="{{ $comment['Id'] }}">
  105. <textarea placeholder="답글을 입력해 주세요." name="bd_contents" required></textarea>
  106. <button type="submit" class="button-prevent-multiple-submits btn btn_basic btn_mid">
  107. <i class="spinner fa fa-spinner fa-spin"></i>
  108. 답글쓰기
  109. </button>
  110. </form>
  111. </div>
  112. <!-- 댓글의 댓글 -->
  113. <div class="reply_wrap">
  114. <div class="comment_list">
  115. <ul>
  116. @forelse($comment['ReplyPage'] ?? [] as $reply)
  117. <!--1줄 -->
  118. <li>
  119. <div class="info">
  120. <span class="img_box">
  121. <img src="/themes/pro/dasol/resources/images/pic4.jpg">
  122. </span>
  123. <span class="name">{{ $reply['C4'] }}</span>
  124. <span class="time">{{ DataConverter::execute($reply['C1'], 'diffForHumans') }}</span>
  125. <span class="btn_report"><i class="fa-solid fa-triangle-exclamation"></i> 신고</span>
  126. </div>
  127. <div class="comment_cont">
  128. {{ $reply['C3'] }}
  129. </div>
  130. <div class="btn_wrap">
  131. <button type="button" class="btn btn_outline" data-toggle="collapse" data-target="#reply_comment1" aria-expanded="false" aria-controls="reply_comment1">답글</button>
  132. <span class="btn_good">
  133. <button type="button" class="btn"><i class="far fa-thumbs-up"></i></button>000
  134. </span>
  135. <span class="btn_bad">
  136. <button type="button" class="btn"><i class="far fa-thumbs-down"></i></button>000
  137. </span>
  138. </div>
  139. <div class="collapse reply_write" id="reply_comment1">
  140. <div>
  141. <textarea placeholder="답글을 입력해 주세요."></textarea>
  142. <button type="button" class="btn btn_basic btn_mid">답글쓰기</button>
  143. </div>
  144. </div>
  145. </li>
  146. @empty
  147. @endforelse
  148. </ul>
  149. </div>
  150. </div>
  151. <!--// 댓글의 댓글 끝 -->
  152. </li>
  153. @empty
  154. @endforelse
  155. </ul>
  156. </div>
  157. @if ($comments->hasPages())
  158. <!-- 페이지네이션 -->
  159. <div class="comment_btm">
  160. <div class="col-lg-12">
  161. <div class="bottom-paginate">
  162. {{ $comments->appends(['limit' => request('limit')])->links() }}
  163. </div>
  164. </div>
  165. </div>
  166. <!-- 페이지네이션 끝 -->
  167. @endif
  168. </div>
  169. </div>
  170. </div>
  171. <!--// 댓글 끝 -->
  172. </div>
  173. @endsection