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() ?> - + >