You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.php 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. use yii\bootstrap\NavBar;
  3. use yii\bootstrap\Nav;
  4. use yii\helpers\Html;
  5. /* @var $this \yii\web\View */
  6. /* @var $content string */
  7. $asset = yii\gii\GiiAsset::register($this);
  8. ?>
  9. <?php $this->beginPage() ?>
  10. <!DOCTYPE html>
  11. <html lang="en">
  12. <head>
  13. <meta charset="utf-8"/>
  14. <meta name="viewport" content="width=device-width, initial-scale=1">
  15. <?= Html::csrfMetaTags() ?>
  16. <title><?= Html::encode($this->title) ?></title>
  17. <?php $this->head() ?>
  18. </head>
  19. <body>
  20. <div class="container-fluid page-container">
  21. <?php $this->beginBody() ?>
  22. <?php
  23. NavBar::begin([
  24. 'brandLabel' => Html::img($asset->baseUrl . '/logo.png'),
  25. 'brandUrl' => ['default/index'],
  26. 'options' => ['class' => 'navbar-inverse navbar-fixed-top'],
  27. ]);
  28. echo Nav::widget([
  29. 'options' => ['class' => 'nav navbar-nav navbar-right'],
  30. 'items' => [
  31. ['label' => 'Home', 'url' => ['default/index']],
  32. ['label' => 'Help', 'url' => 'http://www.yiiframework.com/doc-2.0/guide-tool-gii.html'],
  33. ['label' => 'Application', 'url' => Yii::$app->homeUrl],
  34. ],
  35. ]);
  36. NavBar::end();
  37. ?>
  38. <div class="container content-container">
  39. <?= $content ?>
  40. </div>
  41. <div class="footer-fix"></div>
  42. </div>
  43. <footer class="footer">
  44. <div class="container">
  45. <p class="pull-left">A Product of <a href="http://www.yiisoft.com/">Yii Software LLC</a></p>
  46. <p class="pull-right"><?= Yii::powered() ?></p>
  47. </div>
  48. </footer>
  49. <?php $this->endBody() ?>
  50. </body>
  51. </html>
  52. <?php $this->endPage() ?>