Fix snow effect

This commit is contained in:
Michael Reber 2020-12-01 15:46:11 +01:00
parent 2979f53794
commit c4152ebd4f
5 changed files with 23 additions and 24 deletions

View File

@ -26,6 +26,7 @@ Set width and height for the calendar:
"calendarHeight": "827", "calendarHeight": "827",
"useModal": "true", "useModal": "true",
"showExtras": "true" "showExtras": "true"
"enableSnow": "true"
}, },
... ...
``` ```

View File

@ -24,7 +24,7 @@ a {
height: 100%; height: 100%;
position: absolute; position: absolute;
width: 100%; width: 100%;
z-index: 1000; /*z-index: 60;*/
} }
.modal, .jquery-modal { .modal, .jquery-modal {
z-index: 1040 !important; z-index: 1040 !important;

View File

@ -1,23 +1,3 @@
<?php
$dev = isset($_GET['dev']) ? $_GET['dev'] : false;
if ($dev) {
$config = file_get_contents("./calendar_dev.json");
} else {
$config = file_get_contents("./calendar_prod.json");
}
require "adventCalendar.php";
$calendar = new adventCalendar();
$calendar->load_from_json($config);
echo $calendar->showExtras;
echo $calendar->enableSnow;
$showExtras = ($calendar->showExtras == 'true') ? true : false;
$snow_enabled = ($calendar->enableSnow == 'true') ? true : false;
?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -35,7 +15,7 @@ $snow_enabled = ($calendar->enableSnow == 'true') ? true : false;
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
<link rel="stylesheet" type="text/css" href="css/main-adventskalender.css?v=3.1" media="all"> <link rel="stylesheet" type="text/css" href="css/main-adventskalender.css?v=3.4" media="all">
<!--[if lte IE 9]> <!--[if lte IE 9]>
<style type='text/css'> <style type='text/css'>
@ -62,6 +42,24 @@ $snow_enabled = ($calendar->enableSnow == 'true') ? true : false;
<!-- End Matomo Code --> <!-- End Matomo Code -->
<?php } ?> <?php } ?>
</head> </head>
<?php
$dev = isset($_GET['dev']) ? $_GET['dev'] : false;
if ($dev) {
$config = file_get_contents("./calendar_dev.json");
} else {
$config = file_get_contents("./calendar_prod.json");
}
require "adventCalendar.php";
$calendar = new adventCalendar();
$calendar->load_from_json($config);
//echo $calendar->showExtras;
//echo $calendar->enableSnow;
$showExtras = ($calendar->showExtras == 'true') ? true : false;
$snow_enabled = ($calendar->enableSnow == 'true') ? true : false;
?>
<body> <body>
<?php if ($snow_enabled) { ?> <?php if ($snow_enabled) { ?>
<canvas class="snow" id="snow"></canvas> <canvas class="snow" id="snow"></canvas>