<?php
/**
 * Template Name: Home Page
 */
$posts = get_posts(['posts_per_page' => 3]);
get_header();
?>

<div class="content">
    <?php the_content();?><!--home page content from wp admin wysiwyg -->
    <?php if(false && $posts):?>
        <div class="mp-blog">
            <div class="cont">
                <div class="inner-cont">
                    <h4 class="text-header">Our Blog</h4>
                    <div class="bp-list cat-all">
                        <?php foreach ($posts as $post): ?>
                            <a class="bp-block <?php $categories = get_the_category(); foreach($categories as $category):?><?= $category->slug; ?> <?php endforeach;?>" href="<?=get_permalink(); ?>">
                                <span class="bp-img">
                                    <img src="<?=get_the_post_thumbnail_url(); ?>" alt="Blog img">
                                </span>
                                <span class="bp-title"><?=get_the_title($post); ?></span>
                                <span class="bp-description"><?=get_the_excerpt(); ?></span>
                            </a>
                        <?php endforeach; ?>
                    </div>
                    <div class="bp-btns">
                        <a href="/blog" class="button secondary">Browse all blog articles</a>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?>
    <!-- <div class="mp-feature bot-form with-bg main">
        <div class="cont">
            <div class="inner-cont">
                <div class="flex">
                    <div class="col">
                        <div class="mp-interested">
                            <h4 class="text-header">Interested? Get to know more</h4>
                            <div class="buttons">
                                <a href="/book-a-demo/" class="button action big" tabindex="0">Book a demo</a>
                                <a href="<?= get_lawcarta_url()?>/user/registration" class="button secondary big" tabindex="0">Sign up for free</a>
                            </div>
                        </div>
                    </div>
                    <div class="col">
                        <div class="subscribe-block">
                            <div class="sb-text">Subscribe and receive exclusive tips and offers!</div>
                            <div class="sub-input" style="position: relative">
                                <div id="mc_embed_signup">
                                    <form 
                                        action="https://livecarta.us12.list-manage.com/subscribe/post?u=f1055fdbaf5889ec432f2821f&amp;id=a0685621c3&amp;f_id=003899e0f0"
                                        method="post" 
                                        id="mc-embedded-subscribe-form" 
                                        name="mc-embedded-subscribe-form" 
                                        class="validate" 
                                        target="_blank" 
                                        novalidate>
                                        <div id="mc_embed_signup_scroll" class="form-inline">
                                            <input type="email" value="" name="EMAIL" class="required email form-control" id="mce-EMAIL" placeholder="Enter your Email" required>
                                            <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_f1055fdbaf5889ec432f2821f_a0685621c3" tabindex="-1" value=""></div>
                                            <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button secondary big">
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>	
                </div>
            </div>
        </div>
    </div> -->
</div>

<?php
get_footer();
