main.php 1.34 KB
Newer Older
Qiang Xue committed
1 2 3 4 5 6
<?php
use yii\bootstrap\NavBar;
use yii\bootstrap\Nav;
use yii\helpers\Html;

/**
slavcodev committed
7 8
 * @var \yii\web\View $this
 * @var string $content
Qiang Xue committed
9 10 11
 */
$asset = yii\gii\GiiAsset::register($this);
?>
12
<?php $this->beginPage() ?>
Qiang Xue committed
13 14 15
<!DOCTYPE html>
<html lang="en">
<head>
16 17 18 19
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
Qiang Xue committed
20 21
</head>
<body>
22
<?php $this->beginBody() ?>
Qiang Xue committed
23
<?php
Alexander Makarov committed
24
NavBar::begin([
25 26 27
    'brandLabel' => Html::img($asset->baseUrl . '/logo.png'),
    'brandUrl' => ['default/index'],
    'options' => ['class' => 'navbar-inverse navbar-fixed-top'],
Alexander Makarov committed
28 29
]);
echo Nav::widget([
30 31 32 33 34 35
    'options' => ['class' => 'nav navbar-nav navbar-right'],
    'items' => [
        ['label' => 'Home', 'url' => ['default/index']],
        ['label' => 'Help', 'url' => 'https://github.com/yiisoft/yii2/blob/master/docs/guide/gii.md'],
        ['label' => 'Application', 'url' => Yii::$app->homeUrl],
    ],
Alexander Makarov committed
36
]);
Qiang Xue committed
37 38 39 40
NavBar::end();
?>

<div class="container">
41
    <?= $content ?>
Qiang Xue committed
42 43 44
</div>

<footer class="footer">
45 46 47 48
    <div class="container">
        <p class="pull-left">A Product of <a href="http://www.yiisoft.com/">Yii Software LLC</a></p>
        <p class="pull-right"><?= Yii::powered() ?></p>
    </div>
Qiang Xue committed
49 50
</footer>

51
<?php $this->endBody() ?>
Qiang Xue committed
52 53
</body>
</html>
54
<?php $this->endPage() ?>