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

6 7 8
/* @var $this \yii\web\View */
/* @var $content string */

Qiang Xue committed
9 10
$asset = yii\gii\GiiAsset::register($this);
?>
11
<?php $this->beginPage() ?>
Qiang Xue committed
12 13 14
<!DOCTYPE html>
<html lang="en">
<head>
15 16
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
17
    <?= Html::csrfMetaTags() ?>
18 19
    <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
    'options' => ['class' => 'nav navbar-nav navbar-right'],
    'items' => [
        ['label' => 'Home', 'url' => ['default/index']],
Qiang Xue committed
33
        ['label' => 'Help', 'url' => 'http://www.yiiframework.com/doc-2.0/guide-tool-gii.html'],
34 35
        ['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() ?>