feat(theme): локальный выбор и показанная тема handoff (#13)
This commit is contained in:
1 parent
3740839321
commit
9c06977e03
11 files changed
+163
-49
No files matched your search
+5
-1
@@ -3,6 +3,8 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<?php require __DIR__ . '/components/theme-style.php'; ?>
|
||||
<?php require __DIR__ . '/components/theme-client.php'; ?>
|
||||
|
||||
<title><?= $page_title ?? $default_title ?></title>
|
||||
|
||||
@@ -51,7 +53,8 @@
|
||||
<style><?= require __DIR__ . '/components/upload-picker-style.php'; ?></style>
|
||||
<?php require_once __DIR__ . '/components/browser-upload.php'; ?>
|
||||
</head>
|
||||
<body class="<?= (isset($UTM['theme']) && $UTM['theme'] == 'dark') ? 'theme-dark' : '' ?>" style="<?= (isset($UTM['theme']) && $UTM['theme'] == 'dark') ? 'background: black' : '' ?>">
|
||||
<body class="<?= $themeInitial === 'dark' ? 'theme-dark' : '' ?>">
|
||||
<script>window.ZoomzillaTheme.refresh();</script>
|
||||
<div class="wrapper">
|
||||
<header class="header">
|
||||
<nav class="navbar navbar-dark py-1 py-md-3 px-0">
|
||||
@@ -61,6 +64,7 @@
|
||||
<img src="<?= prelandAssetUrl('docs/logo-alt.svg') ?>" width="182" height="47" alt="Логотип <?= htmlspecialchars(prelandSiteDomain($_SERVER), ENT_QUOTES, 'UTF-8') ?>">
|
||||
</span>
|
||||
<div class="d-flex align-items-center">
|
||||
<?php $themeLabels = ['group' => Yii::t('app', 'Тема оформления'), 'light' => Yii::t('app', 'Светлая тема'), 'dark' => Yii::t('app', 'Тёмная тема')]; require __DIR__ . '/components/theme-switch.php'; ?>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in new issue
Block a user