<?php
/*
 *
 Template Name: Full Width
 *
 * This template is used to display full-width pages.
 *
 */ 
 get_header(); ?>

<?php if ( has_post_thumbnail()) { ?>
	
<?php } else { } ?>

<!-- #content -->
<div id="content">
	
	<!-- .row -->
	<div class="row">
    
        <!-- BEGIN .article -->
        <div class="article">
    
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            
            <h1 class="headline"><?php the_title(); ?></h1>
            <?php the_content(__("Read More", 'organicthemes')); ?>
            
            <?php wp_link_pages(array(
                'before' => '<p class="page-links"><span class="link-label">' . __('Pages:') . '</span>',
                'after' => '</p>',
                'link_before' => '<span>',
                'link_after' => '</span>',
                'next_or_number' => 'next_and_number',
                'nextpagelink' => __('Next'),
                'previouspagelink' => __('Previous'),
                'pagelink' => '%',
                'echo' => 1 )
            ); ?>
            
            <div class="clear"></div>
            <p><?php edit_post_link(__("(Edit)", 'organicthemes'), '', ''); ?></p> 
            
            <?php if(of_get_option('display_social_page') == '1') { ?>
            <div class="postmeta">
                <div class="social full">
                	<div class="like-btn">
                	  	<div class="fb-like" href="<?php the_permalink(); ?>" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false"></div>
                	</div>
                	<div class="pin-btn">
                		<a href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php $feat_image = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); echo $feat_image; ?>&description=<?php the_title(); ?>" class="pin-it-button" count-layout="horizontal" target="_blank"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>
                	</div>
                	<div class="tweet-btn">
                		<a href="http://twitter.com/share" class="twitter-share-button"
                		data-url="<?php the_permalink(); ?>"
                		data-via="<?php echo of_get_option('twitter_user'); ?>"
                		data-text="<?php the_title(); ?>"
                		data-related=""
                		data-count="horizontal"><?php _e("Tweet", 'organicthemes'); ?></a>
                	</div>
                	<div class="plus-btn">
                		<div class="g-plusone" data-size="medium" href="<?php the_permalink(); ?>"></div>
                	</div>
                </div>
            </div>
            <?php } else { ?>
            <?php } ?>
            
            <?php endwhile; else: ?>
            
            <p><?php _e("Sorry, no posts matched your criteria.", 'organicthemes'); ?></p><?php endif; ?>
        
        <!-- END .article -->
        </div>
        
    <!-- END .row -->
    </div>

<!-- END #content -->
</div>

<?php get_footer(); ?>