<?php
/*
  /**
 * The main front page file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query. 
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 *
 * @package WordPress
 * 
 */
?>
<?php get_header(); ?>
<!--Start Contetn wrapper-->
<div class="grid_24 content_wrapper">
    <!--Start Content-->
    <div class="content">
        <!--Start Slider Wrapper-->
        <div class="slider_wrapper">
            <div id="main" class="container">   
                <?php if (inkthemes_get_option('inkthemes_featureimg') != '') { ?>
                    <img src="<?php echo esc_url(inkthemes_get_option('inkthemes_featureimg')); ?>"/>
                <?php } else { ?>
                    <img src="<?php echo get_template_directory_uri(); ?>/images/slideimg.jpg"/>
                <?php } ?>

            </div>
            <div class="slider_shadow"></div>
        </div>
        <!--End Slider wrapper-->
        <div class="clear"></div>
        <!--Start Feature content-->
        <div class="feature_content">
            <div class="one_third">
                <div class="wrap">
                    <h2>
                        <?php if (inkthemes_get_option('inkthemes_headline1') != '') { ?>
                            <?php echo stripslashes(inkthemes_get_option('inkthemes_headline1')); ?>
                        <?php } else { ?>
                            <?php _e('Four Different Skins', 'themia-lite'); ?>
                        <?php } ?>
                    </h2>
                    <?php if (inkthemes_get_option('inkthemes_img1') != '') { ?>
                        <img src="<?php echo esc_url(inkthemes_get_option('inkthemes_img1')); ?>" alt="feature image"/>
                    <?php } else { ?>
                        <img src="<?php echo get_template_directory_uri(); ?>/images/featureimg-1.jpg"/>
                    <?php } ?>
                    <p>
                        <?php if (inkthemes_get_option('inkthemes_feature1') != '') { ?>
                            <?php echo stripslashes(inkthemes_get_option('inkthemes_feature1')); ?>
                        <?php } else { ?>
                            <?php _e('Just a Click and your website is ready for use. Your Site is faster to built, easy to use & Search Engine Optimized.', 'themia-lite'); ?>
                        <?php } ?>
                    </p>
                    <a href="<?php echo esc_url(inkthemes_get_option('inkthemes_link1')); ?>" class="read_more"><?php _e('read more.....', 'themia-lite'); ?></a> </div>
            </div>
            <div class="one_third">
                <div class="wrap">
                    <h2>
                        <?php if (inkthemes_get_option('inkthemes_headline2') != '') { ?>
                            <?php echo stripslashes(inkthemes_get_option('inkthemes_headline2')); ?>
                        <?php } else { ?>
                            <?php _e('Amazing Shortcodes', 'themia-lite'); ?>
                        <?php } ?>
                    </h2>
                    <?php if (inkthemes_get_option('inkthemes_img2') != '') { ?>
                        <img src="<?php echo esc_url(inkthemes_get_option('inkthemes_img2')); ?>" alt="feature image"/>
                    <?php } else { ?>
                        <img src="<?php echo get_template_directory_uri(); ?>/images/featureimg-2.jpg"/>
                    <?php } ?>
                    <p>
                        <?php if (inkthemes_get_option('inkthemes_feature2') != '') { ?>
                            <?php echo stripslashes(inkthemes_get_option('inkthemes_feature2')); ?>
                        <?php } else { ?>
                            <?php _e('Just a Click and your website is ready for use. Your Site is faster to built, easy to use & Search Engine Optimized.', 'themia-lite'); ?>
                        <?php } ?>
                    </p>
                    <a href="<?php echo esc_url(inkthemes_get_option('inkthemes_link2')); ?>" class="read_more"><?php _e('read more.....', 'themia-lite'); ?></a> </div>
            </div>
            <div class="one_third last">
                <div class="wrap">
                    <h2>
                        <?php if (inkthemes_get_option('inkthemes_headline3') != '') { ?>
                            <?php echo stripslashes(inkthemes_get_option('inkthemes_headline3')); ?>
                        <?php } else { ?>
                            <?php _e('Full Localisation Support', 'themia-lite'); ?>
                        <?php } ?>
                    </h2>
                    <?php if (inkthemes_get_option('inkthemes_img3') != '') { ?>
                        <img src="<?php echo esc_url(inkthemes_get_option('inkthemes_img3')); ?>" alt="feature image"/>
                    <?php } else { ?>
                        <img src="<?php echo get_template_directory_uri(); ?>/images/featureimg-3.jpg"/>
                    <?php } ?>
                    <p>
                        <?php if (inkthemes_get_option('inkthemes_feature3') != '') { ?>
                            <?php echo stripslashes(inkthemes_get_option('inkthemes_feature3')); ?>
                        <?php } else { ?>
                            <?php _e('Just a Click and your website is ready for use. Your Site is faster to built, easy to use & Search Engine Optimized.', 'themia-lite'); ?>
                        <?php } ?>
                    </p>
                    <a href="<?php echo esc_url(inkthemes_get_option('inkthemes_link3')); ?>" class="read_more"><?php _e('read more.....', 'themia-lite'); ?></a> </div>
            </div>
        </div>
        <div class="clear"></div>
        <!--End Feature content-->
    </div>
    <!--End Content-->
    <?php
    $home_page_blog = inkthemes_get_option('inkthemes_home_blog_option');
    $home_page_blog_on = "on";
    if ($home_page_blog === $home_page_blog_on) {
        ?>
        <div class="contet-border"></div>
        <div class="grid_15 alpha">
            <!--Start side content-->
            <div class="side_content">        
                <!-- Start the Loop. -->
                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                        <!--Start Post-->
                        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                            <h1 class="post_title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php _e('Permanent Link to ', 'themia-lite') . the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
                            <ul class="post_info">
                                <li class="postedon"><?php _e('Posted on', 'themia-lite'); ?>
                                    <?php the_date(); ?>
                                </li>
                                <li class="postedin"><?php _e('in', 'themia-lite'); ?>
                                    <?php the_category(', '); ?>
                                </li>
                                <li class="postedby"><?php _e('by', 'themia-lite'); ?>
                                    <?php the_author_posts_link(); ?>
                                </li>
                            </ul>
                            <hr/>
                            <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) { ?>
                                <a href="<?php the_permalink(); ?>">
                                    <?php the_post_thumbnail('post_thumbnail', array('class' => 'postimg')); ?>
                                </a>
                                <?php
                            } else {
                                ?>
                                <a href="<?php the_permalink(); ?>"> <?php echo inkthemes_main_image(); ?> </a>
                                <?php
                            }
                            ?>
                            <?php the_excerpt(); ?>
                            <a href="<?php the_permalink(); ?>" class="continue"><?php _e('Continue reading...', 'themia-lite'); ?></a> </div>
                        <div class="shadow"> </div>
                        <!--End Post-->
                        <?php
                    endwhile;
                else:
                    ?>
                    <div class="post">
                        <p>
                            <?php _e('Sorry, no posts matched your criteria.', 'themia-lite'); ?>
                        </p>
                    </div>
                <?php endif; ?>

                <div class='wp-pagenavi'>
                    <?php echo paginate_links(); ?>
                </div>
            </div>
            <!--End side content-->
        </div>
        <?php get_sidebar(); ?>
    <?php } ?>
</div>
<!--End Content wrapper-->
<div class="clear"></div>
</div>
<!--End Container-->
<!--Start Testimonial bg-->
<!--End Testimonial bg-->
<?php get_footer(); ?>
