@extends('layouts.app')
@section('title')
Chapter -  {!!strip_tags($ebook->title)!!}
@parent
@stop

@section('metatags')
@php
$image_file_name=$ebook_volume_details[0]->image_file_name;
if(empty($image_file_name)) $image_file_name= 'no_image.jpg';
if(!(file_exists('images/bentham/'.$image_file_name))){
      $image_file_name = 'no_image.jpg';
}
  $image_url= 'http://'.$_SERVER['HTTP_HOST'].'/images/bentham/'.$image_file_name;
  $remchar =array('&lt;p&gt;','&lt;/p&gt;','"');//remove characters
  $txt_abstract=str_replace($remchar,"",strip_tags($chapter_details->abstract));   

  $url='http://'.$_SERVER['HTTP_HOST'].'/chapter/'.$chapter_details->chapter_id;
  $ebook_title = $ebook->title;
  $subtitle = $ebook->subtitle;
  $isbn = $ebook_volume_details[0]->isbn;
  if($CountMultipleVolumeExist > 0){
    $volumeLabel = 'Volume: '.$ebook_volume_details[0]->volume_name;
  }
  else{
    $volumeLabel = '';
  }
@endphp
    <meta property="og:type"   content="website" /> 
    <meta property="og:title" content="{{html_entity_decode($chapter_details->title)}}" />   
    <meta property="og:url" content="{{$url}}" />
    <meta property="og:image" content="{{$image_url}}" />
    <meta property="og:description" content="{{trim(strip_tags(preg_replace('/\n/', '<br>', $txt_abstract)))}}" />
    <meta property="og:site_name" content="http://{{$_SERVER['HTTP_HOST']}}" />


@endsection
@section('content')

<!----Banner Section Starts----> 

<!----Banner Section Ends----> 

<!----Main Section Starts (where all content bodies exist)----> 

<main>


<section>

<div class="container ">
  <div class="row">
	<div class="col-md-12 listing">
		<div class="card bigbox-hvr-slow bg-dark text-white">
      <div class="card-header border-bottom"><h3 class="my-0">{{$chapter_details->title}}</h3></div>
			<div class="card-body text-center">
				@if($DownloadAccess > 0)	
				
						@php echo $chapter_details->video_link; @endphp
				
				@else
					<span class="text-danger">You Are Not Authorized to Access This Page.</span>
				@endIf
			</div>
		</div>	  
	</div>
  </div>
</div>	
</section>
  
</main>


<!----Main Section Starts----> 
@endsection
@section('footer_scripts')


@stop

