<?php 
/**
 * Titan author
**/ 
?>
<?php get_header();
$t1t_category_post_style = get_option('t1t_category_post_style');
$author_show  = get_option('t1t_category_show_author');
$date_show  = get_option('t1t_category_show_date');
$t1t_category_big_post = get_option('t1t_category_big_post');
?>

<div id="main">
	<div id="primary" class="three-parts archive">
		<?php 
$t1tauthorbox = get_option('t1t_author_box'); if ($t1tauthorbox == "true") { ?>
		<?php $curauth = ( isset( $_GET['author_name'] ) ) ? get_user_by( 'slug', $author_name ) : get_userdata( intval( $author ) ); ?>
		<div id="author-info">
			<div id="author-image">
				<?php echo get_avatar( $curauth->ID, '150' ); ?>
			</div>
			<!--author-image-->
			<div id="author-desc">
				<h2>
					<?php echo $curauth->display_name; ?>
				</h2>
				<?php echo $curauth->description; ?>
				<ul class="author-social">
					<?php if($curauth->facebook) { ?>
					<li>
						<a href="http://facebook.com/<?php echo $curauth->facebook; ?>" class="fb-social-icon" target="_blank">
						</a>
					</li>
					<?php } ?>
					<?php if($curauth->twitter) { ?>
					<li>
						<a href="https://twitter.com/<?php echo $curauth->twitter; ?>" class="twitter-social-icon" target="_blank">
						</a>
					</li>
					<?php } ?>
					<?php if($curauth->google) { ?>
					<li>
						<a href="http://plus.google.com/<?php echo $curauth->google; ?>?rel=author" class="google-social-icon" target="_blank">
						</a>
					</li>
					<?php } ?>
					<?php if($curauth->pinterest) { ?>
					<li>
						<a href="http://www.pinterest.com/<?php echo $curauth->pinterest; ?>?rel=author" class="pinterest-social-icon" target="_blank">
						</a>
					</li>
					<?php } ?>
					<?php if($curauth->instagram) { ?>
					<li>
						<a href="http://www.instagram.com/<?php echo $curauth->instagram; ?>?rel=author" class="instagram-social-icon" target="_blank">
						</a>
					</li>
					<?php } ?>
				</ul>
			</div>
			<!--author-desc-->
		</div>
		<!--author-info-->
		<?php } ?>
		<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
		<div <?php if ( $t1t_category_post_style == 'style_1' ){echo 'class="blog-category"';}elseif( $t1t_category_post_style == 'style_2' ){echo 'class="t1t-blog-posts-category"';}elseif( $t1t_category_post_style == 'style_3' ){echo 'class="img-featured"';}?>>
			<ul>		
			<?php if (have_posts()) : while (have_posts()) : the_post();?>								
				<li>					
				<?php if ( $t1t_category_post_style == 'style_1' ){	
					category_post_style1($author_show, $date_show);	
					}elseif( $t1t_category_post_style == 'style_2' ){
					category_post_style2($author_show, $date_show);
					}elseif( $t1t_category_post_style == 'style_3' ){
					category_post_style3($author_show, $date_show);	
					}?>			
				</li>
				<?php endwhile; else : ?>
					<div class="widget-title"><?php echo 'Sorry, no posts matched your criteria.'; ?></div>
				<?php endif; wp_reset_query();?>
			</ul>
		</div>
	
		<div class="pagination">
			<?php t1t_pagination(); ?>
		</div>
		<!--pagination-->
	</div>
	<!--primary-->
	<div id="secondary">
		<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Category Sidebar')): endif; ?>
	</div>
	<!--secondary-->
</div>
<!--main-->
<?php get_footer(); ?>