A dynamic php based advent calendar which can be easily configured via a json-config file
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Michael Reber 6b4c77e5a6 update v2 - 2022 2 years ago
_gifts adding screenshot and gitignore file 3 years ago
css Fix snow effect 3 years ago
fonts Initail commit 3 years ago
images Initail commit 3 years ago
README.md Fix some documentation errors 3 years ago
adventCalendar.php update v2 - 2022 2 years ago
calendar_dev.json update v2 - 2022 2 years ago
calendar_prod.json update v2 - 2022 2 years ago
favicon.ico Initail commit 3 years ago
index.php update v2 - 2022 2 years ago

README.md

web advent calendar

A dynamic php based advent calendar which can be easily configured via a json-config file

image

Configuration

There are two different and identical configuration files. One is the "calendar_prod.json" which is loaded by default and the other is the "calendar_dev.json" which is only loaded in development mode

Enable development-mode:

Add the following switch at the end of the URL of the web application to activate the deverlopmend mode

/index.php?dev=1

The application now reads the config file "calendar_dev.json" and unlocks all doors because the values unlockDate in this file are in the past.

Configuration parameter

Set configuration parameters for the calendar:

...
"config": {
    "calendarWidth": "472",
    "calendarHeight": "827",
    "useModal": "true",
    "showExtras": "true",
    "enableSnow": "true"
  },
...

Modify entries for the individual days

...
"entries": [
    {
      "unlockDate": "2020-12-19",
      "doorWidth": "118",
      "doorHeight": "118",
      "positionTop": "0",
      "positionLeft": "0",
      "doorImageLeft": "images/19.png",
      "backgroundImage": "images/background1x1.png",
      "url": "adv19"
    },
    ...
]
...

Browser support

Unfortunately, older versions of Internet Explorer do not support CSS3 that well. The example calendar uses a fallback where the calendar doors are just hidden on hover.