<?php 
$ep = GOV_anime::get_latest_chapters(get_the_ID(), TRUE);
$latest = $ep['chapter'];
$latestvol = isset($ep['volume']) ? $ep['volume'] : '';
$latest_post = new GOV_post($ep['id']);
$latest_post = $latest_post->get_post();
$score = get_post_meta(get_the_ID(),'ero_score',true);
$genre = ts_tax_char(get_the_ID(),'2','genre','# ');
?>
<article class="maindet" itemscope="itemscope" itemtype="http://schema.org/CreativeWork">
	<div class="inmain">
		<div class="mdthumb">
			<a href="<?php echo get_permalink(FALSE); ?>" title="<?php echo get_the_title(FALSE); ?>" class="tip" rel="<?php the_ID(); ?>">
				<?php echo Lightnovel::get_post_thumbnail(get_the_ID(), 'full', 215, 151, array('itemprop'=>'image','title'=>get_the_title(FALSE),'alt'=>get_the_title(FALSE))); ?>
			</a>
		</div>
		<div class="mdinfo">
			<?php if($genre){ echo '<span class="mdgenre">'.$genre.'</span>'; } ?>
			<h2 itemprop="headline"><a href="<?php echo get_permalink(FALSE); ?>" title="<?php echo get_the_title(FALSE); ?>" class="tip" rel="<?php the_ID(); ?>"><?php the_title(); ?></a></h2>
			<div class="contexcerpt"><?php the_excerpt(); ?></div>
			<div class="mdinfodet">
				<?php if($score){ echo '<span class="mdminf"><i class="fas fa-star"></i> '.$score.'</span>'; } ?>
				<?php if($latest){ ?>
				<span class="nchapter"><a href="<?php echo get_permalink($latest_post); ?>"><i class="fas fa-file-alt"></i> <?php if($latestvol){ echo GOV_lang::get('thumbnail_volume_min_label')." ".$latestvol." "; } ?><?php echo GOV_lang::get('thumbnail_chapter_min_label');?> <?php echo $latest; ?></a></span>
				<?php } ?>
			</div>
		</div>
	</div>
</article>