@extends('backend.home.index')
@push('header','Beranda')
@section('content')


<div class="panel-container show">
    @csrf
    <div class="panel-content">
      
    </div>
</div>

<div class="container-fluid mt-100">
    <div class="row">
    
        <div class="col-md-12">
            <div class="card mb-4">
                <div class="card-header">
                    <div class="media flex-wrap w-100 align-items-center"> <img src="https://i.imgur.com/iNmBizf.jpg" class="d-block ui-w-40 rounded-circle" alt="">
                        <div class="media-body ml-3"> <a href="javascript:void(0)" data-abc="true">updated at</a>
                            <div class="text-muted small">Created at $eoffice->created_at </div>
                        </div>
                        <div class="text-muted small ml-3">
                            <div>Updated at $eoffice->updated_at <strong></strong></div>
                            <div><strong>134</strong> posts</div>
                        </div>
                    </div>
                </div>
                <div class="card-body">
                    <h3>  $eoffice->judul  </h3>
                    <p>  $eoffice->konten  </p>
                </div>
                <div class="card-footer d-flex flex-wrap justify-content-between align-items-center px-0 pt-0 pb-3">
                    <div class="px-4 pt-3"> <a href="javascript:void(0)" class="text-muted d-inline-flex align-items-center align-middle" data-abc="true"> <i class="fa fa-heart text-danger"></i>&nbsp; <span class="align-middle">445</span> </a> <span class="text-muted d-inline-flex align-items-center align-middle ml-4"> <i class="fa fa-eye text-muted fsize-3"></i>&nbsp; <span class="align-middle">14532</span> </span> </div>
                    
                    <div class="px-4 pt-3"> <button href="#" type="button" class="btn btn-primary" id="komentar-utama" name="komentar-utama"><i class="ion ion-md-create"></i>&nbsp; Komentar</button> </div>
                    <!-- <form action="" style="display: none !important;" class="form-control" method="POST" id="form-komentar" name="form-komentar">  -->
                        <div class=" w-100 ml-2 mt-2">
                    <form action="" style="display: none !important;" id="form-komentar" method="GET">
                    <input type="hidden" name="forum_id" value="2">
                    <input type="hidden" name="parent" value="0"/> 
                    <textarea style="display: none !important;"  class="form-control w-80 mt-2 " name="konten" id="konten"></textarea>

                    <div class=" comment-area "> 
                         <button style="display: none !important;" class="btn btn-secondary btn-block mt-2 post-btn" id="post-komentar" name="post-komentar" href="#">Post</button> 
                        </div>
</div>
        
</form>
</div>
</div>
</div>

</div>
</div>
@endsection
@push('js')
@include('backend.home.datatable-js')
<!-- <script type="text/javascript" src="{{ URL::asset('ojisatriani/'. $halaman->kode .'/jquery.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('ojisatriani/'. $halaman->kode .'/datatables.js') }}"></script> -->
<script type="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="javascript" src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"></script>


<script>
    $(document).ready(function(){
            $('#komentar-utama').click(function(){
                 $('#form-komentar').toggle('fade');
                
            })
        });
        // $(document).ready(function(){
        //     $('#komentar-utama').click(function(){
        //          $('#konten').toggle('slide');
                
        //     })
        // });

        $(document).ready(function(){
            $('#komentar-utama').click(function(){
                 $('#post-komentar').toggle('slide');
                
            })
        });
        </script>

@endpush
@push('css')
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-alpha1/dist/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-alpha1/dist/js/bootstrap.bundle.min.js"/>


@include('backend.home.datatable-css')
@endpush
