base.php 1.01 KB
<?php

/**
 * @author Alla Kuzmenko
 * @copyright (c), Thread
 */
use frontend\themes\defaults\assets\AppAsset;
use thread\modules\seo\widgets\breadcrumbs\Breadcrumbs;

$bundle = AppAsset::register($this);

$this->beginContent('@app/layouts/main.php');
echo $this->render('parts/header_base', ['bundle' => $bundle])
?>
    <div class="container-fluid">
        <?php if ($this->context->breadcrumbs && ($this->context->id == 'item' && $this->context->action->id == 'view')): ?>
            <div class="container">
                <?= Breadcrumbs::widget([
                    'links' => $this->context->breadcrumbs ?? []
                ]) ?>
            </div>
        <?php endif; ?>
        <main>
            <div class="container">
                <?= $content; ?>
            </div>
        </main>
    </div>
<style>
    body{
        margin-bottom: 65px;
    }
    footer .container{
        margin-top: -40px;
    }
</style>
<?php
echo $this->render('parts/footer_base', [
    'asset' => $bundle
]);
$this->endContent();
?>