123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- @extends('views.layouts.master')
- @section('content')
- <div class="sub_wrap blog blog_details">
- <div class="blog-details-part">
- <div class="container">
- <div class="row justify-content-center">
- <div class="col-lg-12 col-xl-10">
- <div class="blog-details">
- @switch($postType['C5'])
- @case('image')
- @case('gallery')
- <div class="blog-details-thumb">
- <img src="{{ msset($post['C1']) }}" alt="blog">
- </div>
- @break
- @case('movie')
- <div class="movie-details-thumb">
- <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>
- </div>
- @break
- @endswitch
- <div class="blog-details-content">
- <ul class="blog-details-meta">
- <li>
- <i class="fa-regular fa-calendar-days"></i>
- <span>{{ $post['C7'] }}</span>
- </li>
- <li>
- <i class="fa-solid fa-user"></i>
- <span>{{ $post['C11'] }}</span>
- </li>
- </ul>
- <h2 class="blog-details-title">{!! $post['C5'] !!}</h2>
- <div class="blog_cont_wrap">
- {!! $post['C6'] !!}
- </div>
- </div>
- <div class="blog_bottom">
- <div class="blog-details-navigate">
- @if ($prePost)
- <div class="blog-details-prev">
- <a class="nav-arrow" href="{{ route('dbrbbs.details', [$postCode, $prePost[0]['C3']]) }}"><i class="fa-solid fa-arrow-left"></i>이전</a>
- </div>
- @endif
- @if ($nextPost)
- <div class="blog-details-next">
- <a class="nav-arrow" href="{{ route('dbrbbs.details', [$postCode, $nextPost[0]['C3']]) }}">다음<i class="fa-solid fa-arrow-right"></i></a>
- </div>
- @endif
- </div>
- <div class="btn_wrap">
- <button type="button" class="btn btn_basic" onclick="location.href='{{ route('dbrbbs.list', $postCode) }}'">목록</button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 댓글 -->
- <div class="comments">
- <div class="row">
- <div class="col-lg-12 col-xl-10">
- <div class="comment_write">
- <h3>댓글쓰기</h3>
- <form class="form-prevent-multiple-submits" action="{{ route('dbrbbs.comment.store') }}" method="POST">
- @csrf
- <input type="hidden" name="post_id" value="{{ $post['Id'] }}">
- <textarea placeholder="댓글을 입력해 주세요." name="bd_contents" required></textarea>
- <button type="submit" class="button-prevent-multiple-submits btn btn_basic btn_mid">
- <i class="spinner fa fa-spinner fa-spin"></i>
- 댓글쓰기
- </button>
- </form>
- </div>
- <div class="comment_list">
- <ul>
- @forelse($comments ?? [] as $index => $comment)
- <li>
- <div class="info">
- <span class="img_box">
- <img src="/themes/pro/dasol/resources/images/pic4.jpg">
- </span>
- <span class="name">{{ $comment['C4'] }}</span>
- <span class="time">{{ DataConverter::execute($comment['C1'], 'diffForHumans') }}</span>
- <span class="btn_report"><i class="fa-solid fa-triangle-exclamation"></i> 신고</span>
- </div>
- <div class="comment_cont">
- {{ $comment['C3'] }}
- </div>
- <div class="btn_wrap">
- <button type="button" class="btn btn_outline" data-toggle="collapse" data-target="#reply_comment_{{ $comment['Id'] }}" aria-expanded="false" aria-controls="reply_comment">답글</button>
- <span class="btn_good">
- <button type="button" class="btn"><i class="far fa-thumbs-up"></i></button>000
- </span>
- <span class="btn_bad">
- <button type="button" class="btn"><i class="far fa-thumbs-down"></i></button>000
- </span>
- </div>
- <div class="collapse reply_write" id="reply_comment_{{ $comment['Id'] }}">
- <form class="form-prevent-multiple-submits" action="{{ route('dbrbbs.comment.store') }}" method="POST">
- @csrf
- <input type="hidden" name="post_id" value="{{ $post['Id'] }}">
- <input type="hidden" name="parent_id" value="{{ $comment['Id'] }}">
- <textarea placeholder="답글을 입력해 주세요." name="bd_contents" required></textarea>
- <button type="submit" class="button-prevent-multiple-submits btn btn_basic btn_mid">
- <i class="spinner fa fa-spinner fa-spin"></i>
- 답글쓰기
- </button>
- </form>
- </div>
- <!-- 댓글의 댓글 -->
- <div class="reply_wrap">
- <div class="comment_list">
- <ul>
- @forelse($comment['ReplyPage'] ?? [] as $reply)
- <!--1줄 -->
- <li>
- <div class="info">
- <span class="img_box">
- <img src="/themes/pro/dasol/resources/images/pic4.jpg">
- </span>
- <span class="name">{{ $reply['C4'] }}</span>
- <span class="time">{{ DataConverter::execute($reply['C1'], 'diffForHumans') }}</span>
- <span class="btn_report"><i class="fa-solid fa-triangle-exclamation"></i> 신고</span>
- </div>
- <div class="comment_cont">
- {{ $reply['C3'] }}
- </div>
- <div class="btn_wrap">
- <button type="button" class="btn btn_outline" data-toggle="collapse" data-target="#reply_comment1" aria-expanded="false" aria-controls="reply_comment1">답글</button>
- <span class="btn_good">
- <button type="button" class="btn"><i class="far fa-thumbs-up"></i></button>000
- </span>
- <span class="btn_bad">
- <button type="button" class="btn"><i class="far fa-thumbs-down"></i></button>000
- </span>
- </div>
- <div class="collapse reply_write" id="reply_comment1">
- <div>
- <textarea placeholder="답글을 입력해 주세요."></textarea>
- <button type="button" class="btn btn_basic btn_mid">답글쓰기</button>
- </div>
- </div>
- </li>
- @empty
- @endforelse
- </ul>
- </div>
- </div>
- <!--// 댓글의 댓글 끝 -->
- </li>
- @empty
- @endforelse
- </ul>
- </div>
- @if ($comments->hasPages())
- <!-- 페이지네이션 -->
- <div class="comment_btm">
- <div class="col-lg-12">
- <div class="bottom-paginate">
- {{ $comments->appends(['limit' => request('limit')])->links() }}
- </div>
- </div>
- </div>
- <!-- 페이지네이션 끝 -->
- @endif
- </div>
- </div>
- </div>
- <!--// 댓글 끝 -->
- </div>
- @endsection
|