diff options
Diffstat (limited to 'includes/header.php')
-rw-r--r-- | includes/header.php | 129 |
1 files changed, 21 insertions, 108 deletions
diff --git a/includes/header.php b/includes/header.php index efb49ae..c59262e 100644 --- a/includes/header.php +++ b/includes/header.php @@ -15,35 +15,28 @@ if (isset($_PROFILE)) { require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.php"; initLang(); -if (isset($_COOKIE["DeltaHandoffPalette"]) && !str_starts_with($_SERVER['REQUEST_URI'], "/login")) { - header("Location: /login/android/"); - die(); -} - $palettes = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/themes.json"), true); if (isset($_PROFILE)) { - if (!isset($_PROFILE["studio_settings"])) { - $_PROFILE["studio_settings"] = [ - "theme" => $palettes["default"], - "dark" => false, - "navigation" => [ - "top" => [], - "bottom" => [], - "home" => [] - ], - "profile" => [ - "badge" => true, - "theme" => -1, - "detailed" => false, - "photo" => true, - "hide" => false, - "phone" => true, - "email" => true, - "birth" => true - ] - ]; - } + $_PROFILE["studio_settings"] = [ + "theme" => $palettes["default"], + "dark" => false, + "navigation" => [ + "top" => [], + "bottom" => [], + "home" => [] + ], + "profile" => [ + "badge" => true, + "theme" => -1, + "detailed" => false, + "photo" => true, + "hide" => false, + "phone" => true, + "email" => true, + "birth" => true + ] + ]; saveProfile(); } @@ -57,22 +50,8 @@ if (isset($_PROFILE)) { $userPalette = $palettes["list"][$palettes["default"]]["light"]; -if (isset($_PROFILE) && !isset($_COOKIE["DeltaKiosk"])) { - if (isset($_PROFILE["studio_settings"]) && isset($_PROFILE["studio_settings"]["theme"]) && isset($_PROFILE["ultra"]) && $_PROFILE["ultra"] && isset($palettes["list"][$_PROFILE["studio_settings"]["theme"]])) { - $userPalette = $palettes["list"][$_PROFILE["studio_settings"]["theme"]][$_PROFILE["studio_settings"]["dark"] === true ? "dark" : "light"]; - } -} - if (isset($_GET["__"])) { $_id = str_replace("/", "-", substr($_GET["__"], 1)); - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/profiles/" . $_id . ".json")) { - $_ = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/profiles/" . $_id . ".json"), true); - - if (isset($_["ultra"]) && $_["ultra"] && isset($_["studio_settings"]) && isset($_["studio_settings"]["profile"]["theme"]) && $_["studio_settings"]["profile"]["theme"] !== -1 && isset($palettes["list"][$_["studio_settings"]["profile"]["theme"]])) { - $userPalette = $palettes["list"][$_["studio_settings"]["profile"]["theme"]][!isset($_COOKIE["DeltaKiosk"]) && $_PROFILE["studio_settings"]["dark"] === true ? "dark" : "light"]; - } - } } ?> @@ -535,75 +514,9 @@ if (isset($_GET["__"])) { font-family: "Nunito",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; } - <?php if (isset($_COOKIE["DeltaHandoffPalette"])): ?> - * { - font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; - } - - #desktop-navigation { - display: none; - } - - .navbar { - display: none; - } - #footer { - display: none; - } - - h1 { - font-size: 0; - } - - h1 .btn, h1 .dropdown { - margin-left: 10px; - } - - h1 .btn:nth-child(1) { - margin-left: 0 !important; - } - - body > div > #page > .container, body > div > #page > form > .container { - margin-top: -35px; - } - - h1 > span { - float: none !important; - text-align: center; - display: block; - } - - #plus-container { - margin-top: 0 !important; - } - - - #plus-types { - display: block !important; - margin-top: 10px; - } - - #plus-types span { - font-size: 16px !important; - } - - .coins-inline { - float: initial; - margin-bottom: 10px; - display: block; - width: max-content; - margin-left: auto; - margin-right: auto; - } - - .badge-subscription-mobile { - display: none; - } - <?php endif; ?> - - <?php if (isset($_COOKIE["DeltaHandoffPalette"]) || isset($userPalette)): + <?php if (isset($userPalette)): - $palette = explode(",", $_COOKIE["DeltaHandoffPalette"] ?? $userPalette); + $palette = explode(",", $userPalette); function rgb($color) { return hexdec(substr($color, 0, 2)) . "," . hexdec(substr($color, 2, 2)) . "," . hexdec(substr($color, 4, 2)); |