<article role="main" itemscope itemtype="http://schema.org/NewsArticle" class="news__item" data-type="<?php echo e($post->type); ?>" data-id="<?php echo e($post->id); ?>" data-url="<?php echo e(makeposturl($post)); ?>" data-title="<?php echo e($post->title); ?>" data-description="<?php echo e($post->body); ?>" data-keywords="" data-share="0">
    <meta itemprop="mainEntityOfPage" content="<?php echo e(makeposturl($post)); ?>">
    <meta itemprop="dateModified" content="<?php echo e($post->created_at->toW3cString()); ?>"/>
    <meta itemprop="inLanguage" content="<?php echo e(getenvcong('sitelanguage')); ?>" />
    <meta itemprop="genre" content="news" name="medium" />


    <div class="content-body">
        <div class="content-body--left">
            <div class="content-sticky">

                <div class="content-share">
                    <a class="content-share__item facebook buzz-share-button" data-share-type="facebook" data-type="news" data-id="<?php echo e($post->id); ?>" data-post-url="/shared" data-title="<?php echo e($post->title); ?>" data-sef="<?php echo e(makeposturl($post)); ?>">
                        <div class="content-share__icon facebook-white"></div>
                        <?php if(isset($post->shared->facebook)): ?>
                        <div class="content-share__badge buzz-share-badge-facebook <?php echo e($post->shared->facebook > 0 ? 'is-visible': ''); ?> hide-phone"><?php echo e($post->shared->facebook); ?></div>
                        <?php endif; ?>
                    </a>
                    <a class="content-share__item twitter buzz-share-button" data-share-type="twitter" data-type="news" data-id="<?php echo e($post->id); ?>" data-post-url="/shared" data-title="<?php echo e($post->title); ?>" data-sef="<?php echo e(makeposturl($post)); ?>">
                        <div class="content-share__icon twitter-white"></div>
                        <?php if(isset($post->shared->twitter)): ?>
                        <div class="content-share__badge buzz-share-badge-twitter <?php echo e($post->shared->twitter > 0 ? 'is-visible': ''); ?> hide-phone"><?php echo e($post->shared->twitter); ?></div>
                        <?php endif; ?>
                    </a>
                    <a class="content-share__item gplus buzz-share-button" data-type="news" data-id="<?php echo e($post->id); ?>" data-share-type="gplus" data-post-url="/shared" data-title="<?php echo e($post->title); ?>" data-sef="<?php echo e(makeposturl($post)); ?>">
                        <div class="content-share__icon gplus-white"></div>
                        <?php if(isset($post->shared->gplus)): ?>
                        <div class="content-share__badge buzz-share-badge-gplus <?php echo e($post->shared->gplus > 0 ? 'is-visible': ''); ?> hide-phone"><?php echo e($post->shared->gplus); ?></div>
                        <?php endif; ?>
                    </a>
                    <a class="content-share__item whatsapp buzz-share-button visible-phone" data-type="news" data-id="<?php echo e($post->id); ?>" data-share-type="whatsapp" data-post-url="/shared" data-title="<?php echo e($post->title); ?>" data-sef="<?php echo e(makeposturl($post)); ?>">
                        <div class="content-share__icon whatsapp-white"></div>
                        <?php if(isset($post->shared->whatsapp)): ?>
                        <div class="content-share__badge buzz-share-badge-whatsapp <?php echo e($post->shared->whatsapp > 0 ? 'is-visible': ''); ?> hide-phone"><?php echo e($post->shared->whatsapp); ?></div>
                        <?php endif; ?>
                    </a>
                    <a class="content-share__item mail buzz-share-button" data-type="news" data-id="<?php echo e($post->id); ?>" data-share-type="mail" data-post-url="/shared" data-title="<?php echo e($post->title); ?>" data-sef="<?php echo e(makeposturl($post)); ?>">
                        <div class="content-share__icon mail-white"></div>
                        <?php if(isset($post->shared->mail)): ?>
                        <div class="content-share__badge buzz-share-badge-mail <?php echo e($post->shared->mail > 0 ? 'is-visible': ''); ?> hide-phone"><?php echo e($post->shared->mail); ?></div>
                        <?php endif; ?>
                    </a>
                </div>
                <div class="content-font hide-phone">
                    <div class="content-font__item has-dropdown" data-target="font-dropdown-<?php echo e($post->id); ?>" data-align="left-bottom">
                        <span class="content-font__icon"></span>
                    </div>
                    <div class="font-dropdown font-dropdown-<?php echo e($post->id); ?> dropdown-container">
                        <ul>
                            <li class="font-dropdown__item dropdown-container__item ripple has-ripple" data-action="minus">
                                <span class="font-dropdown__item__icon font-dropdown__item__icon--minus"></span>
                            </li>
                            <li class="font-dropdown__item dropdown-container__item ripple has-ripple" data-action="plus">
                                <span class="font-dropdown__item__icon font-dropdown__item__icon--plus"></span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="content-body--right">
            <?php if($post->approve == 'draft'): ?>
                <div class="label label-staff" ><?php echo e(trans('updates.thisdraftpost')); ?></div>
            <?php endif; ?>
            <div class="content-title">
                <h1 itemprop="headline"><a href="<?php echo e(makeposturl($post)); ?>"><?php echo e($post->title); ?></a></h1>
            </div>

            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('update-post', $post)): ?>
                  <div style="margin:5px 0">
                    <?php if(Auth::user()->usertype=='Admin'): ?>
                        <?php if($post->approve == 'no'): ?>
                            <a href="<?php echo e(action('Admin\PostsController@approvepost', $post->id)); ?>" class="button button-orange button-small" style="height:26px"><i class="material-icons" style="font-size: 18px;margin-top:-2px;vertical-align: middle">&#xE90A;</i> <?php echo e(trans('index.approve')); ?></a>
                        <?php endif; ?>
                    <?php else: ?>
                        <?php if($post->approve == 'no'): ?>
                            <a href="#" class="button button-orange button-small" style="cursor: default;height:26px"><i class="material-icons"  style="font-size: 18px;margin-top:-2px;vertical-align: middle">&#xE422;</i> <?php echo e(trans('index.waitapprove')); ?></a>
                        <?php endif; ?>
                    <?php endif; ?>

                    <?php if(getenvcong('UserEditPosts')=='yes' or Auth::user()->usertype=='Admin'): ?>
                        <a href="<?php echo e(action('PostsController@CreateEdit', [$post->id])); ?>" class="button button-green button-small" style="height:26px"><i class="material-icons " style="font-size: 18px;margin-top:-2px;vertical-align: middle">&#xE150;</i>  <?php echo e(trans('index.edit')); ?></a>
                    <?php endif; ?>
                    <?php if(getenvcong('UserDeletePosts')=='yes' or Auth::user()->usertype=='Admin'): ?>
                        <a href="<?php echo e(action('PostsController@sendtrashpost', [$post->id])); ?>" onclick="confim()" class="button button-red button-small " style="height:26px"><i class="material-icons" style="font-size: 18px;margin-top:-2px;vertical-align: middle">&#xE16C;</i></a>
                    <?php endif; ?>
                  </div>
            <?php endif; ?>

            <figure style="display: none" class="content-body__image" itemprop="image" itemscope="" itemtype="https://schema.org/ImageObject">
                <img class="lazy" data-original="<?php echo e(makepreview($post->thumb, 'b', 'posts')); ?>" alt="<?php echo e($post->title); ?>" width="788" style="display: block;">
                <meta itemprop="url" content="<?php echo e(makepreview($post->thumb, 'b', 'posts')); ?>">
                <meta itemprop="width" content="788">
                <meta itemprop="height" content="443">
            </figure>

            <div class="content-info">
                <div class="clearfix" itemprop="author" itemscope="" itemtype="http://schema.org/Person" >

                    <?php if(isset($post->user->username_slug)): ?>
                            <!-- publisher -->
                            <div itemprop="publisher" itemscope="" itemtype="https://schema.org/Organization">
                                <div itemprop="logo" itemscope="" itemtype="https://schema.org/ImageObject">
                                    <meta itemprop="url" content="<?php echo e(makepreview($post->user->icon , 'b', 'members/avatar')); ?>">
                                    <meta itemprop="width" content="200">
                                    <meta itemprop="height" content="200">
                                </div>
                                <meta itemprop="name" content="<?php echo e($post->user->username); ?>">
                                <?php if(isset($post->user->facebook)): ?><meta itemprop="sameAs" content="<?php echo e($post->user->facebook); ?>"><?php endif; ?>
                                <?php if(isset($post->user->twitter)): ?><meta itemprop="sameAs" content="<?php echo e($post->user->twitter); ?>"><?php endif; ?>
                            </div>

                        <div class="user-info <?php echo e($post->user->genre); ?> answerer">
                            <div class="avatar left">
                                <img src="<?php echo e(makepreview($post->user->icon , 's', 'members/avatar')); ?>" width="45" height="45" alt="<?php echo e($post->user->username); ?>">
                            </div>
                            <div class="info">


                                <a itemprop="name" class="content-info__author" href="<?php echo e(action('UsersController@index', [$post->user->username_slug ])); ?>" target="_self"><?php echo e($post->user->username); ?></a>

                                <?php if($post->user->usertype == 'Admin'): ?>
                                    <div class="label label-admin" style="margin-left:5px"><?php echo e(trans('updates.usertypeadmin')); ?></div>
                                <?php elseif($post->user->usertype == 'Staff'): ?>
                                    <div class="label label-staff" style="margin-left:5px"><?php echo e(trans('updates.usertypestaff')); ?></div>
                                <?php elseif($post->user->usertype == 'banned'): ?>
                                    <div class="label label-banned" style="margin-left:5px"><?php echo e(trans('updates.usertypebanned')); ?></div>
                                <?php endif; ?>


                                <div class="detail">

                                    <?php echo trans('index.postedon', ['time' => '<time  class="content-info__date" itemprop="datePublished" datetime="'.$post->published_at->toW3cString() .'">'.$post->published_at->diffForHumans() .'</time>' ]); ?>

                                    <?php if ( ! ($post->updated_at==$post->published_at)): ?>
                                        <div class="content-info__line">—</div> <?php echo trans('index.updatedon', ['time' => '<time class="content-info__date" itemprop="dateModified" datetime="'.$post->published_at->toW3cString() .'">'.$post->updated_at->diffForHumans() .'</time>' ]); ?>

                                    <?php endif; ?>
                                </div>

                            </div>
                        </div>
                    <div style="float:right;color:#888;width:60px;text-align:right;font-size:13px;margin-top: 2px">
                        <b><?php echo e(isset($post->popularityStats->all_time_stats) ? number_format($post->popularityStats->all_time_stats) : "0"); ?></b><br> <?php echo e(trans('updates.views')); ?>

                    </div>


                <?php if(isset($post->category->name_slug)): ?>
                        <div class="item_category">
                            <a href="<?php echo e(action('PagesController@showCategory', ['id' => $post->category->name_slug ])); ?>"><?php echo e($post->category->name); ?></a>
                        </div>
                    <?php endif; ?>



                    <?php endif; ?>

                </div>


            </div>
             <?php echo $__env->make('_particles.ads', ['position' => 'PostShareBw', 'width' => '788', 'height' => 'auto'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            <div class="content-body__description" itemprop="description"><?php echo nl2br($post->body); ?></div>


            <div class="content-body__detail" itemprop="articleBody">

                <?php echo $__env->make("_particles.lists.entryslists", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            </div>

            <!-- source url -->

            <!-- tags -->
            <?php if($post->tags != ""): ?>
            <div class="content-tag hide-mobiles">
                    <?php foreach(explode(',', $post->tags) as $tag): ?>
                    <span class="tagy"><a href="<?php echo e(action('PagesController@showtag', $tag)); ?>"><?php echo e($tag); ?></a></span>
                    <?php endforeach; ?>
            </div>
            <?php endif; ?>

             <?php echo $__env->make('_particles.ads', ['position' => 'PostBelow', 'width' => '788', 'height' => 'auto'], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            <?php echo $__env->make("_forms._reactionforms", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            <?php if(isset($commentson)): ?>
            <div class="content-comments">
                <div class="content-comments">
                    <?php if(getenvcong('p-easycomment')=='on'): ?>
                            <!-- easyComment Content Div -->
                    <div id="easyComment_Content"></div>
                    <br><br>
                    <!-- easyComment -->
                    <script type="text/javascript">
                        // CONFIGURATION VARIABLES
                        var easyComment_ContentID = 'Post_<?php echo e($post->id); ?>';
                        var easyComment_FooterLinks = 'Off'; // Disable footer links from the easyComment script for Buzzy Demo


                        /* * * DON'T EDIT BELOW THIS LINE * * */
                        var easyComment_Theme = '<?php echo e(getenvcong('easyCommentTheme') ? getenvcong('easyCommentTheme') : 'Default'); ?>';
                        var easyComment_Title = '<?php echo e(getenvcong('easyCommentTitle') ? getenvcong('easyCommentTitle') : 'Comments'); ?>';

                        var easyComment_userid = '<?php echo e(Auth::check() ? Auth::user()->id : ''); ?>';
                        var easyComment_username = '<?php echo e(Auth::check() ? Auth::user()->username : ''); ?>';
                        var easyComment_usericon = '<?php echo e(Auth::check() ? url(makepreview(Auth::user()->icon, 's', 'members/avatar')) : ''); ?>';
                        var easyComment_profillink = '<?php echo e(Auth::check() ? action('UsersController@index', [Auth::user()->username_slug ]) : ''); ?>';

                        var easyComment_Domain = '<?php echo e(getenvcong('easyCommentcode')); ?>';

                        (function() {
                            var EC = document.createElement('script');
                            EC.type = 'text/javascript';
                            EC.async = true;
                            EC.src = easyComment_Domain + 'plugin/embed.js';
                            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(EC);
                        })();
                    </script>

                    <?php endif; ?>

                    <?php if(getenvcong('p-facebookcomments')=='on'): ?>
                        <div class="colheader ">
                            <h1><?php echo e(trans('index.conversations')); ?></h1>
                        </div>

                        <div class="fb-comments" ref="<?php echo e(makeposturl($post)); ?>" data-numposts="5" data-width="100%" style="width: 100%"></div>

                        <style>.fb-comments{  width: 102%;}.fb_iframe_widget iframe{margin:-7px;    width: 102%;}</style>
   <br><br>
                    <?php endif; ?>
                    <?php if(getenvcong('p-disquscomments')=='on'): ?>
                        <div class="colheader ">
                            <h1><?php echo e(trans('index.disqusconversations')); ?></h1>
                        </div>
                        <div id="disqus_thread"></div>
                        <script>
                            /**
                             *  RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
                             *  LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
                             */
                            /*
                             var disqus_config = function () {
                             this.page.url = PAGE_URL;  // Replace PAGE_URL with your page's canonical URL variable
                             this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
                             };
                             */
                            (function() {  // DON'T EDIT BELOW THIS LINE
                                var d = document, s = d.createElement('script');

                                s.src = '//<?php echo getenvcong('DisqussCommentcode'); ?>.disqus.com/embed.js';

                                s.setAttribute('data-timestamp', +new Date());
                                (d.head || d.body).appendChild(s);
                            })();
                        </script>
                        <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>

                        <br><br>
                    <?php endif; ?>

                </div>

                <style> .fb_dialog{z-index:999999999} </style>
                <div id="fb-root"></div>
                <script>(function(d, s, id) {
                        var js, fjs = d.getElementsByTagName(s)[0];
                        if (d.getElementById(id)) return;
                        js = d.createElement(s); js.id = id;
                        js.src = "//connect.facebook.net/<?php echo e(getenvcong('sitelanguage') > "" ? getenvcong('sitelanguage') : 'en_US'); ?>/sdk.js#xfbml=1<?php echo getenvcong('facebookapp') > "" ? '&appId='.getenvcong('facebookapp') : ''; ?>&version=v2.7";
                        fjs.parentNode.insertBefore(js, fjs);
                    }(document, 'script', 'facebook-jssdk'));</script>

            </div>
            <?php endif; ?>

        </div>

    </div> <div class="clear"></div>
</article>
