index.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /* @var $this \yii\web\View */
  3. /* @var $content string */
  4. use backend\assets\AppAsset;
  5. use yii\bootstrap4\Html;
  6. use yii\helpers\Url;
  7. AppAsset::register($this);
  8. ?>
  9. <?php $this->beginPage() ?>
  10. <!DOCTYPE html>
  11. <html lang="<?= Yii::$app->language ?>" class="h-100">
  12. <head>
  13. <meta charset="<?= Yii::$app->charset ?>">
  14. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  15. <!-- Google Font: Source Sans Pro -->
  16. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  17. <?php $this->registerCsrfMetaTags() ?>
  18. <title><?= Html::encode(Yii::$app->params['adminTitle']);?></title>
  19. <?php $this->head() ?>
  20. </head>
  21. <body class="hold-transition sidebar-mini layout-fixed" style="overflow:hidden">
  22. <?php $this->beginBody() ?>
  23. <!-- Site wrapper -->
  24. <div class="wrapper">
  25. <!-- 头部区域 -->
  26. <?= $this->render('_header'); ?>
  27. <!-- 左侧菜单栏 -->
  28. <?= $this->render('_left'); ?>
  29. <!-- 主体内容区域 -->
  30. <?= $this->render('_content'); ?>
  31. <!-- 右边控制栏 -->
  32. <aside class="control-sidebar control-sidebar-dark">
  33. <!-- Control sidebar content goes here -->
  34. </aside>
  35. <?= Html::jsFile('@baseResources/js/contabs.js'); ?>
  36. <script>
  37. // 配置
  38. let config = {
  39. tag: "<?= Yii::$app->services->config->backendConfig('sys_tags') ?? false; ?>",
  40. isMobile: "<?= Yii::$app->params['isMobile'] ?? false; ?>",
  41. };
  42. /* 主题布局切换 */
  43. $(document).on("change", "#rfTheme", function () {
  44. var layout = $('#rfTheme').val();
  45. window.location.href = '<?= Url::to(['theme/update'])?>' + '?layout=' + layout;
  46. });
  47. </script>
  48. </div>
  49. <?php $this->endBody() ?>
  50. </body>
  51. </html>
  52. <?php $this->endPage();
粤ICP备19079148号