-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ba484a
commit a4f105b
Showing
11 changed files
with
95 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const Times = { | ||
breakfastOver: 11, | ||
smashStart: 12, | ||
lunchStart: 13, | ||
lunchOver: 14, | ||
judgeStart: 17, | ||
}; | ||
|
||
const now = new Date(); | ||
const hours = now.getHours(); | ||
const bg = document.getElementById('splash'); | ||
|
||
switch (true) { | ||
case hours < Times.breakfastOver: | ||
bg.style.backgroundImage = 'url(/media/banners/donut-boxes.jpg)'; | ||
break; | ||
case hours < Times.smashStart: | ||
bg.style.backgroundImage = 'url(/media/banners/smash.jpg)'; | ||
break; | ||
case hours < Times.lunchStart: | ||
bg.style.backgroundImage = 'url(/media/banners/sponsor24.png)'; | ||
console.log('Lunch is ongoing'); | ||
break; | ||
case hours < Times.judgeStart: | ||
bg.style.backgroundImage = 'url(/media/banners/sponsor24.png)'; | ||
break; | ||
default: | ||
console.log('Judging in progress'); | ||
bg.style.backgroundImage = 'url(/media/banners/judging.jpg)'; | ||
break; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters