<div class="posts-header clearfix">
    <nav class="navbar navbar-default" role="navigation">
      <div class="container-fluid">
        <div class="navbar-header">
            <ol class="breadcrumb" itemprop="breadcrumb">
              <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$config.site_url}" itemprop="url"><i class="fa fa-home"></i> <span itemprop="title">{$config.site_name}</span></a></li>
              {if isset($post.cat.parent_catgory) == true}
                <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$post.cat.parent_catgory.url}" itemprop="url"><span itemprop="title">{$post.cat.parent_catgory.title}</span></a></li>
              {/if}
                <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$post.cat.url}" itemprop="url"><span itemprop="title">{$post.cat.title}</span></a></li>              
                <li class="active" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="{$post.url}" itemprop="url"><span itemprop="title">{$post.title}</span></a></li>
            </ol>      
        </div>
      </div>
    </nav>
</div>

<section class="boxed post-item no-js" itemscope itemtype="http://schema.org/Blog">
    <article itemprop="blogPost">
        <div class="post-header clearfix">
            {if $post.manage}   
                <div class="post-actions">  
                    <div class="btn-group">
                      <div class="btn-group">
                        <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">
                          <i class="fa fa-pencil"></i> {tr('edit')}
                          <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                          <li><a href="{$config.base_url}/edit.php?id={$post.id}&return={$return_url}"><i class="fa fa-pencil"></i> {tr('post_details')}</a></li>
                          {if $post.type == 2 && empty($post.provider) == true}  
                            <li><a href="{$config.base_url}/edit.php?id={$post.id}&mode=content&return={$return_url}"><i class="fa fa-pencil"></i> {tr('post_content')}</a></li>
                          {/if} 
                        </ul>
                      </div>
                      <a href="{$config.base_url}/panel.php?case=posts&action=delete&posts[]={$post.id}" class="btn btn-sm btn-danger"><i class="fa fa-times"></i> {tr('delete')}</a>
                    </div>  
                </div>         
            {/if}
             
        	 <ul class="vote vote-b hide-if-no-js" data-id="{$post.id}">
        		<li class="up upvote {if $post.vote.upvoted}upvote-on{/if}"><i class="fa fa-sort-up"></i></li>
        		<li class="total count" rel="tooltip" title="{tr('users_voted')}: {$post.vote.votes}">{$post.vote.total}</li>
                <li class="down downvote {if $post.vote.downvoted}downvote-on{/if}"><i class="fa fa-sort-down"></i></li>
        	</ul>      
              
            <h1 itemprop="name headline"><a href="{$post.url}" itemprop="url">{$post.title}</a></h1>    
        </div>
    
        <div class="row">
            <div class="col-md-8 col-sm-12 col-md-offset-2 col-sm-offset-0">
                <div class="post-content">
                    {ad_render size='468x60'}
                    <div itemprop="articleBody">{$post.content}</div>
                    {ad_render size='468x60'}           
                </div>                
                <ul class="post-details">
                    <li>
                        <i class="fa fa-user"></i> {$post.author}
                    </li>
                    
                    <li>
                        <i class="fa fa-clock-o"></i> {$post.time}
                    </li>
                
                    <li>
                        <i class="fa fa-eye"></i> {$post.views} {tr('view')}
                    </li>
                    
                    <li>
                        <i class="fa fa-comments"></i> {$post.comments} {tr('comment')}
                    </li>
    
                    {if empty($post.provider) == false}    
                        <li>
                            <a href="{$post.link}" target="_blank">
                                <i class="fa fa-{type2icon type=$post.type provider=$post.provider}"></i> {$post.provider|ucfirst}
                            </a>
                        </li>
                    {/if}
                     <li>
                        <div class="fb-like" data-href="{$post.absolute_url}" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div>  
                    </li>        
                    <li>
                        <div class="g-plusone" data-size="medium"></div>
                        <script type="text/javascript">
                          window.___gcfg = { lang: '{$config.lang}' };
                          (function() {
                            var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
                            po.src = 'https://apis.google.com/js/plusone.js';
                            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
                          })();
                        </script>    
                    </li>     
                    <li>
                        <a href="https://twitter.com/share" class="twitter-share-button" data-url="{$post.absolute_url}" data-text="{$post.title}" data-lang="{$config.lang}">{tr('tweet')}</a>
                        <script>!function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){ js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}( document,"script","twitter-wjs");</script>    
                    </li>            
                </ul>
                
                {if (boolean) $config.comments_box == true}
                    <div id="fb-comments">
                        <div class="fb-comments" data-width="100%" data-href="{$post.absolute_url}" data-numposts="10" data-colorscheme="light"></div>
                    </div>
                {/if}             
                                
            </div>
        </div>    
    </article> 
</section>
{if count($post.related) > 0}
    <h2>{tr('related_posts')}</h2>
    <ul class="posts-list-b" itemscope itemtype="http://schema.org/WebPage">{posts_list posts=$post.related style='b' url_attrs=['itemprop' => 'relatedLink']}</ul>  
{/if}