-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit e581544.
- Loading branch information
1 parent
e581544
commit 579edaa
Showing
4 changed files
with
62 additions
and
83 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,58 @@ | ||
d = new Date(); | ||
|
||
if (d.getMonth() === 3) { | ||
const flakeType = (d.getHours() === 13 && d.getMinutes() === 37) ? "--flake-cursed" : "--flake-normal"; | ||
|
||
for(let beerflakes = 0; beerflakes < Math.min(d.getDate(), 24); beerflakes++) | ||
SpawnBeerflake(flakeType); | ||
if(d.getMonth() === 3){ | ||
if(d.getHours() === 13 && d.getMinutes() === 37){ | ||
for(let beerflakes=0; beerflakes < Math.min(d.getDate(), 24); beerflakes++){ | ||
SpawnBeerflakeCursed(); | ||
} | ||
}else{ | ||
for(let beerflakes=0; beerflakes < Math.min(d.getDate(), 24); beerflakes++){ | ||
SpawnBeerflake(); | ||
} | ||
} | ||
|
||
const kylle = document.createElement('div'), | ||
kylleType = (d.getHours() === 13 && d.getMinutes() === 37) ? "--kylle-cursed" : "--kylle-normal"; | ||
|
||
kylle.classList.add("kylle", kylleType); | ||
const kylle = document.createElement('div'); | ||
kylle.classList.add("kylle"); | ||
const gif = document.createElement("img") | ||
if(d.getHours() === 13 && d.getMinutes() === 37){ | ||
gif.src="/static/stregsystem/kylleCursed.gif"; | ||
kylle.setAttribute('style', 'top: 60%'); | ||
}else{ | ||
gif.src="/static/stregsystem/kylle.gif"; | ||
} | ||
kylle.appendChild(gif); | ||
document.body.querySelector(".easter-container").appendChild(kylle); | ||
|
||
SetBodyEasterStyle(); | ||
} | ||
|
||
function SpawnBeerflake (type = "--flake-normal") { | ||
function SpawnBeerflakeCursed () { | ||
const beerflakeCursed = document.createElement('div'); | ||
beerflakeCursed.classList.add("beerflake"); | ||
const gif = document.createElement("img") | ||
gif.src="/static/stregsystem/beerflakeCursed.gif"; | ||
beerflakeCursed.appendChild(gif); | ||
document.body.querySelector(".easter-container").appendChild(beerflakeCursed); | ||
} | ||
|
||
function SpawnBeerflake () { | ||
const beerflake = document.createElement('div'); | ||
beerflake.classList.add("beerflake", type); | ||
beerflake.classList.add("beerflake"); | ||
const gif = document.createElement("img") | ||
gif.src="/static/stregsystem/beerflake.gif"; | ||
beerflake.appendChild(gif); | ||
document.body.querySelector(".easter-container").appendChild(beerflake); | ||
} | ||
|
||
function SetBodyEasterStyle() { | ||
document.body.classList.add("easter-style"); | ||
const bodyStyle = document.body.style; | ||
bodyStyle.color = "black"; | ||
bodyStyle.backgroundImage = "url(\"" + media_url + "stregsystem/easter.jpg\")"; | ||
bodyStyle.backgroundRepeat = "repeat-x"; | ||
bodyStyle.backgroundSize = "auto 100%"; | ||
bodyStyle.padding = "0"; | ||
bodyStyle.margin = "0"; | ||
bodyStyle.width = "100vw"; | ||
bodyStyle.height = "100vh"; | ||
bodyStyle.position = "relative"; | ||
} |