@extends('web.layout.mainx')
@section('content')
<div class="page-content mb-10">
    <div class="container">
		<br><br>
        <div class="page-content">
            <div class="container">
                <div class="row gutter-lg mb-10">
                    <div class="main-content">			
                        <article class="post post-classic overlay-zoom mb-4">
                            <figure class="post-media br-sm">
                                <img src="{{URL::to($post_data->image)}}" width="930"
                                        height="auto"  alt="blog">
                            </figure>
                            <div class="post-details">
                                <h4 class="post-title">
                                    <span>{{$post_data->title}}</span>
                                </h4>
                                <div class="post-content">{!! $post_data->details !!}</div>
                            </div>
                        </article>
                    </div>

                    <aside class="sidebar right-sidebar blog-sidebar sidebar-fixed sticky-sidebar-wrapper">
                        <div class="sidebar-overlay">
                            <a href="#" class="sidebar-close">
                                <i class="close-icon"></i>
                            </a>
                        </div>
                        <a href="#" class="sidebar-toggle">
                            <i class="fas fa-chevron-left"></i>
                        </a>
                        <div class="sidebar-content">
                            <div class="sticky-sidebar">
                                <div class="widget widget-search-form">
                                    <div class="widget-body">
                                        <form action="#" method="GET" class="input-wrapper input-wrapper-inline">
                                            <input type="text" class="form-control"
                                                placeholder="Search in Blog" autocomplete="off" required>
                                            <button class="btn btn-search"><i
                                                    class="w-icon-search"></i></button>
                                        </form>
                                    </div>
                                </div>

                                <!-- End of Widget categories -->
                                <div class="widget widget-posts">
                                    <h3 class="widget-title bb-no">Popular Posts</h3>
                                    <div class="widget-body">
                                        <div class="swiper">
                                            <div class="swiper-container swiper-theme nav-top" data-swiper-options="{
                                                'spaceBetween': 20,
                                                'slidesPerView': 1
                                            }">
                                                <div class="swiper-wrapper row cols-1">
                                                    <div class="swiper-slide widget-col">
														@foreach($popular as $pp)	
                                                        <div class="post-widget mb-4">
                                                            <figure class="post-media br-sm">
                                                                <center><img class="lazy" src="{{URL::to($pp->image)}}" style="height:100px;width:auto;background-color:#4b6e91;" /></center>
                                                            </figure>
                                                            <div class="post-details">
                                                                <div class="post-meta">
                                                                    <span class="post-date">{{ date_format(date_create($pp->created_at), 'd M Y') }}</span>
                                                                </div>
                                                                <h4 class="post-title">
                                                                    <a href="{{url('postdetails/'.$pp->id)}}">{{$pp->title}}</a>
                                                                </h4>
                                                            </div>
                                                        </div>
														@endforeach
                                                    </div>
                                                </div>
                                                <div class="swiper-button-next"></div>
                                                <div class="swiper-button-prev"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                               
                                <div class="widget widget-calendar">
                                    <h3 class="widget-title bb-no">Calendar</h3>
                                    <div class="widget-body">
                                        <div class="calendar-container" data-calendar-options="{
                                            'dayExcerpt': 1
                                        }"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </aside>
                </div>
            </div>
        </div>
    </div>	
</div>
@endsection