diff --git a/views/layouts/main.php b/views/layouts/main.php index 874069a..6541128 100644 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -10,6 +10,7 @@ use yii\bootstrap5\Breadcrumbs; use yii\bootstrap5\Html; use yii\bootstrap5\Nav; use yii\bootstrap5\NavBar; +use yii\web\View; AppAsset::register($this); @@ -19,10 +20,11 @@ $this->registerMetaTag(['name' => 'viewport', 'content' => 'width=device-width, $this->registerMetaTag(['name' => 'description', 'content' => $this->params['meta_description'] ?? '']); $this->registerMetaTag(['name' => 'keywords', 'content' => $this->params['meta_keywords'] ?? '']); $this->registerLinkTag(['rel' => 'icon', 'type' => 'image/x-icon', 'href' => Yii::getAlias('@web/favicon.ico')]); +$darkMode = Yii::$app->user->isGuest ? 0 : Yii::$app->user->identity->dark_mode; ?> beginPage() ?> - + > <?= Html::encode($this->title) ?> head() ?> @@ -45,8 +47,8 @@ $this->registerLinkTag(['rel' => 'icon', 'type' => 'image/x-icon', 'href' => Yii ['label' => '分享管理', 'url' => ['/share/index']], ['label' => '文件收集', 'url' => ['/collection/index']], ['label' => '个人设置', 'url' => ['/user/info']], - ['label' => '系统设置', 'url' => ['/site/contact']], - ['label' => '应用下载', 'url' => ['/site/contact']], +// ['label' => '系统设置', 'url' => ['/site/contact']], +// ['label' => '应用下载', 'url' => ['/site/contact']], Yii::$app->user->isGuest ? ['label' => '登录', 'url' => ['/user/login']] : '