diff options
Diffstat (limited to 'includes/components/header.inc')
-rw-r--r-- | includes/components/header.inc | 92 |
1 files changed, 79 insertions, 13 deletions
diff --git a/includes/components/header.inc b/includes/components/header.inc index fdae55a..548716d 100644 --- a/includes/components/header.inc +++ b/includes/components/header.inc @@ -244,15 +244,21 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; $selectedPalette = $palettes["default"]; - global $memberID; if (isset($memberID)) { - $member = getMemberWithoutSystem($memberID); + global $memberID; global $systemID; if (isset($memberID) || isset($systemID)) { + if (isset($memberID)) { + $member = getMemberWithoutSystem($memberID); + $color = $member["color"]; + } else { + $systemDataForColor = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/general.json"), true); + $color = $systemDataForColor["color"] ?? "000000"; + } if (isset($_GET["debug"])) { ob_clean(); echo("<pre>"); echo("Color difference debug\n======================\n\n"); - echo("Member color: #" . $member["color"] . "\n\n"); + echo("Color: #" . $member["color"] . "\n\n"); } $sr = hexdec(substr($member["color"], 0, 2)); @@ -388,6 +394,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; } .dropdown-menu { + background-color: #<?= $palette[1] ?> !important; --bs-dropdown-bg: #<?= $palette[1] ?> !important; --bs-dropdown-link-color: #<?= $palette[6] ?> !important; --bs-dropdown-link-disabled-color: #<?= $palette[6] ?>77 !important; @@ -397,6 +404,24 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; --bs-dropdown-link-active-color: #<?= $palette[6] ?> !important; } + .dropdown-item { + color: #<?= $palette[6] ?> !important; + } + + .dropdown-item:hover { + color: #<?= $palette[6] ?> !important; + background-color: #<?= $palette[3] ?> !important; + } + + .dropdown-item:active { + color: #<?= $palette[6] ?> !important; + background-color: #<?= $palette[6] ?> !important; + } + + .dropdown-item.disabled { + color: #<?= $palette[6] ?>77 !important; + } + .coins { color: #<?= $palette[6] ?> !important; background-color: #<?= $palette[1] ?> !important; @@ -425,10 +450,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; color: #<?= $palette[0] ?>77 !important; } - .dropdown-item:active span, .dropdown-item:active img { - filter: invert(1); - } - .list-group, .list-group-item, .list-group-item-action { --bs-list-group-color: var(--bs-body-color) !important; --bs-list-group-action-color: var(--bs-body-color) !important; @@ -463,6 +484,10 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; --bs-alert-border-color: var(--bs-body-color); } + .alert-danger .btn-close, .alert-success .btn-close, .alert-warning .btn-close { + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23<?= $palette[0] ?>'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat + } + .alert-danger, .alert-success, .alert-warning, .list-group-item-warning { --bs-alert-color: var(--bs-body-bg) !important; --bs-alert-bg: #<?= $palette[9] ?> !important; @@ -545,14 +570,37 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; --bs-gradient: none; } - .form-control, .form-control:focus, .form-select, .form-select:focus { + .progress { + background-color: #<?= $palette[2] ?> !important; + } + + .progress-bar.bg-success { + background-color: #<?= $palette[9] ?> !important; + } + + .progress-bar.bg-danger { + background-color: #<?= $palette[7] ?> !important; + } + + .card { + background-color: #<?= $palette[2] ?> !important; + border-color: #<?= $palette[5] ?> !important; + } + + .form-control, .form-control:focus, .form-select, .form-select:focus, .form-check-input, .form-check-input:focus { color: var(--bs-body-color); - background-color: #<?= $palette[2] ?>; - border-color: #<?= $palette[3] ?>; + background-color: #<?= $palette[2] ?> !important; + border-color: #<?= $palette[3] ?> !important; + } + + .form-check-input:checked, .form-check-input:checked:focus { + background-color: #<?= $palette[9] ?> !important; + border-color: #<?= $palette[9] ?> !important; } - .form-control:focus, .form-select:focus { + .form-control:focus, .form-select:focus, .form-check-input:focus { box-shadow: 0 0 0 0.25rem rgba(<?= rgb($palette[9]) ?>, .25); + transition: box-shadow 200ms; } .form-control::placeholder, .form-select::placeholder { @@ -569,7 +617,24 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; } .btn-close { - background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23<?= $palette[6] ?>'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat + background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23<?= $palette[6] ?>'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; + opacity: 1 !important; + } + + .antialias, #new-homepage img, #hpd-other img, #hpd-raindrops img, #hpd-cloudburst img, .ck img, #system-info img, #member-card img { + image-rendering: auto !important; + } + + #member-relations img { + image-rendering: pixelated !important; + } + + .btn-close:hover { + opacity: .75 !important; + } + + .btn-close:active { + opacity: .5 !important; } .ck-editor { @@ -631,7 +696,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; if ( (($isLoggedIn || $isLowerLoggedIn) && !$use2023UI && isset($_COOKIE["enable2023UIcta"]) && $_COOKIE["enable2023UIcta"] === "yes") || - (isset($_COOKIE["force2023UIcta"]) && $_COOKIE["force2023UIcta"] === "yes" && !$use2023UI) + (isset($_COOKIE["force2023UIcta"]) && $_COOKIE["force2023UIcta"] === "yes" && !$use2023UI) || + (($isLoggedIn || $isLowerLoggedIn) && isset($_PROFILE) && $_PROFILE["login"] === "raindrops" && !$use2023UI) ) { ?> <div class="modal fade" id="new-ui-cta"> <div class="modal-dialog"> |