<?php
/**
 * Modern post list item
 *
 * @package Multi
 */

?>
<?php
$multimagazine_args         = wp_parse_args( $args );
$multimagazine_post_classes = 'post-list-item post-modern col ' . $multimagazine_args['classes'];
if ( is_sticky( get_the_id() ) ) {
	$multimagazine_post_classes .= ' sticky';
}
if ( ! has_post_thumbnail() ) {
	$multimagazine_post_classes .= ' no-image';
}
?>
<article <?php post_class( $multimagazine_post_classes ); ?>>
	<div class="inside">
		<?php if ( has_post_thumbnail() ) : ?>
			<a href="<?php the_permalink(); ?>" class="post-thumbnail"><span class="img-border"><?php the_post_thumbnail( $multimagazine_args['thumbnail-size'] ); ?></span></a>
		<?php endif; ?>
		<div class="post-content">
			<?php if ( 'off' !== $multimagazine_args['show_cats'] ) : ?>
				<p class="post-meta"><?php the_category( ' ' ); ?></p>
			<?php endif; ?>
			<h2 class="post-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php multimagazine_the_title(); ?></a> <?php edit_post_link( esc_html__( 'Edit this entry', 'multimagazine' ), '', '' ); ?></h2>
			<?php if ( ! has_post_thumbnail() ) : ?>
				<div class="excerpt"><?php the_excerpt(); ?></div>
			<?php endif; ?>
		</div>
	</div>
</article>
