Skip to content

Commit

Permalink
Merge pull request #365 from Tanza3D/no-more-halloween
Browse files Browse the repository at this point in the history
No more halloween
  • Loading branch information
Tanza3D authored Nov 1, 2023
2 parents 65bf019 + ee2a3cb commit c69bdd5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 18 deletions.
3 changes: 1 addition & 2 deletions global/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4883,8 +4883,7 @@ input[type='range']:focus::-ms-fill-upper {
animation-duration: 10s, 3s;
animation-timing-function: linear, ease-in-out;
animation-iteration-count: infinite, infinite;
animation-play-state: running, running;
filter: drop-shadow(0px 0px 5px #ff0);
animation-play-state: running, running
}

.osekai__otab-hidden {
Expand Down
Binary file removed global/img/.discord.jpg-autosave.kra
Binary file not shown.
9 changes: 3 additions & 6 deletions global/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,7 @@ function snowflakes(enabled) {
animation-delay: ${delay1}s, ${delay2}s
}`;
document.getElementById("snowflakes").innerHTML += `<div class="snowflake">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.5 6C7.47 6 8.37 6.5 9.11 7.38C9.66 6.79 10.31 6.36 11 6.15V4C11 3.46957 11.2107 2.96086 11.5858 2.58579C11.9609 2.21071 12.4696 2 13 2H15V4H13V6.15C13.69 6.36 14.34 6.79 14.89 7.38C15.63 6.5 16.53 6 17.5 6C20 6 22 9.36 22 13.5C22 17.64 20 21 17.5 21C16.53 21 15.63 20.5 14.89 19.62C14.08 20.5 13.08 21 12 21C10.92 21 9.92 20.5 9.11 19.62C8.37 20.5 7.47 21 6.5 21C4 21 2 17.64 2 13.5C2 9.36 4 6 6.5 6Z" fill="#FF5C0055"/>
</svg>
<i class="fas fa-snowflake"></i>
</div>`;
}

Expand All @@ -450,9 +447,9 @@ function snowflakes(enabled) {
// so that if you have never turned them on, during christmas they'll auto-turn on
var snowflakesDefault = false;
var snowflakesOption = "settings_global__snowflakes-nochristmas";
if (halloween) {
if (christmas) {
var snowflakesDefault = true;
var snowflakesOption = "settings_global__snowflakeshalloween";
var snowflakesOption = "settings_global__snowflakes";
}


Expand Down
4 changes: 2 additions & 2 deletions global/js/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ async function initSettingsPages() {
var section = settingUtils.genericSection();
var snowflakesDefault = false;
var snowflakesOption = "settings_global__snowflakes-nochristmas";
if (halloween) {
if (christmas) {
var snowflakesDefault = true;
var snowflakesOption = "settings_global__snowflakeshalloween";
var snowflakesOption = "settings_global__snowflakes";
}
settingUtils.linkedCheckbox(GetStringRawNonAsync("navbar", "settings.snowflakes"), snowflakesOption, section, snowflakesDefault, snowflakes);
htmlInner.appendChild(section);
Expand Down
12 changes: 4 additions & 8 deletions global/php/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

$time_start = microtime(true);
$request_time = $_SERVER['REQUEST_TIME_FLOAT'];
$halloween = true;
$christmas = false;

if(!isset($useJS))
$useJS = true;
Expand Down Expand Up @@ -117,7 +117,7 @@ function checkPermission($permission) {
function frontend()
{
global $useJS;
global $halloween;
global $christmas;
global $apps;
global $manual_frontend;
global $app;
Expand Down Expand Up @@ -159,7 +159,7 @@ function frontend()

?>
<script type="text/javascript">
const halloween = "<?= $halloween; ?>";
const christmas = "<?= $christmas; ?>";
const nAppId = "<?= $apps[$app]['id']; ?>";
const dCurrentApp = <?= json_encode($apps[$app]); ?>;
const version = "<?= OSEKAI_VERSION ?>";
Expand Down Expand Up @@ -293,9 +293,6 @@ function css()
}

// set the accent

$apps[$app]['color_dark'] = "60,24,10";
$apps[$app]['color'] = "180,60,10";
if (isset($accent_override)) {
$apps[$app]['color_dark'] = implode(",", $accent_override[1]);
$apps[$app]['color'] = implode(",", $accent_override[0]);
Expand All @@ -304,7 +301,6 @@ function css()
$colourDarkHsl = rgbToHsl($colourDark[0], $colourDark[1], $colourDark[2]);
$colour = explode(",", $apps[$app]['color_dark']);
$colourHsl = rgbToHsl($colour[0], $colour[1], $colour[2]);

echo '<style>
html {
--accentdark: ' . $apps[$app]['color_dark'] . ';
Expand Down Expand Up @@ -379,7 +375,7 @@ function navbar()
global $server_root;
global $actual_link;
global $loginurl;
global $halloween;
global $christmas;
global $otherApps; // what the fuck

$_SESSION['redirect_url'] = true;
Expand Down

0 comments on commit c69bdd5

Please sign in to comment.