@extends('backend.layouts.app')
@section('content')
<style>
   table {
    table-layout: fixed; /* Ensure table layout is fixed */
    width: 100%; /* Use full width */
}
</style>
<div class="row page-titles">
   <div class="col-md-5 align-self-center">
      <h4 class="text-themecolor">Blog Manager</h4>
   </div>
   <div class="col-md-7 align-self-center text-right">
      <div class="d-flex justify-content-end align-items-center">
         <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="{{ route('dashboard') }}">Dashboard</a></li>
            <li class="breadcrumb-item "><a href="{{ route('blog') }}">Blog Manager</a></li>
            <li class="breadcrumb-item active">View Blog Manager</li>
         </ol>
         @can('CMS Pages-edit')
         <a href="{{ route('blog.edit',['id' => $blogs->id] + request()->query()) }}"> <button type="button" class="btn btn-info d-none d-lg-block m-l-15"><i class="fa fa-edit"></i> Edit</button></a>
      @endcan
        </div>
   </div>
</div>
<div class="container-fluid">
        <section class="content">

                <div class="row">
                    <div class="col-12">
                        <div class="card">

                            <div class="card-body">
                            <div class="card-title" style="width:100%;display: inline-block;">
                                   <span class="caption-subject font-green bold uppercase">View Blog</span>
                                <a href="{{ route('blog') }}"> <button type="button" class="btn btn-primary btn-sm float-right"><i class="fa fa-arrow-left"></i> Back</button></a>

                                </div>
                                <table id="example2" class="table table-bordered table-striped">

                                    <tbody>
                                        <tr>
                                            <th>Title</th>
                                            <td>{{ $blogs->title ?? '-'}}</td>
                                        </tr>
                                        <tr>
                                            <th>Name</th>
                                            <td>{{ $blogs->name ?? '-'}}</td>
                                        </tr>

                                        <tr>
                                            <th>Slug</th>
                                            <td>{{ $blogs->slug ?? '-'}}</td>
                                        </tr>
                                        <tr>
                                            <th>Meta Title</th>
                                            <td>{{ $blogs->meta_title ?? '-' }}</td>
                                        </tr>
                                        <tr>
                                            <th>Meta Keyword</th>
                                            <td>{{ $blogs->meta_keyword ?? '-' }}</td>
                                        </tr>

                                        <tr>
                                            <th>Meta Description</th>
                                            <td>{!! $blogs->meta_description ?? '-' !!}</td>
                                        </tr>
                                        <tr>
                                            <th>Description</th>
                                            <td>{!! $blogs->description ?? '-' !!}</td>
                                        </tr>
                                        @if($blogs->cover_letter)
                                        <tr>
                                            <th>Cover letter</th>
                                            <td> <a target='_blank' href="{{ asset('images/blogs/coverletter/' . $blogs->cover_letter) }}">
                                                <img style="height: 50px;" src="{{ asset('images/blogs/coverletter/' . $blogs->cover_letter) }}" alt="Image"></a></td>
                                        </tr>
                                        @endif

                                        {{-- <tr>
                                            <th>Images</th>
                                            <td>  @if(isset($blogImages))
                                                @foreach ($blogImages as $key => $image)

                                                <a target='_blank' href="{{ asset('images/blogs/images/' . $image) }}">
                                                    <img style="height: 50px;" src="{{ asset('images/blogs/images/' . $image) }}" alt="Image"></a>
                                                    @endforeach
                                                    @endif
                                                </td>

                                        </tr> --}}





                                        <tr>
                                            <th>Created At</th>
                                            <td>{{ $blogs->created_at->format(config('GET.admin_date_time_format') ?? 'Y-m-d ') }}</td>
                                        </tr>
                                        <tr>
                                            <th>Updated At</th>
                                            <td>{{ $blogs->created_at->format(config('GET.admin_date_time_format') ?? 'Y-m-d ') }}</td>
                                        </tr>
                                        <tr>
                                            <th>Status</th>
                                            <td>@if ($blogs->status == 1) <span class="label label-success label-rounded">Active</span> @else <span class="label label-danger label-rounded">Inactive </span>@endif</td>
                                        </tr>
                                    </tbody>
                                </table>

                            </div>

                        </div>

                    </div>

                </div>


            </div>
         </div>
       </div>
     </div>
    </section>
  </div>


@stop
