feat(theme): локальный выбор и показанная тема handoff (#13)
This commit is contained in:
1 parent
3740839321
commit
9c06977e03
11 files changed
+163
-49
No files matched your search
@@ -3,6 +3,7 @@
|
||||
require_once __DIR__ . '/i18n.php';
|
||||
require_once __DIR__ . '/components/asset-url.php';
|
||||
require_once __DIR__ . '/components/site-domain.php';
|
||||
require_once __DIR__ . '/components/theme-preference.php';
|
||||
|
||||
$configFile = __DIR__ . '/config.json';
|
||||
$config = file_exists($configFile) ? json_decode(file_get_contents($configFile), true) : [];
|
||||
@@ -70,6 +71,8 @@ if (isset($config['utm']) && is_array($config['utm'])) {
|
||||
}
|
||||
|
||||
$UTM = $get_params;
|
||||
$themeInitial = prelandThemeResolve(($UTM['theme'] ?? 'light') === 'dark' ? 'dark' : 'light');
|
||||
$themeSurface = 'preland';
|
||||
$host = $config['host'] ?? ($_SERVER['HTTP_HOST'] ?? '');
|
||||
$apiHost = $host ? (preg_match('#^https?://#', $host) ? rtrim($host, '/') : 'https://' . rtrim($host, '/')) : '';
|
||||
|
||||
|
||||
Reference in new issue
Block a user