<?php require_once(THEME_ROOT . '/blocks/head.php'); ?>
<?php require_once(THEME_ROOT . '/blocks/top.php'); ?>

    <br><br>
    <div class="cantainer">
        <?php foreach (get_news(50) as $item) { ?>
            <div class="row">
                <div class="col-sm-12 col-md-6 col-md-offset-3">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">
                                <?php echo $item['title']; ?>
                            </h3>
                        </div>
                        <div class="panel-body">
                            <?php if ($settings_show_img_news && $item["img"]) { ?>
                                <img class="col-md-4" alt="300x200" style="width: 300px; height: 200px;" src="<?php echo images_thumbnail_resize($item["img"], 300, 200); ?>">
                            <?php } ?>
                            <p class="col-md-8" style="word-break: break-all">
                                <?php echo $item['text']; ?>
                            </p>
                            <div style="text-align:right;">
                                <span><?php echo bm_date($item['date']); ?> </span>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        <?php } ?>
    </div>

<?php
require_once(THEME_ROOT . "/blocks/footer.php");
?>