<section id="page">
		
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <article id="post-<?php the_ID(); ?>" <?php post_class("post-item clearfix"); ?>>

                <?php
                $terms = wp_get_post_terms($post->ID, 'cons');
                $featured_image = THEMEMAKERS_THEME_URI . '/images/no-image.jpg';
                $permalink = get_permalink($post->ID);
                $featured_image_width = 313;
                $featured_image_height = 220;
                if (has_post_thumbnail($post->ID)) {
                    $featured_image = ThemeMakersHelper::get_post_featured_image($post->ID, 'gallery_thumb');
                }
                ?>

                <section class="post-thumb">
                    <a href="<?php echo $permalink ?>"><img src="<?php echo $featured_image ?>" width="<?php echo $featured_image_width ?>" height="<?php echo $featured_image_height ?>" alt="<?php echo $post->post_title ?>" /></a>
                    <div class="platform-teaser">
                        <?php if (!empty($terms)): ?>
                            <?php foreach ($terms as $term) : ?>
                                <?php $cons_color = get_taxonomy_term_type('cons', $term->term_id);?>
                                <a style="background-color: <?php echo $cons_color ?>" class="game_console" href="<?php bloginfo('url') ?>/?cons=<?php echo $term->slug ?>"><?php echo $term->name ?></a>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </div><!--/ .platform-teaser-->
                </section><!--/ .post-thumb-->

                <section class="post-entry">
                    <div class="post-date"><?php echo get_the_date() ?></div><!--/ .post-date-->
                    <div class="post-title">
                        <h5><a href="<?php the_permalink() ?>"><?php echo $post->post_title ?></a></h5>
                    </div><!--/ .post-title-->
                    <?php echo Thememakers_Entity_Rating::draw_rating($post->ID) ?>
					<div class="clear"></div>
                    <p>
                        <?php if ($_REQUEST['show_full_content']) : ?>
                            <?php the_content(); ?>
                        <?php else: ?>

                            <?php
                            if ($_REQUEST['excerpt_symbols_count']) {
                                echo substr(get_the_excerpt(), 0, $_REQUEST['excerpt_symbols_count']) . " ...";
                            } else {
                                the_excerpt();
                            }
                            ?>
                        <?php endif; ?>
                    </p>
                    <?php if (!$_REQUEST['disable_blog_comments']): ?>
                        <div class="comments-icon"><a href="<?php the_permalink(); ?>#comments"><?php comments_number('0', '1', '%'); ?> <?php _e('comments', THEMEMAKERS_THEME_FOLDER_NAME); ?></a></div><!--/ comments-icon-->
                    <?php endif; ?>
                </section><!--/ .post-entry-->

            </article><!--/ .post-item-->
        <?php endwhile; ?>
    <?php else : ?>

        <?php get_template_part('content', 'notfound'); ?>

    <?php endif; ?>
</section>
<?php get_template_part('content', 'navigation'); ?>