#12200 The Christmas effect is added after 25 clicks on the about image

This commit is contained in:
Jorge Rincon 2023-11-16 10:24:03 +01:00
parent 811363cbec
commit 8635617815
3 changed files with 25 additions and 5 deletions

View File

@ -1328,8 +1328,9 @@ if (is_ajax()) {
<tbody>
<tr>
<th style="width: 40%; border: 0px;">
<a href="https://pandorafms.com/" target="_blank">
<a href="javascript:christmas_click()">
<img src="'.$image_about.'" alt="logo" width="70%">
<input id="count_click" type="hidden" value="0" />
</a>
</th>
<th style="width: 60%; text-align: left; border: 0px;">

View File

@ -1483,6 +1483,18 @@ function show_dialog(dialog) {
}, 50);
}
function christmas_click() {
let counter = $("#count_click").val();
counter++;
$("#count_click").val(counter);
if (counter == 25) {
$("#container-snow").removeClass("invisible");
setTimeout(() => {
$("#container-snow").addClass("invisible");
}, 30000);
}
}
/*
#############################################################################
##

View File

@ -1199,7 +1199,7 @@ if ($config['pure'] == 0) {
$menuCollapsed = (isset($_SESSION['menu_type']) === true && $_SESSION['menu_type'] !== 'classic');
$menuTypeClass = ($menuCollapsed === true) ? 'collapsed' : 'classic';
// Snow.
$string = '<div id="container-snow" class="tpl-snow">
$string = '<div id="container-snow" class="tpl-snow invisible">
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div><div></div>
@ -1680,9 +1680,16 @@ require 'include/php_to_js_values.php';
// Snow animations.
$(document).ready(function() {
setTimeout(() => {
$("#container-snow").addClass('invisible') ;
}, 30000);
const date = new Date();
const today = date.toLocaleDateString();
const christmasDay = "25-12-2023";
if (today == christmasDay) {
$("#container-snow").removeClass('invisible');
setTimeout(() => {
$("#container-snow").addClass('invisible');
}, 30000);
}
});
</script>