<?php
/**
 * @package bloggr
*/
?>
<div id="post_<?php the_ID(); ?>" class="masonry-post"  onmouseover="mostrar_footer(<?php  '\''.the_ID().'\'';?>)" onmouseout="ocultar_footer(<?php  '\''.the_ID().'\'';?>)">
<article id="<?php the_ID(); ?>" <?php post_class(); ?>>
	<header class="entry-header">
	<div>
		<a href="<?php the_permalink(); ?>"> 
		<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
        </a>
        </div>
    	<div class="entry-meta">
		<?php bloggr_child_posted_on(); ?>
		</div><!-- .entry-meta -->
        <a href="<?php the_permalink(); ?>"> 
        <?php the_post_thumbnail('masonry-image'); ?>
        </a>
	 			 
	
	</header><!-- .entry-header -->

	<div class="archive-entry-content">
				 <?php
		if(  !has_post_thumbnail()){
 				if ( 'option2' == bloggr_sanitize_index_content( get_theme_mod( 'bloggr_post_content' ) ) ) : 
 				the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'bloggr' ) );
 				else :
 				the_excerpt( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'bloggr' ) );
 				endif; 
		}
		?> 
             <?php
			 $url_article = get_post_meta( $post->ID, 'url_article', true );
  			 $terms=wp_get_post_terms($post->ID,"fuente");			 
			 if(count($terms)):?>			 
			 <p class="action_source">
			
			<?php echo __( 'Source: ', 'bloggr' );?> <a href="<?php echo get_term_link($terms[0],'fuente')?>"><?php echo $terms[0]->name;?></a>  

			 </p>			 
			 <?php endif;?>		
			 
		<?php
		if ( 'post' == get_post_type() ) {
			/* translators: used between list items, there is a space after the comma */
			$categories_list = get_the_category_list( __( ', ', 'bloggr' ) );
			if ( $categories_list && bloggr_categorized_blog() ) {
				printf( '<span class="cat-links"><i class="fa fa-pencil"></i> ' . __( '%1$s', 'bloggr' ) . '</span>', $categories_list );
			}
		
			/* translators: used between list items, there is a space after the comma */
			$tags_list = get_the_tag_list( '', __( ', ', 'bloggr' ) );
			if ( $tags_list ) {
				printf( '<span class="tags-links"><i class="fa fa-tag"></i> ' . __( 'Tagged %1$s', 'bloggr' ) . '</span>', $tags_list );
			}
		}?>
		<?php
		
		$rel = get_user_relation_id( get_current_user_id() , 0, get_the_ID(), 'favorite' );
		if($rel):?>
			<i  id="icon_favourite_<?php echo $ID;?>" class="fa fa-heart" style="margin-left:25px;font-size:24px;color:red;cursor:pointer;" ></i>			 					
					 	    
			 <?php endif; ?>


		<?php
			wp_link_pages( array(
				'before' => '<div class="page-links">' . __( 'Pages:', 'bloggr' ),
				'after'  => '</div>',
			) );
		?>
	</div><!-- .entry-content -->

	<footer class="entry-footer-float" style= "visibility:hidden;" id="entry_footer_<?php the_ID();?>">
		<?php bloggr_entry_footer_ID(get_the_ID()); ?>
	</footer><!-- .entry-footer -->
	<div class="entry-footer-float-hidden" id="entry_footer_float_hidden_<?php the_ID();?>" style="visibility:hidden;">
				
		<div id="send_to_panel_<?php the_ID();?>"	style="visibility:hidden;" class="entry-footer-float-hidden-panel">
		   <p class="action_email"  >
		   	<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?><br>
			 <?php _e('Send to:','ainia');?>
		   <input type="text" id="email_<?php the_ID();?>"  style="width:auto" size="20">
		    <input type="button" value="<?php _e('Send','ainia');?>" onclick="enviaPorEmail(<?php the_ID();?>)">
		     <input type="button" value="<?php _e('Cancel','ainia');?>" onclick="ocultar_enviar_a(<?php the_ID();?>)">
		   </p>
		  </div>
		 <div id="recommend_to_panel_<?php the_ID();?>"	style="visibility:hidden;" class="entry-footer-float-hidden-panel">
		 	<p class="action_recommend"  >
		 		<?php the_title( '<h2 class="entry-title">', '</h2>' ); ?><br>
			 <?php _e('Recommend to:','ainia');?>
			 <?php wp_dropdown_users(array('show_option_none' => '-','exclude'=>array(1)));?>
			 <input type="button" value="<?php _e('Send','ainia');?>" onclick="recomendarPost(<?php the_ID();?>)">
			  <input type="button" value="<?php _e('Cancel','ainia');?>" onclick="ocultar_recomendar_a(<?php the_ID();?>)">
			
			 </p>
			 </div>
	</div>
</article><!-- #post-## -->
</div>