This commit is contained in:
MLH
2024-12-15 02:37:51 +01:00
parent a94cddc207
commit 5017d9a3a2

View File

@ -24,10 +24,10 @@ const themeConfigs = {
js: 'fireworks.js', js: 'fireworks.js',
containerClass: 'fireworks' containerClass: 'fireworks'
}, },
haloween: { halloween: {
css: 'haloween.css', css: 'halloween.css',
js: 'haloween.js', js: 'halloween.js',
containerClass: 'haloween' containerClass: 'halloween'
}, },
summer: { summer: {
css: 'summer.css', css: 'summer.css',
@ -50,8 +50,11 @@ const themeConfigs = {
function determineCurrentTheme() { function determineCurrentTheme() {
const date = new Date(); const date = new Date();
const month = date.getMonth(); const month = date.getMonth();
const day = date.getDate();
if (month === 11 || month === 0 || month === 1) return 'snowfall'; // december, january, february if (month === 11 || month === 0 || month === 1) return 'snowfall'; // december, january, february
if (month === 9 && day === 31) return 'halloween'; // halloween
if (month === 0 && day === 1) return 'fireworks'; //new year
if (month >= 2 && month <= 4) return 'spring'; if (month >= 2 && month <= 4) return 'spring';
if (month >= 5 && month <= 7) return 'summer'; if (month >= 5 && month <= 7) return 'summer';
if (month >= 8 && month <= 10) return 'autumn'; if (month >= 8 && month <= 10) return 'autumn';