@extends('webprofile.front.jollyany.master2')

@section('meta')
  <title>{{$data->title}}</title>
  <meta name="description" content="{!! strip_tags(substr(html_entity_decode($data->content,ENT_COMPAT,"UTF-8"),0 , 200)) !!}">
  <meta name="keywords" content="{{ $data->keys }}">
  <meta name="author" content="{{ $setting['header_admin'] }}">
@endsection

@section('content')
  <section class="post-wrapper-top jt-shadow clearfix">
    <div class="container">
      <div class="col-lg-12">
          <h2>{!! $data->title !!}</h2>
      </div>
    </div>
  </section><!-- end post-wrapper-top -->

  <section class="blog-wrapper">
    <div class="container">
        <div class="row">
          <div id="main-content" class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
            <div class="row">
              <div class="blog-masonry">
                <div class="col-lg-12">
                  <div class="blog-carousel">
                    <div class="blog-carousel-header">
                      <h1>{!! $data->title !!}</h1>
                      <div class="blog-carousel-meta">
                          <span><i class="fa fa-calendar"></i>
                          <time title="{!! $data->post_data !!}" datetime="{!! $data->post_data !!}">{!! InseoHelper::tglbulanindo2($data->post_date) !!}</time> - kategori <a href="#">{!! $data->rCategory->name !!}</a></span>
                          <span><i class="fa fa-eye"></i> <a href="#">{!! $data->viewer !!} Views</a></span>
                          {{-- <span><i class="fa fa-user"></i> <a href="#">Redaksi</a></span> --}}
                      </div><!-- end blog-carousel-meta -->
                    </div><!-- end blog-carousel-header -->
                    <div class="blog-carousel-desc">
                      @if ($data->thumbnail)
                      @if($data->cover_status == 1)
                      <center>
                        @if ($setting['external_storage'] == 1)
                        <img src="{{ $setting['url_static'] . '/' . $setting['directory'] . '/thumbnail/' . $data->thumbnail }}" alt=""  style="max-width:708px">
                        @else
                        <img src="{{ url('/storage/thumbnail/' . $data->thumbnail) }}" alt=""  style="max-width:708px">
                        @endif
                      </center>
                      @endif
                      @endif
                      <br>
                      <div class="widget col-md-4 pull-right related hidden-sm hidden-xs kaitan" style="margin-bottom: 5px;">
                        <h4 class="h4_kaitan"><strong>berita terkait </strong></h4>
                        <div class="isi_kaitan">
                          <div class="content_kaitan">
                              <ul class="ul_kaitan nav nav-tabs nav-stacked">
                                @foreach($terkait as $valTerkait)
                                <li><strong><a title="{!! $valTerkait->title !!}" href="{!! url('post/'.$valTerkait->slug) !!}">{!! $valTerkait->title !!}</a></strong></li>
                                @endforeach
                              </ul>
                          </div>
                        </div>
                      </div>
                      {!! $data->content !!}
                      {{-- $shareComponent --}}
                      <p>
                       <i><b>Share It On:</b></i> </p>
                       <div class="social-icons">
                        <span>
                          <a data-toggle="tooltip" data-placement="bottom" target="_blank" title="Facebook" href="https://www.facebook.com/sharer.php?u={!! url('post/'.$data->slug) !!}" data-original-title="" style="background-color: #1877f2;"><i class="fa fa-facebook" style="color: white;"></i></a>
                        </span>

                        <span>
                          <a data-toggle="tooltip" data-placement="bottom" target="_blank" title="Twitter" href="https://twitter.com/share?url={!! url('/') !!}&amp;text={!! url($data->title) !!}&amp;hashtags={!! $data->rCategory->name !!}" data-original-title="" style="background-color: #55acee;"><i class="fa fa-twitter" style="color: white;"></i></a>
                        </span>

                        <span>
                          <a data-toggle="tooltip" data-placement="bottom" target="_blank" title="Linkedin" href="http://www.linkedin.com/shareArticle?mini=true&amp;url={!! url('post/'.$data->slug) !!}" data-original-title="" style="background-color: #007bb5;"><i class="fa fa-linkedin" style="color: white;"></i></a>
                        </span>

                        <span>
                          <a data-toggle="tooltip" data-placement="bottom" target="_blank" title="Email" href="mailto:?Subject={!! $data->rCategory->name !!}&amp;Body={!! url($data->title) !!} {!! url('post/'.$data->slug) !!}" data-original-title="" style="background-color: #0166ff;"><i class="fa fa-envelope" style="color: white;"></i></a>
                        </span>

                        <span>
                          <a data-toggle="tooltip" data-placement="bottom" target="_blank" title="Whatsapp" href="https://wa.me/?text={!! url('post/'.$data->slug) !!}" data-original-title="" style="background-color: #12af0a;"><i class="fa fa-phone" style="color: white;"></i></a>
                        </span>

                        <span class="last">
                          <a data-toggle="tooltip" data-placement="bottom" target="_blank" title="" href="https://telegram.me/share/url?url={!! url('post/'.$data->slug) !!}&amp;text={!! url($data->title) !!}" data-original-title="Telegram" style="background-color: #2ca5e0;"><i class="fa fa-location-arrow" style="color: white;"></i></a>
                        </span>
                      </div>
                    
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          @include('webprofile.front.jollyany.widget')
        </div>
    </div><!-- end container -->
  </section><!--end white-wrapper -->

@endsection
