diff --git a/files/assets/css/main.css b/files/assets/css/main.css index e3b65b73df..bedd99d91e 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -5590,12 +5590,12 @@ span > img[src$="/i/talking.webp"]+img[src$="/i/hand.webp"]+img { span > img[src$="/i/love-foreground.webp"]+img[src$="/i/love-background.webp"]+img { position: absolute; z-index: 50; - height: 60%; - width: 60%; + height: 60%; + width: 60%; bottom: -2%; - left: 33%; - transform: scaleX(-1) rotate(-10deg); - -webkit-transform: scaleX(-1) rotate(-10deg); + left: 33%; + transform: scaleX(-1) rotate(-10deg); + -webkit-transform: scaleX(-1) rotate(-10deg); } span > img[src$="/i/love-foreground.webp"] { @@ -6758,13 +6758,13 @@ g { .rainbow-text:not(a) { background-image: repeating-linear-gradient(135deg, violet, rgb(178, 94, 238), lightblue, green, yellow, orange, #ff7f7f 50%) !important; color: transparent !important; + font-weight: 700 !important; background-clip: text !important; -webkit-background-clip: text !important; - font-weight: 700 !important; } -.queen:not(a) { - color: hotpink !important; +.queen:not(a):not(.ectoplasm) { + color: hotpink; font-weight: 700 !important; text-transform: lowercase !important; } @@ -7085,7 +7085,7 @@ div.markdown { } .resizable.yt { display: block; - width: min(100%, 500px); + width: min(100%, 500px); } .resizable > * { height: 95% !important; @@ -7713,17 +7713,17 @@ body { } * { - word-break: break-word !important; + word-break: break-word !important; overflow-wrap: break-word !important; } .table *, .playing-card_large { - word-break: keep-all !important; + word-break: keep-all !important; } .user-card-bio { max-height: 50px; - overflow-y: auto; + overflow-y: auto; } .profile-pic, .profile-pic-20, .pp20, .profile-pic-25, .profile-pic-30, .profile-pic-35, .profile-pic-50, .profile-pic-65, .profile-pic-75, .profile-pic-100, img[src^="/pp/"], img[src^="/uid/"], img[src$="/pic"] { diff --git a/files/assets/css/themes/classic.css b/files/assets/css/themes/classic.css index 51ef1d83cd..80a3dce9d8 100644 --- a/files/assets/css/themes/classic.css +++ b/files/assets/css/themes/classic.css @@ -181,7 +181,7 @@ blockquote a { background-color: #d9d9d9 !important; } *:target { - background: rgba(var(--primary_rgb), 0.2) !important; + background: rgba(var(--primary_rgb), 0.2) !important; } /*userpage*/ diff --git a/files/assets/css/themes/classic_dark.css b/files/assets/css/themes/classic_dark.css index 0b60f988c1..55cfb8264e 100644 --- a/files/assets/css/themes/classic_dark.css +++ b/files/assets/css/themes/classic_dark.css @@ -14,5 +14,5 @@ } .unread { - background-color: #3d3d3d !important; + background-color: #3d3d3d !important; } diff --git a/files/assets/css/themes/dark.css b/files/assets/css/themes/dark.css index c0432476e4..74c90c770d 100644 --- a/files/assets/css/themes/dark.css +++ b/files/assets/css/themes/dark.css @@ -102,5 +102,5 @@ pre { } *:target { - background: rgba(var(--primary_rgb), 0.2) !important; + background: rgba(var(--primary_rgb), 0.2) !important; } diff --git a/files/assets/css/themes/light.css b/files/assets/css/themes/light.css index 3e2a52d002..7de8bf4f5c 100644 --- a/files/assets/css/themes/light.css +++ b/files/assets/css/themes/light.css @@ -80,7 +80,7 @@ blockquote { background: #dddddd !important; } *:target { - background: rgba(var(--primary_rgb), 0.2) !important; + background: rgba(var(--primary_rgb), 0.2) !important; } .visited, h5.post-title a:visited, a[href^="https://"]:not([href^="https://rdrama.net" i], [href^="https://watchpeopledie.tv" i], .dropdown-item, .nav-link, .no-visited):visited { @@ -88,5 +88,5 @@ blockquote { } .award-name { - color: var(--black); + color: var(--black); } diff --git a/files/assets/css/themes/win98.css b/files/assets/css/themes/win98.css index 6c1d5a1c9c..4a418983de 100644 --- a/files/assets/css/themes/win98.css +++ b/files/assets/css/themes/win98.css @@ -179,9 +179,9 @@ blockquote { } .award-name { - color: var(--black); + color: var(--black); } .modal-content { - background-color: var(--gray-500); + background-color: var(--gray-500); } diff --git a/files/assets/events/DKD/js/music.js b/files/assets/events/DKD/js/music.js index 58906f1332..61d342c24f 100644 --- a/files/assets/events/DKD/js/music.js +++ b/files/assets/events/DKD/js/music.js @@ -1,6 +1,6 @@ -const song = document.getElementById('DKD-song').value; +const song = document.getElementById('event-song').value; const audio = new Audio(song); -audio.loop=true; +audio.loop = true; audio.play(); document.addEventListener('click', () => { diff --git a/files/assets/events/fistmas/css/candycane.css b/files/assets/events/fistmas/css/candycane.css index 0907c4a4a4..333c6dc8a0 100644 --- a/files/assets/events/fistmas/css/candycane.css +++ b/files/assets/events/fistmas/css/candycane.css @@ -9,14 +9,18 @@ background-clip: text; color: transparent; -webkit-background-clip: text; - animation: 45s linear 0s infinite candycorn-move; + animation: 45s linear 0s infinite candy-corn-move; } #post-title a { color: transparent !important; } -@keyframes candycorn-move { +#post-title:hover, #post-content p:hover { + animation-duration: 10s; +} + +@keyframes candy-corn-move { from {background-position: 0px;} to {background-position: 1000px;} } diff --git a/files/assets/events/fistmas/css/fistmas.css b/files/assets/events/fistmas/css/fistmas_main.css similarity index 98% rename from files/assets/events/fistmas/css/fistmas.css rename to files/assets/events/fistmas/css/fistmas_main.css index 9410ce5307..01b6d5cefa 100644 --- a/files/assets/events/fistmas/css/fistmas.css +++ b/files/assets/events/fistmas/css/fistmas_main.css @@ -51,7 +51,7 @@ body { border-color: var(--primary) !important; } -.btn { +.btn:not(.award-tab, .shop-tab) { background: var(--primary) !important; border-color: var(--primary) !important; border-width: 2px; @@ -470,7 +470,6 @@ body { } -/* asdf */ blockquote { background-color: var(--gray-300); } @@ -482,3 +481,10 @@ blockquote { #profile--bio { color: white !important; } + +/* Eyes */ +.eye { + position: relative; + width: 26px; + height: 26px; +} diff --git a/files/assets/events/fistmas/images/sidebar/2.webp b/files/assets/events/fistmas/images/sidebar/1.webp similarity index 100% rename from files/assets/events/fistmas/images/sidebar/2.webp rename to files/assets/events/fistmas/images/sidebar/1.webp diff --git a/files/assets/events/homoween/audio/haunted/thunder1.mp3 b/files/assets/events/homoween/audio/haunted/thunder1.mp3 new file mode 100644 index 0000000000..2430c44c1d Binary files /dev/null and b/files/assets/events/homoween/audio/haunted/thunder1.mp3 differ diff --git a/files/assets/events/homoween/audio/haunted/thunder2.mp3 b/files/assets/events/homoween/audio/haunted/thunder2.mp3 new file mode 100644 index 0000000000..fb7a570622 Binary files /dev/null and b/files/assets/events/homoween/audio/haunted/thunder2.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/Ambush jumpscare but animated.mp3 b/files/assets/events/homoween/audio/jumpscares/Ambush jumpscare but animated.mp3 new file mode 100644 index 0000000000..7c264ffffc Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/Ambush jumpscare but animated.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/Doors Rush jumpscare.mp3 b/files/assets/events/homoween/audio/jumpscares/Doors Rush jumpscare.mp3 new file mode 100644 index 0000000000..93dca87b39 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/Doors Rush jumpscare.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/Fnaf 2 jumpscare sound effect.mp3 b/files/assets/events/homoween/audio/jumpscares/Fnaf 2 jumpscare sound effect.mp3 new file mode 100644 index 0000000000..d6415bf601 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/Fnaf 2 jumpscare sound effect.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/dancing rat jumpscare.mp3 b/files/assets/events/homoween/audio/jumpscares/dancing rat jumpscare.mp3 new file mode 100644 index 0000000000..727d42a704 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/dancing rat jumpscare.mp3 differ diff --git a/files/assets/events/homoween/audio/jumpscares/scream_test_1.mp3 b/files/assets/events/homoween/audio/jumpscares/scream_test_1.mp3 new file mode 100644 index 0000000000..32ae5bb594 Binary files /dev/null and b/files/assets/events/homoween/audio/jumpscares/scream_test_1.mp3 differ diff --git a/files/assets/events/homoween/css/awards_poor.css b/files/assets/events/homoween/css/awards_poor.css new file mode 100644 index 0000000000..c7ec9279d5 --- /dev/null +++ b/files/assets/events/homoween/css/awards_poor.css @@ -0,0 +1,26 @@ +.poor { + position: fixed; + background-repeat: no-repeat; + width: 100%; + height: 100%; + pointer-events:none; +} + +#fog-effect-poor { + background-image: url(/assets/events/homoween/images/poor/fog.webp); + background-size: cover; + z-index: 9998; + opacity:0.7; +} + +#stab-effect-poor { + background-image: url(/assets/events/homoween/images/poor/blood.webp); + z-index: 9997; +} + +#flashlight-effect-poor { + background-image: url(/assets/events/homoween/images/poor/flashlight.webp); + z-index: 9995; + background-size: cover; + background-position: center; +} diff --git a/files/assets/events/homoween/css/banner.css b/files/assets/events/homoween/css/banner.css new file mode 100644 index 0000000000..950d149b28 --- /dev/null +++ b/files/assets/events/homoween/css/banner.css @@ -0,0 +1,231 @@ +/* text */ +#banner-homoween-title.life > tspan { + opacity: 1; +} +#banner-homoween-title { + text-shadow: 0 4px 10px #ff000060; +} +#banner-homoween-title.life > #banner-homoween-title { + animation: blinker 0.5s forwards; +} +@media (max-width: 767.98px) { + #banner-homoween-title { + transform: scale(1.4) translate(-90px, -120px); + animation:none !important; + } + #banner-homoween-presenting { + transform: scale(1.4) translate(-90px, -120px); + } + #banner-homoween-bats { + display:none; + } +} + +@keyframes float { + 0% { + transform: translateY(0px); + } + 50% { + transform: translateY(-6px); + } + 100% { + transform: translateY(0px); + } +} +@keyframes blinker { + 10% { + opacity: 0; + } + , + 30% { + opacity: 0.4; + } + , + 60% { + opacity: 0.2; + } + , + 85% { + opacity: 0.5; + } + , + 100% { + opacity: 0.9; + } +} + +/*days*/ +:root { + /*sky*/ + --sky-gradient-day1: radial-gradient(at bottom, #d43a27 25%, #761ab3 100%); + --sky-gradient-day2: radial-gradient(at bottom, #bf055c 25%, #6b007d 70%); + --sky-gradient-day3: radial-gradient(at bottom, #bf0583 5%, #560272 60%); + --sky-gradient-day4: radial-gradient(at bottom, #930184 -15%, #490272 60%); + --sky-gradient-day5: radial-gradient(at bottom, #800073 -55%, #400179 60%); + --sky-gradient-day6: radial-gradient(at bottom, #69017a 25%, #390271 70%); + --sky-gradient-day7: radial-gradient(at bottom, #69017a 25%, #2d005b 70%); + --sky-gradient-day8: radial-gradient(at bottom, #af00a6 -20%, #270146 70%); + --sky-gradient-day9: radial-gradient(at bottom, #69047b -10%, #1e0037 70%); + --sky-gradient-day10: radial-gradient(at bottom, #59047b 10%, #150026 70%); + + /*moon*/ + --moon-fill-day1:gold; + --moon-fill-day2:gold; + --moon-fill-day3:goldenrod; + --moon-fill-day4:none; + --moon-fill-day5:none; + --moon-fill-day6:#e4e4e4; + --moon-fill-day7:#e4e4e4; + --moon-fill-day8:#e4e4e4; + --moon-fill-day9:#e4e4e4; + --moon-fill-day10:#e4e4e4; + + --moon-shadow-day1:drop-shadow(0px 0px 20px yellow); + --moon-shadow-day2:drop-shadow(0px 0px 20px yellow); + --moon-shadow-day3:drop-shadow(0px 0px 20px gold); + --moon-shadow-day4:none; + --moon-shadow-day5:none; + --moon-shadow-day6:drop-shadow(0px 0px 5px #deddcf); + --moon-shadow-day7:drop-shadow(0px 0px 10px #deddcf); + --moon-shadow-day8:drop-shadow(0px 0px 10px #deddcf); + --moon-shadow-day9:drop-shadow(0px 0px 10px #deddcf); + --moon-shadow-day10:drop-shadow(0px 0px 10px #deddcf); + + --moon-position-day1:303px; + --moon-position-day2:308px; + --moon-position-day3:320px; + --moon-position-day4:350px; + --moon-position-day5:350px; + --moon-position-day6:322px; + --moon-position-day7:312px; + --moon-position-day8:308px; + --moon-position-day9:303px; + --moon-position-day10:300px; + + /*ground*/ + --ground-shadow-day1:#5818bd; + --ground-shadow-day2:#5818bd; + --ground-shadow-day3:#5818bd; + --ground-shadow-day4:#5818bd; + --ground-shadow-day5:#5818bd; + --ground-shadow-day6:#5818bd; + --ground-shadow-day7:#4e16a6; + --ground-shadow-day8:#51009a; + --ground-shadow-day9:#4b028c; + --ground-shadow-day10:#41017b; + + --house-shadow-day1:#5818bd; + --house-shadow-day2:#5818bd; + --house-shadow-day3:#5818bd; + --house-shadow-day4:#5818bd; + --house-shadow-day5:#5818bd; + --house-shadow-day6:#5818bd; + --house-shadow-day7:#5818bd; + --house-shadow-day8:#4a149f; + --house-shadow-day9:#431290; + --house-shadow-day10:#3a1476; + + --object-fill-day1:#240441; + --object-fill-day2:#240441; + --object-fill-day3:#240441; + --object-fill-day4:#240441; + --object-fill-day5:#240441; + --object-fill-day6:#240441; + --object-fill-day7:#240441; + --object-fill-day8:#1e0538; + --object-fill-day9:#18042c; + --object-fill-day10:#18042c; + + --star-opacity-day1: 0; + --star-opacity-day2: 0; + --star-opacity-day3: 0; + --star-opacity-day4: 0.2; + --star-opacity-day5: 0.3; + --star-opacity-day6: 0.4; + --star-opacity-day7: 0.5; + --star-opacity-day8: 0.5; + --star-opacity-day9: 0.6; + --star-opacity-day10: 0.7; +} + +/* stars */ +.star { + animation: linear infinite alternate twinkle; +} + +.star1 { + animation-duration: 3s; +} + +.star2 { + animation-duration: 4s; +} + +.star3 { + animation-duration: 3.5s; +} + +.star4 { + animation-duration: 2s; +} + +.star5 { + animation-duration: 4s; +} + +.star1 circle { + r: 0.5px; +} +.star2 circle { + r: 0.75px; +} +.star3 circle { + r: 1.0px; +} +.star4 circle { + r: 1.2px; +} +.star5 circle { + r: 1.5px; +} + +@media (max-width: 767.98px) { + .star { + animation: none; + fill-opacity: 0.5; + } + .star1 circle { + r: 1px; + } + .star2 circle { + r: 1.5px; + } + .star3 circle { + r: 2px; + } + .star4 circle { + r: 2px; + } + .star5 circle { + r: 2.5px; + } +} + +@keyframes twinkle { + 0% { + opacity: 1; + } + 50% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +#banner-homoween-title { + animation: float infinite 8s ease-in-out; +} +#banner-homoween-title > tspan { + opacity: 0; +} diff --git a/files/assets/events/homoween/css/ectoplasm.css b/files/assets/events/homoween/css/ectoplasm.css new file mode 100644 index 0000000000..d87586d685 --- /dev/null +++ b/files/assets/events/homoween/css/ectoplasm.css @@ -0,0 +1,4 @@ +#banner-homoween-title { + text-shadow: 0 0 40px #3AE63A; + fill: #90ee90; +} diff --git a/files/assets/events/homoween/css/flashlight.css b/files/assets/events/homoween/css/flashlight.css new file mode 100644 index 0000000000..fe85cac3ff --- /dev/null +++ b/files/assets/events/homoween/css/flashlight.css @@ -0,0 +1,40 @@ +#flashlight-effect { + --Xpos: 50vw; + --Ypos: 50vh; + position: fixed; + width:100%; + height:100%; + z-index:1061; + pointer-events:none; + opacity:0.8; + /*looks better but is too expensive to justify :(*/ + backdrop-filter: brightness(1.5); + background-color: rgba(256,256,256,0.06); +} +#flashlight-effect:before { + content: ""; + display: block; + width: 100%; + height: 100%; + position: absolute; + pointer-events: none; + background: radial-gradient( + circle 30vmax at var(--Xpos) var(--Ypos), + rgba(0,0,0,0) 0%, + rgba(0,0,0,.5) 70%, + rgba(0,0,0,.93) 100% + ); + z-index: 1061; +} +@media (max-width: 767.98px) { + #flashlight-effect::before { + background: radial-gradient( + circle 20em at 50% var(--Ypos), + rgba(0,0,0,0) 0%, + rgba(0,0,0,0) 80%, + rgba(0,0,0,.93) 100% + ); + opacity:0.9; + pointer-events: none; + } +} diff --git a/files/assets/events/homoween/css/haunted.css b/files/assets/events/homoween/css/haunted.css new file mode 100644 index 0000000000..09c1d490c1 --- /dev/null +++ b/files/assets/events/homoween/css/haunted.css @@ -0,0 +1,21 @@ +#haunted-effect { + position: fixed; + width:100%; + height:100%; + pointer-events:none; +} +#haunt-bg { + position: fixed; + background-repeat: no-repeat; + width: 100%; + height: 100%; + pointer-events:none; + background-color: var(--background); + z-index:0; +} +#banner-homoween-title { + opacity: 0; +} +#banner-homoween-text-evil { + opacity: 1 !important; +} diff --git a/files/assets/events/homoween/css/haunted2.css b/files/assets/events/homoween/css/haunted2.css new file mode 100644 index 0000000000..a585593da1 --- /dev/null +++ b/files/assets/events/homoween/css/haunted2.css @@ -0,0 +1,3 @@ +img { + filter: invert(1); +} diff --git a/files/assets/events/homoween/css/homoween_main.css b/files/assets/events/homoween/css/homoween_main.css new file mode 100644 index 0000000000..e0c69aabf5 --- /dev/null +++ b/files/assets/events/homoween/css/homoween_main.css @@ -0,0 +1,879 @@ +@charset "UTF-8"; + +/* Fonts */ +@font-face { + font-family: 'Creepster'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url("/assets/events/homoween/fonts/Creepster.woff2") format("woff2"); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +@font-face { + font-family: "DoubleFeature"; + src: url("/assets/events/homoween/fonts/DoubleFeature.woff") format("woff"); +} + +@font-face { + font-family: "Jo_wrote_a_lovesong"; + src: url("/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff") format("woff"); +} + +@font-face { + font-family: "XTypewriter-Regular"; + src: url("/assets/events/homoween/fonts/XTypewriter-Regular.woff") format("woff"); +} + +@font-face { + font-family: "SpecialElite-Regular"; + src: url("/assets/events/homoween/fonts/SpecialElite-Regular.woff") format("woff"); +} + +/* Homoween Theming */ +:root { + --primary: #F66A3C; + --dark: #140224; + --secondary: #820263; + --white: #E1E1E1; + --black: #CFCFCF; + --light: #170535; + --muted: #E1E1E1; + --gray: #383838; + --gray-100: #E1E1E1; + --gray-200: #E1E1E1; + --gray-300: #291720; + --gray-400: #303030; + --gray-500: var(--dark); + --gray-600: var(--dark); + --gray-700: var(--dark); + --gray-800: var(--dark); + --gray-900: var(--dark); + --background: var(--dark); +} + +body { + overflow-x: hidden; +} + +#header--icon { + height: 33px; + width: 33px; + object-fit: contain; +} + +* { + border-color: var(--primary); +} + +a:hover.user-name { + cursor: url('/assets/events/homoween/images/machete.webp'), auto !important; +} + +.border { + border-color: var(--primary) !important; +} + +.form-control { + background: transparent; + border-color: var(--primary) !important; +} + +.btn { + background: transparent; + border-color: var(--primary) !important; + border-width: 2px; +} + +.form-control:disabled, .form-control[readonly] { + background: transparent; + border-color: var(--primary) !important; +} + +.btn-success { + border-color: #38A169 !important; +} + +.btn-danger { + border-color: #E53E3E !important; +} + +#frontpage .pseudo-submit-form.card .card-body .form-control { + border-color: transparent !important; +} + +.btn-lg { + border-color: transparent !important; +} + +pre { + color: #CFCFCF; +} + +.transparent { + background: None !important; +} + +#frontpage .post-title a:visited { + color: #7a7a7a !important; +} + +.post-title a, h1.post-title { + font-family: 'SpecialElite-Regular'; + font-size: 1.25rem; +} + +.arrow-up::before, .arrow-down::before { + content: '\f720'; + width: 20px; +} + +.arrow-down::before { + display: inline-block; + transform: rotate(180deg); +} + +#thread .arrow-up::before, #thread .arrow-down::before { + content: '\f720'; + width: 17px; + } + +/* Cob Webs */ +body::before { + content: ''; + position: fixed; + background-image: url('/assets/events/homoween/images/cobweb-bl.webp'); + background-size: contain; + background-repeat: no-repeat; + left: -1.5rem; + bottom: -1.5rem; + width: 170px; + height: 230px; + z-index: 10001; + pointer-events: none; + transform: rotate(180deg); + opacity: .5; +} + +body::after { + content: ''; + position: fixed; + background-image: url('/assets/events/homoween/images/cobweb-tr.webp'); + background-size: contain; + background-repeat: no-repeat; + right: -1.5rem; + top: -1.5rem; + width: 160px; + height: 160px; + z-index: 10001; + pointer-events: none; + opacity: .45; +} + +/* Blood Effect */ +.blood::before { + content: ''; + position: absolute; + background-image: url('/assets/events/homoween/images/blood-anim.webp'); + width: 100%; + height: 55px; + background-repeat: repeat-x; + top: 0; + left: 0; +} + +.blood { + position: relative; +} + +.blood .comment-text { + color: #dc3545 !important; + font-family: 'DoubleFeature'; +} + +.sketch { + z-index: 10000; + position: fixed; + top: 0; + left: 0; + pointer-events: none; +} + +/* Haunted Effect */ +.haunt > div:not(.modal) { + animation: haunted 10s infinite; +} + +@keyframes haunted { + 0% { + backdrop-filter: brightness(20%); + } + 1% { + backdrop-filter: brightness(20%); + } + 2% { + backdrop-filter: sepia(0.8) contrast(1.5) brightness(200%); + } + 3% { + backdrop-filter: sepia(0.8) contrast(1.5) brightness(20%); + } + 4% { + backdrop-filter: brightness(300%); + } + 7% { + backdrop-filter: brightness(1); + } + 100% { + backdrop-filter: brightness(1); + } +} + +@keyframes haunted-upsidedown { + 0% { + backdrop-filter: brightness(20%) sepia(1) saturate(3) hue-rotate(180deg); + } + 1% { + backdrop-filter: brightness(20%) sepia(1) saturate(3) hue-rotate(180deg); + } + 2% { + backdrop-filter: sepia(1) contrast(1.5) brightness(200%) saturate(3) hue-rotate(180deg); + } + 3% { + backdrop-filter: sepia(1) contrast(1.5) brightness(20%) saturate(3) hue-rotate(180deg); + } + 4% { + backdrop-filter: brightness(300%) sepia(1) saturate(3) hue-rotate(180deg); + } + 7% { + backdrop-filter: brightness(1) sepia(1) saturate(3) hue-rotate(180deg); + } + 100% { + backdrop-filter: brightness(1) sepia(1) saturate(3) hue-rotate(180deg); + } +} + +/* Spiders */ +.spider:nth-child(odd) { + animation-name: swingFast; +} + +.spider:nth-child(2) { + animation-delay: 250ms; + animation-duration: 2100ms; + left: 20%; +} + +.spider:nth-child(3) { + animation-delay: 300ms; + animation-duration: 1600ms; + left: 30%; +} + +.spider:nth-child(4) { + animation-delay: 400ms; + animation-duration: 1800ms; + left: 40%; +} + +.spider:nth-child(5) { + animation-delay: 240ms; + animation-duration: 1900ms; + left: 50%; +} + +.spider:nth-child(6) { + animation-delay: 250ms; + animation-duration: 2300ms; + left: 60%; +} + +.spider:nth-child(7) { + animation-delay: 400ms; + animation-duration: 2100ms; + left: 70%; +} + +.spider:nth-child(8) { + animation-delay: 4000ms; + animation-duration: 200ms; + left: 80%; +} + +.spider { + z-index: 10; + position: fixed; + display: inline-block; + top: 0; + left: 10%; + + animation: swing 2s infinite; + transform-origin: top; + + transition: 0.8s ease-in-out; + pointer-events: none; +} + +.spider:hover .body { + transform: rotate(20deg); + transition: 0.4s ease-in-out; +} + +.spider:nth-child(odd):hover .body { + transform: rotate(-10deg); + transition: 0.2s ease-in-out; +} + +.spider .spiderweb { + width: 2px; + height: 200px; + margin-left: 49px; + background: rgba(255, 255, 255, 0.7); +} + +.spider .body { + width: 100px; + height: 80px; + background: #222; + position: relative; + border-radius: 50%; +} + +.spider .body .eye { + width: 28px; + height: 28px; + position: absolute; + bottom: 24px; + background: #fff; + border-radius: 50%; +} + +.spider .body .eye.left { + left: 20px; +} + +.spider .body .eye.right { + right: 20px; +} + +.spider .body .eye:after { + background: #222; + width: 7px; + height: 7px; + content: ""; + display: block; + margin: 55%; + border-radius: 50%; + + animation: look 4s infinite; +} + +.spider:nth-child(8) .body .eye { + background-color: #FF0000; + background: radial-gradient(#FF9B9B, #FF0000); +} + +.spider:nth-child(odd) .body .eye:after { + animation-delay: 1400ms; + animation-duration: 3600ms; +} + +.spider .legs .leg { + width: 80px; + height: 40px; + margin-top: -20px; + border: 5px solid transparent; + border-top-color: #333; + border-radius: 40px 40px 0 0; +} + +.spider .legs { + position: absolute; + bottom: -10%; + z-index: -1; +} + +.spider .legs.left { + left: -70%; +} +.spider .legs.right { + right: -60%; +} + +.legs.left .leg:nth-child(1) { + transform: rotate(10deg); + margin-left: 10px; +} +.legs.right .leg:nth-child(1) { + transform: rotate(-10deg); + margin-left: -10px; +} + +.legs.left .leg:nth-child(2) { + transform: rotate(-20deg); + margin-left: 20px; +} +.legs.right .leg:nth-child(2) { + transform: rotate(20deg); + margin-left: -20px; +} + +.legs.left .leg:nth-child(3) { + transform: rotate(-50deg); + margin-left: 30px; +} +.legs.right .leg:nth-child(3) { + transform: rotate(50deg); + margin-left: -30px; +} + +@keyframes look { + 0%, + 40%, + 100% { + transform: translateX(0); + } + + 45%, + 95% { + transform: translateX(-100%); + } +} + +@keyframes swing { + 0%, + 100% { + transform: translateY(0); + } + + 50% { + transform: translateY(-24px); + } +} + +@keyframes swingFast { + 0%, + 100% { + transform: translateY(0); + } + + 55% { + transform: translateY(-36px); + } +} + +/* Fog effect */ +.fog-effect { + opacity: 0.35; +} + +#fog-effect { + pointer-events: none; + position:fixed; + bottom:0; + left: 0; + width:100%; + height: 100%; + z-index: 1031; +} + +/* Eyes */ +.eye { + position: relative; + width: 26px; + height: 26px; +} + +/* Candy Corn */ +.candy-corn { + --color3: #FBED21; + --color2: #F66A3C; + --color1: #FDFBDA; + font-family: "Open Sans", sans-serif !important; + background: repeating-linear-gradient( + 45deg, + var(--color1), + var(--color1) 10px, + var(--color2) 20px, + var(--color2) 20px, + var(--color3) 60px, + var(--color3) 60px + ); + background-clip: text; + color: transparent !important; + -webkit-background-clip: text; + animation: 32s linear 0s infinite candy-corn-move; +} + +.candy-corn:not(a) > p { + color: transparent !important; +} + +#post-title > a.candy-corn { + color: transparent; +} + +.candy-corn:hover { + animation-duration: 10s; +} + +@keyframes candy-corn-move { + from { + background-position: 0px; + } + to { + background-position: 1000px; + } +} + +/* Ectoplasm */ +.ectoplasm { + text-shadow: 0 0 20px #3AE63A; +} + +.ectoplasm .comment-text > p, .ectoplasm .post-body, h1.ectoplasm { + font-family: 'Creepster'; + color: #90ee90; + letter-spacing: 0.15em; +} + +.ectoplasm .candy-corn { + --color3: rgb(140, 255, 0); + --color2: rgb(0, 111, 0); + --color1: rgb(131, 255, 131); + text-shadow: none; +} + +.ectoplasm.blood .comment-text > p { + font-family: 'DoubleFeature'; + letter-spacing: initial; +} + +.ectoplasm .rainbow-text > p { + color: #90ee90 !important; + font-weight: initial; +} + +.ectoplasm .comment-text, .ectoplasm .post-body, h1.ectoplasm { + overflow:visible !important; +} + +/* Upsidedown */ +#canvas { + position:absolute; + pointer-events:none; +} + +/* Bones */ +#animate{ + margin-left:45%; + margin-top:-5%; + position: fixed; + z-index:999; + pointer-events: none; + opacity:0.9; +} + +/* Pumpkin */ +.fall-pumpkin { + color: #fff; + font-size: 1em; + font-family: Serif; + text-shadow: 0 0 1px #000; + pointer-events: none; +} + +@-webkit-keyframes fall-pumpkins-fall { + 0% { + top: -20% + } + 100% { + top: 100% + } +} + +@-webkit-keyframes fall-pumpkins-shake { + 0% { + -webkit-transform: translateX(0px); + transform: translateX(0px) + } + 50% { + -webkit-transform: translateX(80px); + transform: translateX(80px) + } + 100% { + -webkit-transform: translateX(0px) rotate(360deg); + transform: translateX(0px) rotate(360deg); + } +} + +@keyframes fall-pumpkins-fall { + 0% { + top: -20% + } + 100% { + top: 100% + } +} + +@keyframes fall-pumpkins-shake { + 0% { + transform: translateX(0px) + } + 50% { + transform: translateX(80px) + } + 100% { + transform: translateX(0px) rotate(360deg); + } +} + +.fall-pumpkin { + position: fixed; + top: -20%; + z-index: 999; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: default; + -webkit-animation-name: fall-pumpkins-fall, fall-pumpkins-shake; + -webkit-animation-duration: 10s, 4s; + -webkit-animation-timing-function: linear, ease-in-out; + -webkit-animation-iteration-count: infinite, infinite; + -webkit-animation-play-state: running, running; + animation-name: fall-pumpkins-fall, fall-pumpkins-shake; + animation-duration: 10s, 4s; + animation-timing-function: linear, ease-in-out; + animation-iteration-count: infinite, infinite; + animation-play-state: running, running +} + +.fall-pumpkin:nth-of-type(0) { + left: 1%; + -webkit-animation-delay: 0s, 0s; + animation-delay: 0s, 0s +} +.fall-pumpkin:nth-of-type(1) { + left: 10%; + -webkit-animation-delay: 1s, 1s; + animation-delay: 1s, 1s +} +.fall-pumpkin:nth-of-type(2) { + left: 20%; + -webkit-animation-delay: 6s, .5s; + animation-delay: 6s, .5s +} +.fall-pumpkin:nth-of-type(3) { + left: 30%; + -webkit-animation-delay: 4s, 2s; + animation-delay: 4s, 2s +} +.fall-pumpkin:nth-of-type(4) { + left: 40%; + -webkit-animation-delay: 2s, 2s; + animation-delay: 2s, 2s +} +.fall-pumpkin:nth-of-type(5) { + left: 50%; + -webkit-animation-delay: 8s, 3s; + animation-delay: 8s, 3s +} +.fall-pumpkin:nth-of-type(6) { + left: 60%; + -webkit-animation-delay: 6s, 2s; + animation-delay: 6s, 2s +} +.fall-pumpkin:nth-of-type(7) { + left: 70%; + -webkit-animation-delay: 2.5s, 1s; + animation-delay: 2.5s, 1s +} +.fall-pumpkin:nth-of-type(8) { + left: 80%; + -webkit-animation-delay: 1s, 0s; + animation-delay: 1s, 0s +} +.fall-pumpkin:nth-of-type(9) { + left: 90%; + -webkit-animation-delay: 3s, 1.5s; + animation delay: 3s, 1.5s +} +.fall-pumpkin:nth-of-type(10) { + left: 100%; + -webkit-animation-delay: 3s, 2s; + animation-delay: 3s, 2s +} +.fall-pumpkin:nth-of-type(11) { + left: 5%; + -webkit-animation-delay: 1s, 4s; + animation-delay: 1s, 4s +} +.fall-pumpkin:nth-of-type(12) { + left: 15%; + -webkit-animation-delay: 1s, 1.5s; + animation-delay: 1s, 1.5s +} +.fall-pumpkin:nth-of-type(13) { + left: 25%; + -webkit-animation-delay: 6s, 2.5s; + animation-delay: 6s, 2.5s +} +.fall-pumpkin:nth-of-type(14) { + left: 35%; + -webkit-animation-delay: 4s, 1s; + animation-delay: 4s, 1s +} +.fall-pumpkin:nth-of-type(15) { + left: 45%; + -webkit-animation-delay: 2s, 4s; + animation-delay: 2s, 4s +} +.fall-pumpkin:nth-of-type(16) { + left: 55%; + -webkit-animation-delay: 8s, 3s; + animation-delay: 8s, 3s +} +.fall-pumpkin:nth-of-type(17) { + left: 65%; + -webkit-animation-delay: 6s, 3s; + animation-delay: 6s, 3s +} +.fall-pumpkin:nth-of-type(18) { + left: 75%; + -webkit-animation-delay: 2.5s, 4s; + animation-delay: 2.5s, 4s +} +.fall-pumpkin:nth-of-type(19) { + left: 85%; + -webkit-animation-delay: 2s, 0s; + animation-delay: 2s, 0s +} +.fall-pumpkin:nth-of-type(20) { + left: 95%; + -webkit-animation-delay: 3s, 1.5s; + animation delay: 3s, 1.5s +} + +.animate-spin { + animation: spin 5600ms linear infinite; +} + +@keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +/* Trick or Treat */ +#trick-or-treat { + font-family: Jo_wrote_a_lovesong; + font-size: 2rem; + letter-spacing: 0.5rem; + border-color: var(--primary) !important; +} + +#trick-or-treat::before { + content:""; + background-image:url('/e/marseyface.webp'); ; + background-size: cover; + height:28px; + width:32px; + display:inline-block; +} + +#trick-or-treat::after { + content:""; + background-image:url('/e/marseytrickortreat.webp'); ; + background-size: cover; + height:28px; + width:32px; + display:inline-block; +} + +#jump-scare-img { + position: fixed; + left: 0; + top: 0; + height: 100%; + width: 100%; + z-index: 9999; + object-fit: cover; + pointer-events: none; + } + +/* progressbar */ +.progress { + background-color: #1d9bf0; + background-image: linear-gradient(0deg, #1d9bf0 0%, #59b1ec 100%); + width: 270px; + height: 24px; + border-radius: 4px; + box-shadow: inset 0px 12px 2px #ffffff10; + backdrop-filter: blur(2px) brightness(101%); + margin-bottom: 40px; +} + +.progress::before { + content: "\f48e"; + font-family: "Font Awesome 6 Pro"; + position: absolute; + left: 6px; + top: 2px; + font-size: 13px; + color: #fff; +} +.progress::after { + content: "\f780"; + font-family: "Font Awesome 6 Pro"; + position: absolute; + right: 6px; + top: 2px; + font-size: 13px; + color: #fff; +} + +.progress > .legend { + display: flex; + justify-content: space-between; + margin-top: 6px; + padding: 0 6px; + color: #dc3545; + font-family: -apple-system,BlinkMacSystemFont,segoe ui,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol; + font-size: 12px; + font-weight: bold; +} + +.progress > .legend span:nth-child(1) { + color: #d3bc00; +} + +.bar-left { + display: inline-block; + width: var(--width); + height: 24px; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + background-color: #d3bc00; + background-image: linear-gradient(180deg, #d3bc00 50%, #877800 100%); + box-shadow: inset 0px 12px 2px #ffffff20; + color: white; + text-align: center; +} + +.bar-right { + display: inline-block; + width: var(--width); + height: 24px; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + background-color: #dc3545; + background-image: linear-gradient(180deg, #dc3545 50%, #9e1b32 100%); + box-shadow: inset 2px 12px 0px #ffffff20; + color: white; + text-align: center; + position: absolute; + right: 0; +} diff --git a/files/assets/events/homoween/css/stab.css b/files/assets/events/homoween/css/stab.css new file mode 100644 index 0000000000..4fd5bb2764 --- /dev/null +++ b/files/assets/events/homoween/css/stab.css @@ -0,0 +1,3 @@ +canvas.sketch { + opacity: calc(0.1*{{ stab }}); +} diff --git a/files/assets/events/homoween/css/upsidedown.css b/files/assets/events/homoween/css/upsidedown.css new file mode 100644 index 0000000000..3257c6e0c6 --- /dev/null +++ b/files/assets/events/homoween/css/upsidedown.css @@ -0,0 +1,56 @@ +/* tag 'background-color' is boilerplate here. We only care about the box-shadow and filter effects. We can add a woods background-image for added effect. */ + +body { + background-size: cover; + background-attachment: fixed; + background-color: #000; + filter: sepia(100%) hue-rotate(180deg) saturate(300%); + box-shadow: 0 0 900px rgba(0, 0, 0, 0.9) inset; + overflow-x: hidden; +} + +canvas.particles { + pointer-events: none; + position: fixed; + left: 0; + top: 0; + z-index: 1; + filter: blur(1.5px); + animation: flicker 4s infinite; +} + +@keyframes flicker { + 0% { + filter: brightness(30%); + } + 48% { + filter: brightness(30%); + } + 50% { + filter: contrast(1.5) brightness(40%); + } + 60% { + filter: contrast(1.5) brightness(40%); + } + 62% { + filter: brightness(30%); + } + 78% { + filter: brightness(20%); + } + 84% { + filter: brightness(40%); + } + 88% { + filter: brightness(30%); + } + 96% { + filter: brightness(80%); + } + 98% { + filter: brightness(30%); + } + 100% { + filter: brightness(90%); + } +} diff --git a/files/assets/events/homoween/fonts/Creepster.woff2 b/files/assets/events/homoween/fonts/Creepster.woff2 new file mode 100644 index 0000000000..e3df072b61 Binary files /dev/null and b/files/assets/events/homoween/fonts/Creepster.woff2 differ diff --git a/files/assets/events/homoween/fonts/DoubleFeature.woff b/files/assets/events/homoween/fonts/DoubleFeature.woff new file mode 100644 index 0000000000..ec42c9a5ba Binary files /dev/null and b/files/assets/events/homoween/fonts/DoubleFeature.woff differ diff --git a/files/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff b/files/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff new file mode 100644 index 0000000000..986b741601 Binary files /dev/null and b/files/assets/events/homoween/fonts/Jo_wrote_a_lovesong.woff differ diff --git a/files/assets/events/homoween/fonts/SpecialElite-Regular.woff b/files/assets/events/homoween/fonts/SpecialElite-Regular.woff new file mode 100644 index 0000000000..c32b2a007c Binary files /dev/null and b/files/assets/events/homoween/fonts/SpecialElite-Regular.woff differ diff --git a/files/assets/events/homoween/fonts/Unutterable.woff b/files/assets/events/homoween/fonts/Unutterable.woff new file mode 100644 index 0000000000..fae2f6aaae Binary files /dev/null and b/files/assets/events/homoween/fonts/Unutterable.woff differ diff --git a/files/assets/events/homoween/fonts/XTypewriter-Regular.woff b/files/assets/events/homoween/fonts/XTypewriter-Regular.woff new file mode 100644 index 0000000000..f0b3d36bd8 Binary files /dev/null and b/files/assets/events/homoween/fonts/XTypewriter-Regular.woff differ diff --git a/files/assets/events/homoween/images/blood-anim.webp b/files/assets/events/homoween/images/blood-anim.webp new file mode 100644 index 0000000000..c511faa3fb Binary files /dev/null and b/files/assets/events/homoween/images/blood-anim.webp differ diff --git a/files/assets/events/homoween/images/chud/1.webp b/files/assets/events/homoween/images/chud/1.webp new file mode 100644 index 0000000000..b3362f36f6 Binary files /dev/null and b/files/assets/events/homoween/images/chud/1.webp differ diff --git a/files/assets/events/homoween/images/chud/10.webp b/files/assets/events/homoween/images/chud/10.webp new file mode 100644 index 0000000000..260db4baac Binary files /dev/null and b/files/assets/events/homoween/images/chud/10.webp differ diff --git a/files/assets/events/homoween/images/chud/11.webp b/files/assets/events/homoween/images/chud/11.webp new file mode 100644 index 0000000000..2a92c45770 Binary files /dev/null and b/files/assets/events/homoween/images/chud/11.webp differ diff --git a/files/assets/events/homoween/images/chud/12.webp b/files/assets/events/homoween/images/chud/12.webp new file mode 100644 index 0000000000..b51fa12ec3 Binary files /dev/null and b/files/assets/events/homoween/images/chud/12.webp differ diff --git a/files/assets/events/homoween/images/chud/13.webp b/files/assets/events/homoween/images/chud/13.webp new file mode 100644 index 0000000000..f18ebc6349 Binary files /dev/null and b/files/assets/events/homoween/images/chud/13.webp differ diff --git a/files/assets/events/homoween/images/chud/14.webp b/files/assets/events/homoween/images/chud/14.webp new file mode 100644 index 0000000000..f1e66a64fd Binary files /dev/null and b/files/assets/events/homoween/images/chud/14.webp differ diff --git a/files/assets/events/homoween/images/chud/15.webp b/files/assets/events/homoween/images/chud/15.webp new file mode 100644 index 0000000000..39ba392440 Binary files /dev/null and b/files/assets/events/homoween/images/chud/15.webp differ diff --git a/files/assets/events/homoween/images/chud/16.webp b/files/assets/events/homoween/images/chud/16.webp new file mode 100644 index 0000000000..6e5f879771 Binary files /dev/null and b/files/assets/events/homoween/images/chud/16.webp differ diff --git a/files/assets/events/homoween/images/chud/17.webp b/files/assets/events/homoween/images/chud/17.webp new file mode 100644 index 0000000000..7f8fffa953 Binary files /dev/null and b/files/assets/events/homoween/images/chud/17.webp differ diff --git a/files/assets/events/homoween/images/chud/18.webp b/files/assets/events/homoween/images/chud/18.webp new file mode 100644 index 0000000000..0981cc4836 Binary files /dev/null and b/files/assets/events/homoween/images/chud/18.webp differ diff --git a/files/assets/events/homoween/images/chud/19.webp b/files/assets/events/homoween/images/chud/19.webp new file mode 100644 index 0000000000..92376f495c Binary files /dev/null and b/files/assets/events/homoween/images/chud/19.webp differ diff --git a/files/assets/events/homoween/images/chud/2.webp b/files/assets/events/homoween/images/chud/2.webp new file mode 100644 index 0000000000..85365ef143 Binary files /dev/null and b/files/assets/events/homoween/images/chud/2.webp differ diff --git a/files/assets/events/homoween/images/chud/3.webp b/files/assets/events/homoween/images/chud/3.webp new file mode 100644 index 0000000000..24679eaafd Binary files /dev/null and b/files/assets/events/homoween/images/chud/3.webp differ diff --git a/files/assets/events/homoween/images/chud/4.webp b/files/assets/events/homoween/images/chud/4.webp new file mode 100644 index 0000000000..1f0f990b7a Binary files /dev/null and b/files/assets/events/homoween/images/chud/4.webp differ diff --git a/files/assets/events/homoween/images/chud/5.webp b/files/assets/events/homoween/images/chud/5.webp new file mode 100644 index 0000000000..ee3a8b3458 Binary files /dev/null and b/files/assets/events/homoween/images/chud/5.webp differ diff --git a/files/assets/events/homoween/images/chud/6.webp b/files/assets/events/homoween/images/chud/6.webp new file mode 100644 index 0000000000..e7a07b52fe Binary files /dev/null and b/files/assets/events/homoween/images/chud/6.webp differ diff --git a/files/assets/events/homoween/images/chud/7.webp b/files/assets/events/homoween/images/chud/7.webp new file mode 100644 index 0000000000..ac5e4603bc Binary files /dev/null and b/files/assets/events/homoween/images/chud/7.webp differ diff --git a/files/assets/events/homoween/images/chud/8.webp b/files/assets/events/homoween/images/chud/8.webp new file mode 100644 index 0000000000..aa592f3384 Binary files /dev/null and b/files/assets/events/homoween/images/chud/8.webp differ diff --git a/files/assets/events/homoween/images/chud/9.webp b/files/assets/events/homoween/images/chud/9.webp new file mode 100644 index 0000000000..51a7d4b283 Binary files /dev/null and b/files/assets/events/homoween/images/chud/9.webp differ diff --git a/files/assets/events/homoween/images/cobweb-bl.webp b/files/assets/events/homoween/images/cobweb-bl.webp new file mode 100644 index 0000000000..4b19cf1622 Binary files /dev/null and b/files/assets/events/homoween/images/cobweb-bl.webp differ diff --git a/files/assets/events/homoween/images/cobweb-tr.webp b/files/assets/events/homoween/images/cobweb-tr.webp new file mode 100644 index 0000000000..16873a7f4d Binary files /dev/null and b/files/assets/events/homoween/images/cobweb-tr.webp differ diff --git a/files/assets/events/homoween/images/jumpscares/1.webp b/files/assets/events/homoween/images/jumpscares/1.webp new file mode 100644 index 0000000000..6a1133423f Binary files /dev/null and b/files/assets/events/homoween/images/jumpscares/1.webp differ diff --git a/files/assets/events/homoween/images/jumpscares/2.webp b/files/assets/events/homoween/images/jumpscares/2.webp new file mode 100644 index 0000000000..b6adabe4c0 Binary files /dev/null and b/files/assets/events/homoween/images/jumpscares/2.webp differ diff --git a/files/assets/events/homoween/images/machete.webp b/files/assets/events/homoween/images/machete.webp new file mode 100644 index 0000000000..c5098b8b33 Binary files /dev/null and b/files/assets/events/homoween/images/machete.webp differ diff --git a/files/assets/events/homoween/images/poor/blood.webp b/files/assets/events/homoween/images/poor/blood.webp new file mode 100644 index 0000000000..a9aa4c5a01 Binary files /dev/null and b/files/assets/events/homoween/images/poor/blood.webp differ diff --git a/files/assets/events/homoween/images/poor/flashlight.webp b/files/assets/events/homoween/images/poor/flashlight.webp new file mode 100644 index 0000000000..8d72b97da5 Binary files /dev/null and b/files/assets/events/homoween/images/poor/flashlight.webp differ diff --git a/files/assets/events/homoween/images/poor/fog.webp b/files/assets/events/homoween/images/poor/fog.webp new file mode 100644 index 0000000000..55bba55b73 Binary files /dev/null and b/files/assets/events/homoween/images/poor/fog.webp differ diff --git a/files/assets/events/homoween/images/ricardo1.webp b/files/assets/events/homoween/images/ricardo1.webp new file mode 100644 index 0000000000..2362ee244b Binary files /dev/null and b/files/assets/events/homoween/images/ricardo1.webp differ diff --git a/files/assets/events/homoween/images/ricardo2.webp b/files/assets/events/homoween/images/ricardo2.webp new file mode 100644 index 0000000000..004cb3d993 Binary files /dev/null and b/files/assets/events/homoween/images/ricardo2.webp differ diff --git a/files/assets/events/homoween/images/ricardo3.webp b/files/assets/events/homoween/images/ricardo3.webp new file mode 100644 index 0000000000..ed58c42dfe Binary files /dev/null and b/files/assets/events/homoween/images/ricardo3.webp differ diff --git a/files/assets/events/homoween/images/sidebar/1.webp b/files/assets/events/homoween/images/sidebar/1.webp new file mode 100644 index 0000000000..9066f22a3b Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/1.webp differ diff --git a/files/assets/events/homoween/images/sidebar/2.webp b/files/assets/events/homoween/images/sidebar/2.webp new file mode 100644 index 0000000000..d53dac38eb Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/2.webp differ diff --git a/files/assets/events/homoween/images/sidebar/3.webp b/files/assets/events/homoween/images/sidebar/3.webp new file mode 100644 index 0000000000..b1f2a52c2c Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/3.webp differ diff --git a/files/assets/events/homoween/images/sidebar/4.webp b/files/assets/events/homoween/images/sidebar/4.webp new file mode 100644 index 0000000000..ae7d4d84c6 Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/4.webp differ diff --git a/files/assets/events/homoween/images/sidebar/5.webp b/files/assets/events/homoween/images/sidebar/5.webp new file mode 100644 index 0000000000..bddfcc89c3 Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/5.webp differ diff --git a/files/assets/events/homoween/images/sidebar/6.webp b/files/assets/events/homoween/images/sidebar/6.webp new file mode 100644 index 0000000000..8613c97070 Binary files /dev/null and b/files/assets/events/homoween/images/sidebar/6.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton1.webp b/files/assets/events/homoween/images/skeletons/skeleton1.webp new file mode 100644 index 0000000000..8bbf7d7c00 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton1.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton2.webp b/files/assets/events/homoween/images/skeletons/skeleton2.webp new file mode 100644 index 0000000000..9821bec66a Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton2.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton3.webp b/files/assets/events/homoween/images/skeletons/skeleton3.webp new file mode 100644 index 0000000000..5914c1a713 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton3.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton4.webp b/files/assets/events/homoween/images/skeletons/skeleton4.webp new file mode 100644 index 0000000000..3d675b35da Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton4.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton5.webp b/files/assets/events/homoween/images/skeletons/skeleton5.webp new file mode 100644 index 0000000000..8f341aa317 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton5.webp differ diff --git a/files/assets/events/homoween/images/skeletons/skeleton6.webp b/files/assets/events/homoween/images/skeletons/skeleton6.webp new file mode 100644 index 0000000000..2515e6aa31 Binary files /dev/null and b/files/assets/events/homoween/images/skeletons/skeleton6.webp differ diff --git a/files/assets/events/homoween/images/smoke.webp b/files/assets/events/homoween/images/smoke.webp new file mode 100644 index 0000000000..ac3bb3327d Binary files /dev/null and b/files/assets/events/homoween/images/smoke.webp differ diff --git a/files/assets/events/homoween/images/zombies/1.webp b/files/assets/events/homoween/images/zombies/1.webp new file mode 100644 index 0000000000..6f0ceec121 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/1.webp differ diff --git a/files/assets/events/homoween/images/zombies/10.webp b/files/assets/events/homoween/images/zombies/10.webp new file mode 100644 index 0000000000..8e5bdcf9ec Binary files /dev/null and b/files/assets/events/homoween/images/zombies/10.webp differ diff --git a/files/assets/events/homoween/images/zombies/2.webp b/files/assets/events/homoween/images/zombies/2.webp new file mode 100644 index 0000000000..e3958e6402 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/2.webp differ diff --git a/files/assets/events/homoween/images/zombies/3.webp b/files/assets/events/homoween/images/zombies/3.webp new file mode 100644 index 0000000000..5c679389a4 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/3.webp differ diff --git a/files/assets/events/homoween/images/zombies/4.webp b/files/assets/events/homoween/images/zombies/4.webp new file mode 100644 index 0000000000..5b03ba3329 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/4.webp differ diff --git a/files/assets/events/homoween/images/zombies/5.webp b/files/assets/events/homoween/images/zombies/5.webp new file mode 100644 index 0000000000..7db37a694b Binary files /dev/null and b/files/assets/events/homoween/images/zombies/5.webp differ diff --git a/files/assets/events/homoween/images/zombies/6.webp b/files/assets/events/homoween/images/zombies/6.webp new file mode 100644 index 0000000000..9b588222cf Binary files /dev/null and b/files/assets/events/homoween/images/zombies/6.webp differ diff --git a/files/assets/events/homoween/images/zombies/7.webp b/files/assets/events/homoween/images/zombies/7.webp new file mode 100644 index 0000000000..86b2ce7b95 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/7.webp differ diff --git a/files/assets/events/homoween/images/zombies/8.webp b/files/assets/events/homoween/images/zombies/8.webp new file mode 100644 index 0000000000..fcdf0f7765 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/8.webp differ diff --git a/files/assets/events/homoween/images/zombies/9.webp b/files/assets/events/homoween/images/zombies/9.webp new file mode 100644 index 0000000000..b220630546 Binary files /dev/null and b/files/assets/events/homoween/images/zombies/9.webp differ diff --git a/files/assets/events/homoween/js/banner-debug.js b/files/assets/events/homoween/js/banner-debug.js new file mode 100644 index 0000000000..996a1eb51a --- /dev/null +++ b/files/assets/events/homoween/js/banner-debug.js @@ -0,0 +1,26 @@ +function setBannerDay(day){ + let sky = document.getElementById("banner-homoween-svg"), + moon = document.getElementById("banner-homoween-moon"), + house = document.getElementById("house-fill-gradient-stop"), + ground = document.getElementById("ground-gradient-stop"), + objects = document.getElementById("banner-homoween-objects"), + stars = document.getElementById("banner-homoween-stars") + + sky.style.backgroundImage = "var(--sky-gradient-day"+day+")" + moon.style.fill = "var(--moon-fill-day"+day+")" + moon.style.filter = "var(--moon-shadow-day"+day+")" + moon.style.cy = "var(--moon-position-day"+day+")" + house.style.stopColor = "var(--house-shadow-day"+day+")" + ground.style.stopColor = "var(--ground-shadow-day"+day+")" + objects.style.fill = "var(--object-fill-day"+day+")" + stars.style.opacity = "var(--star-opacity-day"+day+")" +} + +function cycleBanner(){ + i=1 + asdf = setInterval(function(){ + setBannerDay(i) + if (i > 9){clearInterval(asdf)} + i++ + }, 250) +} diff --git a/files/assets/events/homoween/js/banner.js b/files/assets/events/homoween/js/banner.js new file mode 100644 index 0000000000..4f185a354c --- /dev/null +++ b/files/assets/events/homoween/js/banner.js @@ -0,0 +1,13 @@ +const el = document.getElementById("banner-homoween-title"); + +function animateBannerText() { + const letters = el.getElementsByTagName("tspan"); + + for (let i = 0; i < letters.length; i++) { + letters.item(i).style.transition = `all 600ms ${600 + i * 40}ms`; + } + + setTimeout(() => el.classList.add("life"), 1000); +} + +animateBannerText(); diff --git a/files/assets/events/homoween/js/blood.js b/files/assets/events/homoween/js/blood.js new file mode 100644 index 0000000000..e4cc6cce0e --- /dev/null +++ b/files/assets/events/homoween/js/blood.js @@ -0,0 +1,52 @@ +/* + A Bloody Mess by Rob Glazebrook + By default, canvas does not clear between frames. I'm taking advantage of that to create the running blood effect. + This pen was inspired by Katy Decorah's BLOOD: https://codepen.io/katydecorah/pen/Lkogi +*/ + + +let i = 0; + +const stabs = document.getElementById('stabs').value + +let blood = Sketch.create({autoclear: false, autopause: false}), + drops = [], + dropCount = stabs*10, + maxDrops = dropCount+1, + Drop = function() { + this.x = random(0,blood.width); + this.radius = random(10,20); + this.y = -this.radius - random(50,100); + this.vy = this.radius/6; + this.r = ~~random(240,255); + this.g = ~~random(0,20); + this.b = ~~random(0,20); + }; + +blood.update = function() { + let d = drops.length; + while(d < dropCount && i < maxDrops) { + let drop = new Drop(); + drops.push(drop); + d++; + i++; + } + while(d-- && i < maxDrops) { + let drop = drops[d]; + drop.y += drop.vy; + if(drop.y - drop.radius > blood.height) { + drops.splice(d,1); + } + } +} + +blood.draw = function() { + let d = drops.length; + while(d-- && i < maxDrops) { + let drop = drops[d]; + blood.beginPath(); + blood.fillStyle = 'rgba('+drop.r+','+drop.g+','+drop.b+',.8)'; + blood.arc(drop.x,drop.y,drop.radius,0,TWO_PI); + blood.fill(); + } +} diff --git a/files/assets/events/homoween/js/bones.js b/files/assets/events/homoween/js/bones.js new file mode 100644 index 0000000000..59eb85f5ae --- /dev/null +++ b/files/assets/events/homoween/js/bones.js @@ -0,0 +1,75 @@ +let bones_container = document.getElementById('animate'); +const number = bones_container.dataset.bones + +// Stackable +// With each award, append a new image to array +const sources = ['skeleton1.webp','skeleton2.webp','skeleton3.webp','skeleton4.webp','skeleton5.webp','skeleton6.webp']; + +if(number > sources.length){ + number = sources.length +} + +const n = sources.length - number +const pw = screen.availWidth/6 + +let circles = []; + +for (let i = 0; i < 3; i++) { + addCircle(i * 150, [10 + 0, pw]); + addCircle(i * 150, [10 + 0, -pw]); + addCircle(i * 150, [10 - (0.5*pw), -pw]); + addCircle(i * 150, [10 + (0.5*pw), pw]); + addCircle(i * 150, [10 - (1.5*pw), -pw]); + addCircle(i * 150, [10 + (1.5*pw), pw]); +} + + +function addCircle(delay, range) { + setTimeout(function() { + let c = new Circle(range[0] + Math.random() * range[1], 80 + Math.random() * 4, { + x: -0.15 + Math.random() * 0.3, + y: 1 + Math.random() * 1 + }, range); + circles.push(c); + }, delay); +} + +function random_emoji() { + return sources[Math.floor(Math.random() * sources.length)] +} + +function Circle(x, y, v, range) { + let _this = this; + this.x = x; + this.y = y; + this.v = v; + this.range = range; + this.element = document.createElement('img'); + this.element.style.opacity = 0; + this.element.style.position = 'absolute'; + this.element.style.height = '3rem'; + this.element.src = `${SITE_FULL_IMAGES}/assets/events/homoween/images/skeletons/${random_emoji()}`; + bones_container.appendChild(this.element); + + this.update = function() { + if (_this.y > window.innerHeight) { + _this.y = 80 + Math.random() * 4; + _this.x = _this.range[0] + Math.random() * _this.range[1]; + } + _this.y += _this.v.y; + _this.x += _this.v.x; + this.element.style.opacity = 1; + this.element.style.transform = 'translate3d(' + _this.x + 'px, ' + _this.y + 'px, 0px)'; + this.element.style.webkitTransform = 'translate3d(' + _this.x + 'px, ' + _this.y + 'px, 0px)'; + this.element.style.mozTransform = 'translate3d(' + _this.x + 'px, ' + _this.y + 'px, 0px)'; + }; +} + +function animate() { + for (let i in circles) { + circles[i].update(); + } + requestAnimationFrame(animate); +} + +animate(); diff --git a/files/assets/events/homoween/js/flashlight.js b/files/assets/events/homoween/js/flashlight.js new file mode 100644 index 0000000000..d8c1077125 --- /dev/null +++ b/files/assets/events/homoween/js/flashlight.js @@ -0,0 +1,30 @@ +// Original codepen: https://codepen.io/Coding-Artist/pen/ExLyRJg + +let mouseX = 0; +let mouseY = 0; + +// Detect touch device +const isTouchDevice = () => { + try { + // We try to create TouchEvent (it would fail for desktops and throw error) + document.createEvent("TouchEvent"); + return true; + } catch (e) { + return false; + } +}; +function getMousePosition(e) { + try { + // Get position of mouse or touch + mouseX = !isTouchDevice() ? e.clientX : e.touches[0].clientX; + mouseY = !isTouchDevice() ? e.clientY : e.touches[0].clientY; + + // Set the Xpos and Ypos variables to current mouse/touch position + document.getElementById("flashlight-effect").style.setProperty("--Xpos", mouseX + "px"); + document.getElementById("flashlight-effect").style.setProperty("--Ypos", mouseY + "px"); + } catch (e) {} +} + +// Update mouse position on mouse move / touch move +document.addEventListener("mousemove", getMousePosition); +document.addEventListener("touchmove", getMousePosition); diff --git a/files/assets/events/homoween/js/fog.js b/files/assets/events/homoween/js/fog.js new file mode 100644 index 0000000000..5f8cef0880 --- /dev/null +++ b/files/assets/events/homoween/js/fog.js @@ -0,0 +1,137 @@ +canvasWidth = 1600; +canvasHeight = 200; + +pCount = 0; + + +pCollection = new Array(); + +let puffs = 1; +let particlesPerPuff = 1000; +let img = `${SITE_FULL_IMAGES}/assets/events/homoween/images/smoke.webp`; + +let smokeImage = new Image(); +smokeImage.src = img; + +for (let i1 = 0 ; i1 < puffs; i1++) +{ + let puffDelay = i1 * 1500; //300 ms between puffs + + for (let i2 = 0 ; i2 < particlesPerPuff; i2++) + { + addNewParticle((i2*50) + puffDelay); + } +} + + +draw(new Date().getTime(), 3000) + + + +function addNewParticle(delay) +{ + + let p = {}; + p.top = canvasHeight; + p.left = randBetween(-200,800); + + p.start = new Date().getTime() + delay; + p.life = 16000; + p.speedUp = 30; + + + p.speedRight = randBetween(0,20); + + p.rot = randBetween(-1,1); + p.red = Math.floor(randBetween(0,255)); + p.blue = Math.floor(randBetween(0,255)); + p.green = Math.floor(randBetween(0,255)); + + + p.startOpacity = .3 + p.newTop = p.top; + p.newLeft = p.left; + p.size = 200; + p.growth = 10; + + pCollection[pCount] = p; + pCount++; + + +} + +function draw(startT, totalT) +{ + //Timing + let timeDelta = new Date().getTime() - startT; + let stillAlive = false; + + //Grab and clear the canvas + let c=document.getElementById("fog-effect"); + let ctx=c.getContext("2d"); + ctx.clearRect(0, 0, c.width, c.height); + c.width = c.width; + + //Loop through particles + for (let i= 0; i < pCount; i++) + { + //Grab the particle + let p = pCollection[i]; + + //Timing + let td = new Date().getTime() - p.start; + let frac = td/p.life + + if (td > 0) + { + if (td <= p.life ) + { stillAlive = true; } + + //attributes that change over time + let newTop = p.top - (p.speedUp * (td/1000)); + let newLeft = p.left + (p.speedRight * (td/1000)); + let newOpacity = Math.max(p.startOpacity * (1-frac),0); + + let newSize = p.size + (p.growth * (td/1000)); + p.newTop = newTop; + p.newLeft = newLeft; + + //Draw! + ctx.fillStyle = 'rgba(150,150,150,' + newOpacity + ')'; + ctx.globalAlpha = newOpacity; + ctx.drawImage(smokeImage, newLeft, newTop, newSize, newSize); + } + } + + + + //Repeat if there's still a living particle + if (stillAlive) + { + requestAnimationFrame(function(){draw(startT,totalT);}); + } + else + { + clog(timeDelta + ": stopped"); + } +} + +function randBetween(n1,n2) +{ + let r = (Math.random() * (n2 - n1)) + n1; + return r; +} + +function randOffset(n, variance) +{ + //e.g. variance could be 0.1 to go between 0.9 and 1.1 + let max = 1 + variance; + let min = 1 - variance; + let r = Math.random() * (max - min) + min; + return n * r; +} + +function clog(s) +{ + console.log(s); +} diff --git a/files/assets/events/homoween/js/haunted.js b/files/assets/events/homoween/js/haunted.js new file mode 100644 index 0000000000..5e6d22cf27 --- /dev/null +++ b/files/assets/events/homoween/js/haunted.js @@ -0,0 +1,44 @@ +const thunder1 = new Audio(`/assets/events/homoween/audio/haunted/thunder1.mp3`) +const thunder2 = new Audio(`/assets/events/homoween/audio/haunted/thunder2.mp3`) +const is_upsidedown = localStorage.getItem('setting_upsidedown') +const div = document.getElementById("haunted-effect") + +const stylesheet_haunted = document.createElement("link") +stylesheet_haunted.setAttribute("rel", "stylesheet") +stylesheet_haunted.setAttribute("href", "/assets/events/homoween/css/haunted2.css?x=1") +stylesheet_haunted.disabled = true +document.head.appendChild(stylesheet_haunted) + +window.onload = function(){ + thunder2.volume = 0.5 + lightningStrike("normal") +} + +setInterval(function(){ + if(Math.floor(Math.random()*3) > 1){ + lightningStrike("haunted") + } else { + lightningStrike("normal") + } +},14000) + +function lightningStrike(strike) { + if(is_upsidedown == 'true'){ + div.style.animation = "haunted-upsidedown 20s" + } else { + div.style.animation = "haunted 20s" + } + + if(strike == "haunted"){ + stylesheet_haunted.disabled = false + thunder2.play() + setTimeout(function(){ + stylesheet_haunted.disabled = true + },700) + } + + thunder1.play() + setTimeout(function(){ + div.style.animation = "none" + },1000) +} diff --git a/files/assets/events/homoween/js/jumpscare.js b/files/assets/events/homoween/js/jumpscare.js new file mode 100644 index 0000000000..e4e5e795a3 --- /dev/null +++ b/files/assets/events/homoween/js/jumpscare.js @@ -0,0 +1,27 @@ +// Jump scare function +function scare() { + const image = document.getElementById("jump-scare-img"); + image.style.display = "block"; + + const jumpscare_audio = document.getElementById('jumpscare-audio') + jumpscare_audio.play(); + + // Hide image and reset sound + setTimeout(function () { + image.style.display = "none"; + jumpscare_audio.pause() + jumpscare_audio.currentTime = 0; + }, 3000); +} + +if (Math.random() <= 0.1) { + setTimeout(function () { + const xhr = new XMLHttpRequest(); + xhr.open("POST", "/jumpscare"); + xhr.setRequestHeader('xhr', 'xhr'); + form = new FormData(); + form.append("formkey", formkey()); + xhr.send(form) + scare() + }, 3000); +} diff --git a/files/assets/events/homoween/js/sketch.js b/files/assets/events/homoween/js/sketch.js new file mode 100644 index 0000000000..14a894d548 --- /dev/null +++ b/files/assets/events/homoween/js/sketch.js @@ -0,0 +1,628 @@ +/* Copyright (C) 2013 Justin Windle, http://soulwire.co.uk */ + +(function ( root, factory ) { + + if ( typeof exports === 'object' ) { + + // CommonJS like + module.exports = factory(root, root.document); + + } else if ( typeof define === 'function' && define.amd ) { + + // AMD + define( function() { return factory( root, root.document ); }); + + } else { + + // Browser global + root.Sketch = factory( root, root.document ); + } + +}( typeof window !== "undefined" ? window : this, function ( window, document ) { + "use strict"; + + /* + ---------------------------------------------------------------------- + + Config + + ---------------------------------------------------------------------- + */ + + let MATH_PROPS = 'E LN10 LN2 LOG2E LOG10E PI SQRT1_2 SQRT2 abs acos asin atan ceil cos exp floor log round sin sqrt tan atan2 pow max min'.split( ' ' ); + let HAS_SKETCH = '__hasSketch'; + let M = Math; + + let CANVAS = 'canvas'; + let WEBGL = 'webgl'; + let DOM = 'dom'; + + let doc = document; + let win = window; + + let instances = []; + + let defaults = { + + fullscreen: true, + autostart: true, + autoclear: true, + autopause: true, + container: doc.body, + interval: 1, + globals: true, + retina: false, + type: CANVAS + }; + + let keyMap = { + + 8: 'BACKSPACE', + 9: 'TAB', + 13: 'ENTER', + 16: 'SHIFT', + 27: 'ESCAPE', + 32: 'SPACE', + 37: 'LEFT', + 38: 'UP', + 39: 'RIGHT', + 40: 'DOWN' + }; + + /* + ---------------------------------------------------------------------- + + Utilities + + ---------------------------------------------------------------------- + */ + + function isArray( object ) { + + return Object.prototype.toString.call( object ) == '[object Array]'; + } + + function isFunction( object ) { + + return typeof object == 'function'; + } + + function isNumber( object ) { + + return typeof object == 'number'; + } + + function isString( object ) { + + return typeof object == 'string'; + } + + function keyName( code ) { + + return keyMap[ code ] || String.fromCharCode( code ); + } + + function extend( target, source, overwrite ) { + + for ( let key in source ) + + if ( overwrite || !( key in target ) ) + + target[ key ] = source[ key ]; + + return target; + } + + function proxy( method, context ) { + + return function() { + + method.apply( context, arguments ); + }; + } + + function clone( target ) { + + let object = {}; + + for ( let key in target ) { + + if ( key === 'webkitMovementX' || key === 'webkitMovementY' ) + continue; + + if ( isFunction( target[ key ] ) ) + + object[ key ] = proxy( target[ key ], target ); + + else + + object[ key ] = target[ key ]; + } + + return object; + } + + /* + ---------------------------------------------------------------------- + + Constructor + + ---------------------------------------------------------------------- + */ + + function constructor( context ) { + + let request, handler, target, parent, bounds, index, suffix, clock, node, copy, type, key, val, min, max, w, h; + + let counter = 0; + let touches = []; + let resized = false; + let setup = false; + let ratio = win.devicePixelRatio || 1; + let isDiv = context.type == DOM; + let is2D = context.type == CANVAS; + + let mouse = { + x: 0.0, y: 0.0, + ox: 0.0, oy: 0.0, + dx: 0.0, dy: 0.0 + }; + + let eventMap = [ + + context.eventTarget || context.element, + + pointer, 'mousedown', 'touchstart', + pointer, 'mousemove', 'touchmove', + pointer, 'mouseup', 'touchend', + pointer, 'click', + pointer, 'mouseout', + pointer, 'mouseover', + + doc, + + keypress, 'keydown', 'keyup', + + win, + + active, 'focus', 'blur', + resize, 'resize' + ]; + + let keys = {}; for ( key in keyMap ) keys[ keyMap[ key ] ] = false; + + function trigger( method ) { + + if ( isFunction( method ) ) + + method.apply( context, [].splice.call( arguments, 1 ) ); + } + + function bind( on ) { + + for ( index = 0; index < eventMap.length; index++ ) { + + node = eventMap[ index ]; + + if ( isString( node ) ) + + target[ ( on ? 'add' : 'remove' ) + 'EventListener' ].call( target, node, handler, false ); + + else if ( isFunction( node ) ) + + handler = node; + + else target = node; + } + } + + function update() { + + cAF( request ); + request = rAF( update ); + + if ( !setup ) { + + trigger( context.setup ); + setup = isFunction( context.setup ); + } + + if ( !resized ) { + trigger( context.resize ); + resized = isFunction( context.resize ); + } + + if ( context.running && !counter ) { + + context.dt = ( clock = +new Date() ) - context.now; + context.millis += context.dt; + context.now = clock; + + trigger( context.update ); + + // Pre draw + + if ( is2D ) { + + if ( context.retina ) { + + context.save(); + + if (context.autoclear) { + context.scale( ratio, ratio ); + } + } + + if ( context.autoclear ) + + context.clear(); + } + + // Draw + + trigger( context.draw ); + + // Post draw + + if ( is2D && context.retina ) + + context.restore(); + } + + counter = ++counter % context.interval; + } + + function resize() { + + target = isDiv ? context.style : context.canvas; + suffix = isDiv ? 'px' : ''; + + w = context.width; + h = context.height; + + if ( context.fullscreen ) { + + h = context.height = win.innerHeight; + w = context.width = win.innerWidth; + } + + if ( context.retina && is2D && ratio ) { + + target.style.height = h + 'px'; + target.style.width = w + 'px'; + + w *= ratio; + h *= ratio; + } + + if ( target.height !== h ) + + target.height = h + suffix; + + if ( target.width !== w ) + + target.width = w + suffix; + + if ( is2D && !context.autoclear && context.retina ) + + context.scale( ratio, ratio ); + + if ( setup ) trigger( context.resize ); + } + + function align( touch, target ) { + + bounds = target.getBoundingClientRect(); + + touch.x = touch.pageX - bounds.left - (win.scrollX || win.pageXOffset); + touch.y = touch.pageY - bounds.top - (win.scrollY || win.pageYOffset); + + return touch; + } + + function augment( touch, target ) { + + align( touch, context.element ); + + target = target || {}; + + target.ox = target.x || touch.x; + target.oy = target.y || touch.y; + + target.x = touch.x; + target.y = touch.y; + + target.dx = target.x - target.ox; + target.dy = target.y - target.oy; + + return target; + } + + function process( event ) { + + event.preventDefault(); + + copy = clone( event ); + copy.originalEvent = event; + + if ( copy.touches ) { + + touches.length = copy.touches.length; + + for ( index = 0; index < copy.touches.length; index++ ) + + touches[ index ] = augment( copy.touches[ index ], touches[ index ] ); + + } else { + + touches.length = 0; + touches[0] = augment( copy, mouse ); + } + + extend( mouse, touches[0], true ); + + return copy; + } + + function pointer( event ) { + + event = process( event ); + + min = ( max = eventMap.indexOf( type = event.type ) ) - 1; + + context.dragging = + + /down|start/.test( type ) ? true : + + /up|end/.test( type ) ? false : + + context.dragging; + + while( min ) + + isString( eventMap[ min ] ) ? + + trigger( context[ eventMap[ min-- ] ], event ) : + + isString( eventMap[ max ] ) ? + + trigger( context[ eventMap[ max++ ] ], event ) : + + min = 0; + } + + function keypress( event ) { + + key = event.keyCode; + val = event.type == 'keyup'; + keys[ key ] = keys[ keyName( key ) ] = !val; + + trigger( context[ event.type ], event ); + } + + function active( event ) { + + if ( context.autopause ) + + ( event.type == 'blur' ? stop : start )(); + + trigger( context[ event.type ], event ); + } + + // Public API + + function start() { + + context.now = +new Date(); + context.running = true; + } + + function stop() { + + context.running = false; + } + + function toggle() { + + ( context.running ? stop : start )(); + } + + function clear() { + + if ( is2D ) + + context.clearRect( 0, 0, context.width * ratio, context.height * ratio ); + } + + function destroy() { + + parent = context.element.parentNode; + index = instances.indexOf( context ); + + if ( parent ) parent.removeChild( context.element ); + if ( ~index ) instances.splice( index, 1 ); + + bind( false ); + stop(); + } + + extend( context, { + + touches: touches, + mouse: mouse, + keys: keys, + + dragging: false, + running: false, + millis: 0, + now: NaN, + dt: NaN, + + destroy: destroy, + toggle: toggle, + clear: clear, + start: start, + stop: stop + }); + + instances.push( context ); + + return ( context.autostart && start(), bind( true ), resize(), update(), context ); + } + + /* + ---------------------------------------------------------------------- + + Global API + + ---------------------------------------------------------------------- + */ + + let element, context, Sketch = { + + CANVAS: CANVAS, + WEB_GL: WEBGL, + WEBGL: WEBGL, + DOM: DOM, + + instances: instances, + + install: function( context ) { + + if ( !context[ HAS_SKETCH ] ) { + + for ( let i = 0; i < MATH_PROPS.length; i++ ) + + context[ MATH_PROPS[i] ] = M[ MATH_PROPS[i] ]; + + extend( context, { + + TWO_PI: M.PI * 2, + HALF_PI: M.PI / 2, + QUARTER_PI: M.PI / 4, + + random: function( min, max ) { + + if ( isArray( min ) ) + + return min[ ~~( M.random() * min.length ) ]; + + if ( !isNumber( max ) ) + + max = min || 1, min = 0; + + return min + M.random() * ( max - min ); + }, + + lerp: function( min, max, amount ) { + + return min + amount * ( max - min ); + }, + + map: function( num, minA, maxA, minB, maxB ) { + + return ( num - minA ) / ( maxA - minA ) * ( maxB - minB ) + minB; + } + }); + + context[ HAS_SKETCH ] = true; + } + }, + + create: function( options ) { + + options = extend( options || {}, defaults ); + + if ( options.globals ) Sketch.install( self ); + + element = options.element = options.element || doc.createElement( options.type === DOM ? 'div' : 'canvas' ); + + context = options.context = options.context || (function() { + + switch( options.type ) { + + case CANVAS: + + return element.getContext( '2d', options ); + + case WEBGL: + + return element.getContext( 'webgl', options ) || element.getContext( 'experimental-webgl', options ); + + case DOM: + + return element.canvas = element; + } + + })(); + + ( options.container || doc.body ).appendChild( element ); + + return Sketch.augment( context, options ); + }, + + augment: function( context, options ) { + + options = extend( options || {}, defaults ); + + options.element = context.canvas || context; + options.element.className += ' sketch'; + + extend( context, options, true ); + + return constructor( context ); + } + }; + + /* + ---------------------------------------------------------------------- + + Shims + + ---------------------------------------------------------------------- + */ + + let vendors = [ 'ms', 'moz', 'webkit', 'o' ]; + let scope = self; + let then = 0; + + let a = 'AnimationFrame'; + let b = 'request' + a; + let c = 'cancel' + a; + + let rAF = scope[ b ]; + let cAF = scope[ c ]; + + for ( let i = 0; i < vendors.length && !rAF; i++ ) { + + rAF = scope[ vendors[ i ] + 'Request' + a ]; + cAF = scope[ vendors[ i ] + 'Cancel' + a ]; + } + + scope[ b ] = rAF = rAF || function( callback ) { + + let now = +new Date(); + let dt = M.max( 0, 16 - ( now - then ) ); + let id = setTimeout( function() { + callback( now + dt ); + }, dt ); + + then = now + dt; + return id; + }; + + scope[ c ] = cAF = cAF || function( id ) { + clearTimeout( id ); + }; + + /* + ---------------------------------------------------------------------- + + Output + + ---------------------------------------------------------------------- + */ + + return Sketch; + +})); diff --git a/files/assets/events/homoween/js/trickortreat.js b/files/assets/events/homoween/js/trickortreat.js new file mode 100644 index 0000000000..ddcd2c086f --- /dev/null +++ b/files/assets/events/homoween/js/trickortreat.js @@ -0,0 +1,24 @@ +function postToastTrickOrTreat(t, url) { + const xhr = createXhrWithFormKey(url); + xhr[0].onload = function() { + postToastLoadTrickOrTreat(xhr[0]) + }; + xhr[0].send(xhr[1]); +} + +function postToastLoadTrickOrTreat(xhr) { + let data + try { + data = JSON.parse(xhr.response) + } + catch (e) { + console.log(e) + } + success = xhr.status >= 200 && xhr.status < 300; + showToast(success, getMessageFromJsonData(success, data)); + + if (data["result"] == 0){ + scare() + } +} + diff --git a/files/assets/events/homoween/js/upsidedown.js b/files/assets/events/homoween/js/upsidedown.js new file mode 100644 index 0000000000..5595889302 --- /dev/null +++ b/files/assets/events/homoween/js/upsidedown.js @@ -0,0 +1,80 @@ +let st = init("canvas"), // stranger things var +w = (canvas.width = innerWidth), +h = (canvas.height = window.innerHeight); + +class firefly { + constructor() { + this.x = Math.random() * w; + this.y = Math.random() * h; + this.s = Math.random() * 2; + this.ang = Math.random() * 2 * Math.PI; + this.v = (this.s * this.s) / 4; + } + move() { + this.x += this.v * Math.cos(this.ang); + this.y += this.v * Math.sin(this.ang); + this.ang += (Math.random() * 20 * Math.PI) / 180 - (10 * Math.PI) / 180; + } + show() { + st.beginPath(); + st.arc(this.x, this.y, this.s, 0, 2 * Math.PI); + st.fillStyle = "#fff"; + st.fill(); + } +} + +let f = []; + +function draw() { + if (f.length < 100) { + for (let j = 0; j < 10; j++) { + f.push(new firefly()); + } + } + //animation + for (let i = 0; i < f.length; i++) { + f[i].move(); + f[i].show(); + if (f[i].x < 0 || f[i].x > w || f[i].y < 0 || f[i].y > h) { + f.splice(i, 1); + } + } +} + +function init(elemid) { + let canvas = document.getElementById(elemid), + st = canvas.getContext("2d"), + w = (canvas.width = innerWidth), + h = (canvas.height = window.innerHeight); + st.fillStyle = "rgba(30,30,30,1)"; + st.fillRect(0, 0, w, h); + return st; +} + +window.requestAnimFrame = function () { + return ( + window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function (callback) { + window.setTimeout(callback); + } + ); +}; + +function loop() { + window.requestAnimFrame(loop); + st.clearRect(0, 0, w, h); + draw(); +} + +window.addEventListener("resize", function () { + (w = canvas.width = innerWidth), + (h = canvas.height = window.innerHeight); + loop(); +}); + +loop(); +setInterval(loop, 1000 / 60); diff --git a/files/assets/events/homoween/music/CARPENTER_MASTER.mp3 b/files/assets/events/homoween/music/CARPENTER_MASTER.mp3 new file mode 100644 index 0000000000..7cef0148ad Binary files /dev/null and b/files/assets/events/homoween/music/CARPENTER_MASTER.mp3 differ diff --git a/files/assets/events/homoween/music/Jan Terri - Get Down Goblin (Special Treat).mp3 b/files/assets/events/homoween/music/Jan Terri - Get Down Goblin (Special Treat).mp3 new file mode 100644 index 0000000000..f3ccf970de Binary files /dev/null and b/files/assets/events/homoween/music/Jan Terri - Get Down Goblin (Special Treat).mp3 differ diff --git a/files/assets/events/homoween/music/Spooky_Scary_Skeletons.mp3 b/files/assets/events/homoween/music/Spooky_Scary_Skeletons.mp3 new file mode 100644 index 0000000000..2192236755 Binary files /dev/null and b/files/assets/events/homoween/music/Spooky_Scary_Skeletons.mp3 differ diff --git a/files/assets/events/homoween/music/Stranger Things Theme Song (C418 REMIX)_edit.mp3 b/files/assets/events/homoween/music/Stranger Things Theme Song (C418 REMIX)_edit.mp3 new file mode 100644 index 0000000000..6a1496e53d Binary files /dev/null and b/files/assets/events/homoween/music/Stranger Things Theme Song (C418 REMIX)_edit.mp3 differ diff --git a/files/assets/events/homoween/music/bauhaus_bela.mp3 b/files/assets/events/homoween/music/bauhaus_bela.mp3 new file mode 100644 index 0000000000..dcdc627235 Binary files /dev/null and b/files/assets/events/homoween/music/bauhaus_bela.mp3 differ diff --git a/files/assets/events/homoween/music/burton.mp3 b/files/assets/events/homoween/music/burton.mp3 new file mode 100644 index 0000000000..687739c1b8 Binary files /dev/null and b/files/assets/events/homoween/music/burton.mp3 differ diff --git a/files/assets/events/homoween/music/exorcist.mp3 b/files/assets/events/homoween/music/exorcist.mp3 new file mode 100644 index 0000000000..dd72bbd254 Binary files /dev/null and b/files/assets/events/homoween/music/exorcist.mp3 differ diff --git a/files/assets/events/homoween/music/ghostbusters.mp3 b/files/assets/events/homoween/music/ghostbusters.mp3 new file mode 100644 index 0000000000..fdbb8539c3 Binary files /dev/null and b/files/assets/events/homoween/music/ghostbusters.mp3 differ diff --git a/files/assets/events/homoween/music/ghostly-music-box.mp3 b/files/assets/events/homoween/music/ghostly-music-box.mp3 new file mode 100644 index 0000000000..ec98213823 Binary files /dev/null and b/files/assets/events/homoween/music/ghostly-music-box.mp3 differ diff --git a/files/assets/events/homoween/music/goosebumps-original-theme-song.mp3 b/files/assets/events/homoween/music/goosebumps-original-theme-song.mp3 new file mode 100644 index 0000000000..6b8b3b177b Binary files /dev/null and b/files/assets/events/homoween/music/goosebumps-original-theme-song.mp3 differ diff --git a/files/assets/events/homoween/music/halloween-II-theme.mp3 b/files/assets/events/homoween/music/halloween-II-theme.mp3 new file mode 100644 index 0000000000..26ccfddfd5 Binary files /dev/null and b/files/assets/events/homoween/music/halloween-II-theme.mp3 differ diff --git a/files/assets/events/homoween/music/headsroll.mp3 b/files/assets/events/homoween/music/headsroll.mp3 new file mode 100644 index 0000000000..0ddb28fb08 Binary files /dev/null and b/files/assets/events/homoween/music/headsroll.mp3 differ diff --git a/files/assets/events/homoween/music/hereditary-soundtrack-reborn.mp3 b/files/assets/events/homoween/music/hereditary-soundtrack-reborn.mp3 new file mode 100644 index 0000000000..c228118e94 Binary files /dev/null and b/files/assets/events/homoween/music/hereditary-soundtrack-reborn.mp3 differ diff --git a/files/assets/events/homoween/music/i-put-a-spell-on-you.mp3 b/files/assets/events/homoween/music/i-put-a-spell-on-you.mp3 new file mode 100644 index 0000000000..437d221259 Binary files /dev/null and b/files/assets/events/homoween/music/i-put-a-spell-on-you.mp3 differ diff --git a/files/assets/events/homoween/music/jack-the-ripper.mp3 b/files/assets/events/homoween/music/jack-the-ripper.mp3 new file mode 100644 index 0000000000..41e613c13b Binary files /dev/null and b/files/assets/events/homoween/music/jack-the-ripper.mp3 differ diff --git a/files/assets/events/homoween/music/koopsta-knicca-stash-pot-remix.mp3 b/files/assets/events/homoween/music/koopsta-knicca-stash-pot-remix.mp3 new file mode 100644 index 0000000000..28637f0fca Binary files /dev/null and b/files/assets/events/homoween/music/koopsta-knicca-stash-pot-remix.mp3 differ diff --git a/files/assets/events/homoween/music/monstermash.mp3 b/files/assets/events/homoween/music/monstermash.mp3 new file mode 100644 index 0000000000..af42afa842 Binary files /dev/null and b/files/assets/events/homoween/music/monstermash.mp3 differ diff --git a/files/assets/events/homoween/music/nightmare-on-elm-street-theme.mp3 b/files/assets/events/homoween/music/nightmare-on-elm-street-theme.mp3 new file mode 100644 index 0000000000..3609221ba1 Binary files /dev/null and b/files/assets/events/homoween/music/nightmare-on-elm-street-theme.mp3 differ diff --git a/files/assets/events/homoween/music/opera_ix_bela.mp3 b/files/assets/events/homoween/music/opera_ix_bela.mp3 new file mode 100644 index 0000000000..b0d961b5d9 Binary files /dev/null and b/files/assets/events/homoween/music/opera_ix_bela.mp3 differ diff --git a/files/assets/events/homoween/music/owo.mp3 b/files/assets/events/homoween/music/owo.mp3 new file mode 100644 index 0000000000..ce21a32a8e Binary files /dev/null and b/files/assets/events/homoween/music/owo.mp3 differ diff --git a/files/assets/events/homoween/music/pyscho.mp3 b/files/assets/events/homoween/music/pyscho.mp3 new file mode 100644 index 0000000000..eaf47e0a26 Binary files /dev/null and b/files/assets/events/homoween/music/pyscho.mp3 differ diff --git a/files/assets/events/homoween/music/rats.mp3 b/files/assets/events/homoween/music/rats.mp3 new file mode 100644 index 0000000000..e62ea05495 Binary files /dev/null and b/files/assets/events/homoween/music/rats.mp3 differ diff --git a/files/assets/events/homoween/music/scooby.mp3 b/files/assets/events/homoween/music/scooby.mp3 new file mode 100644 index 0000000000..c3a78e6a01 Binary files /dev/null and b/files/assets/events/homoween/music/scooby.mp3 differ diff --git a/files/assets/events/homoween/music/scoops-troop.mp3 b/files/assets/events/homoween/music/scoops-troop.mp3 new file mode 100644 index 0000000000..d3934b47dd Binary files /dev/null and b/files/assets/events/homoween/music/scoops-troop.mp3 differ diff --git a/files/assets/events/homoween/music/signs-main-titles-theme.mp3 b/files/assets/events/homoween/music/signs-main-titles-theme.mp3 new file mode 100644 index 0000000000..eaa350ca03 Binary files /dev/null and b/files/assets/events/homoween/music/signs-main-titles-theme.mp3 differ diff --git a/files/assets/events/homoween/music/strangerintro.mp3 b/files/assets/events/homoween/music/strangerintro.mp3 new file mode 100644 index 0000000000..79f0b527a9 Binary files /dev/null and b/files/assets/events/homoween/music/strangerintro.mp3 differ diff --git a/files/assets/events/homoween/music/this-is-halloween.mp3 b/files/assets/events/homoween/music/this-is-halloween.mp3 new file mode 100644 index 0000000000..da6c59d034 Binary files /dev/null and b/files/assets/events/homoween/music/this-is-halloween.mp3 differ diff --git a/files/assets/events/homoween/music/thriller.mp3 b/files/assets/events/homoween/music/thriller.mp3 new file mode 100644 index 0000000000..ea5e7729d0 Binary files /dev/null and b/files/assets/events/homoween/music/thriller.mp3 differ diff --git a/files/assets/events/homoween/music/twilightzone.mp3 b/files/assets/events/homoween/music/twilightzone.mp3 new file mode 100644 index 0000000000..113d864cb0 Binary files /dev/null and b/files/assets/events/homoween/music/twilightzone.mp3 differ diff --git a/files/assets/events/homoween/music/welcome-to-crystal-lake.mp3 b/files/assets/events/homoween/music/welcome-to-crystal-lake.mp3 new file mode 100644 index 0000000000..e0c1014fe8 Binary files /dev/null and b/files/assets/events/homoween/music/welcome-to-crystal-lake.mp3 differ diff --git a/files/assets/events/shared/images/eye.webp b/files/assets/events/shared/images/eye.webp new file mode 100644 index 0000000000..68fb609b0a Binary files /dev/null and b/files/assets/events/shared/images/eye.webp differ diff --git a/files/assets/events/shared/js/eye_tracking.js b/files/assets/events/shared/js/eye_tracking.js new file mode 100644 index 0000000000..188e2b1665 --- /dev/null +++ b/files/assets/events/shared/js/eye_tracking.js @@ -0,0 +1,43 @@ +if (innerWidth >= 992) +{ + /*init*/ + sidebar = document.getElementById('desktop-sidebar') + + if (sidebar) { + const eye_left = sidebar.getElementsByClassName("eye")[0], + eye_right = sidebar.getElementsByClassName("eye")[1] + + /*eye movement*/ + document.addEventListener('mousemove', function(event) { + const click = {x: event.clientX, y: event.clientY}, + /*recalculating eye position on every mousemove is less efficient + but ensures eyes track properly upon pageload even if script doesnt fire*/ + eye_left_center = getCenter(eye_left), + eye_right_center = getCenter(eye_right) + + eye_left.style.transform = 'rotate('+getAngle(click, eye_left_center)+'rad)' + eye_right.style.transform = 'rotate('+getAngle(click, eye_right_center)+'rad)' + }) + + function getCenter(element) { + const bounds = element.getBoundingClientRect() + + let centerX = bounds["left"] + bounds["width"]/2, + centerY = bounds["top"] + bounds["height"]/2 + + return({x: centerX, y: centerY}) + } + + function getAngle(point1, point2) { + let x = point1["x"] - point2["x"], + y = point1["y"] - point2["y"], + angle = Math.atan(y/x) + + if(point1["x"] < point2["x"]) { + angle += Math.PI + } + + return(angle) + } + } +} diff --git a/files/assets/events/fistmas/js/music.js b/files/assets/events/shared/js/music.js similarity index 68% rename from files/assets/events/fistmas/js/music.js rename to files/assets/events/shared/js/music.js index a6f80772d9..61d342c24f 100644 --- a/files/assets/events/fistmas/js/music.js +++ b/files/assets/events/shared/js/music.js @@ -1,6 +1,6 @@ -const song = document.getElementById('fistmas-song').value; +const song = document.getElementById('event-song').value; const audio = new Audio(song); -audio.loop=true; +audio.loop = true; audio.play(); document.addEventListener('click', () => { diff --git a/files/assets/js/casino/blackjack_screen.js b/files/assets/js/casino/blackjack_screen.js index 11cdc394ce..213989e9db 100644 --- a/files/assets/js/casino/blackjack_screen.js +++ b/files/assets/js/casino/blackjack_screen.js @@ -114,7 +114,7 @@ function updateBlackjackTable(state) { const currency = state.wager.currency === 'coins' ? 'coins' : 'marseybux'; const gameCompleted = ['BLACKJACK', 'WON', 'PUSHED', 'LOST'].indexOf(state.status) !== -1 && (!state.has_player_split || ['WON', 'PUSHED', 'LOST'].indexOf(state.status_split) !== -1); - + if(gameCompleted) { switch (state.status) { case 'BLACKJACK': @@ -141,7 +141,7 @@ function updateBlackjackTable(state) { else { updateResult(`Pushed: Received ${state.wager.amount} ${currency}`, "success"); } - + break; case 'LOST': if(state.status_split === 'WON') { @@ -157,7 +157,7 @@ function updateBlackjackTable(state) { } updateResult(`Lost ${lost} ${currency}`, "danger"); } - + break; default: break; diff --git a/files/assets/js/fireworks.js b/files/assets/js/fireworks.js index 1c76d0ef01..a8f98e267c 100644 --- a/files/assets/js/fireworks.js +++ b/files/assets/js/fireworks.js @@ -20,7 +20,7 @@ function execute_fireworks(firework) { function frame() { if (ypos <= height) { clearInterval(id); - firework.firstElementChild.src = `${SITE_FULL_IMAGES}/i/firework-explosion.webp?v=${vnum}` + firework.firstElementChild.src = `${SITE_FULL_IMAGES}/i/firework-explosion.webp?x=${vnum}` } else { ypos--; firework.style.top=ypos+"%" diff --git a/files/assets/js/flash.js b/files/assets/js/flash.js index a6c8ff4aef..b8c9e5639e 100644 --- a/files/assets/js/flash.js +++ b/files/assets/js/flash.js @@ -18,7 +18,7 @@ function flash(){ if (notifs >= 1 && !focused){ title.innerHTML = `[+${notifs}] ${page_title}` if (alert) { - icon.href = `${SITE_FULL_IMAGES}/i/${SITE_NAME}/alert.ico?v=3009` + icon.href = `${SITE_FULL_IMAGES}/i/${SITE_NAME}/alert.ico?x=3009` alert = false } else { diff --git a/files/assets/js/formatting.js b/files/assets/js/formatting.js index 0f6fd14d4d..1128af193c 100644 --- a/files/assets/js/formatting.js +++ b/files/assets/js/formatting.js @@ -2,7 +2,7 @@ /* addFormattingCopyButtons(): creates a button in the first column of each row of a table that copies the text in the second column of that row */ function addFormattingCopyButtons() { - var allTablesGenerateCopyButtons = document.getElementsByClassName('generate-copy-buttons') + let allTablesGenerateCopyButtons = document.getElementsByClassName('generate-copy-buttons') for (let table = 0; table < allTablesGenerateCopyButtons.length; table++) { @@ -10,14 +10,14 @@ function addFormattingCopyButtons() { continue; } - for (var i = 1, row; row = allTablesGenerateCopyButtons[table].rows[i]; i++) { + for (let i = 1, row; row = allTablesGenerateCopyButtons[table].rows[i]; i++) { const textCopyButton = document.createElement("button"); textCopyButton.setAttribute("type", "button"); textCopyButton.className = "btn caction ml-1 py-0 nobackground px-1 text-muted copy-link"; /* replace HTML newlines with text newlines */ - var cleanedText = row.cells[1].cloneNode(true) + let cleanedText = row.cells[1].cloneNode(true) cleanedText.innerHTML = cleanedText.innerHTML.replace(/
/gi, "\n") /* remove lots of extraneous tabs */ cleanedText = cleanedText.textContent.replace(/\t/g,''); diff --git a/files/assets/js/profile_song.js b/files/assets/js/profile_song.js index 72c0e94c74..b6d9b1120e 100644 --- a/files/assets/js/profile_song.js +++ b/files/assets/js/profile_song.js @@ -24,7 +24,7 @@ if (u_username) u_username = u_username.innerHTML let audio = new Audio(`/@${u_username}/song`); - audio.loop=true; + audio.loop = true; function toggle() { if (audio.paused) { @@ -54,7 +54,7 @@ else const paused = localStorage.getItem("paused") let audio = new Audio(`/@${v_username}/song`); - audio.loop=true; + audio.loop = true; function toggle() { if (audio.paused) diff --git a/files/assets/js/ricardo.js b/files/assets/js/ricardo.js deleted file mode 100644 index 323d4f06b3..0000000000 --- a/files/assets/js/ricardo.js +++ /dev/null @@ -1,26 +0,0 @@ -const isleft = true -setInterval(() => { - let ricardo1 = document.getElementById("ricardo1") - const height = Math.floor(Math.random()*60)+10 - if (ricardo1) { - ricardo1.firstElementChild.src = "" - - if (isleft == true) { - ricardo1.className = "ricardo ricardoright" - isleft = false - } else { - ricardo1.className = "ricardo ricardoleft" - isleft = true - } - - ricardo1.firstElementChild.src = `${SITE_FULL_IMAGES}/i/ricardo1.webp` - ricardo1.style.top=height+"%" - } -}, 5800) - -setInterval(() => { - let ricardo2 = document.getElementById("ricardo2") - const xpos = Math.floor(Math.random()*9)*10 - - if (ricardo2) ricardo2.style.left=xpos+"%" -}, 1700) diff --git a/files/classes/post.py b/files/classes/post.py index 6e1b1370a4..e95a19773f 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -250,14 +250,14 @@ class Post(Base): @lazy def award_count(self, kind, v): - if v and v.poor: + if v and v.poor and kind not in FISTMAS_AWARDS + HOMOWEEN_AWARDS: return 0 if self.distinguish_level and SITE_NAME == 'WPD': return 0 num = len([x for x in self.awards if x.kind == kind]) - if num > 4 and kind not in {"shit", "fireflies", "gingerbread"}: + if num > 4 and kind not in {"shit", "fireflies", "gingerbread", "pumpkin"}: return 4 return num diff --git a/files/classes/user.py b/files/classes/user.py index 33ba4e4164..3a197757ec 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -47,15 +47,6 @@ else: DEFAULT_COINS = 0 DEFAULT_MARSEYBUX = 0 -if IS_FISTMAS(): - if SITE_NAME == 'rDrama': - default_event_music = True - default_darkmode = False - else: - default_event_music = False - default_darkmode = True - - class User(Base): __tablename__ = "users" @@ -162,9 +153,9 @@ class User(Base): lifetimedonated_visible = Column(Boolean, default=False) blacklisted_by = Column(Integer, ForeignKey("users.id")) - if IS_FISTMAS(): - #TODO: make event_music a cookie toggle instead - event_music = Column(Boolean, default=default_event_music, nullable=False) + if IS_HOMOWEEN(): + zombie = Column(Integer, default=0, nullable=False) # > 0 vaxxed; < 0 zombie + jumpscare = Column(Integer, default=0) badges = relationship("Badge", order_by="Badge.created_utc", back_populates="user") subscriptions = relationship("Subscription", back_populates="user") @@ -261,6 +252,24 @@ class User(Base): return (succeeded, charged_coins) + + if IS_FISTMAS(): + @property + @lazy + def can_toggle_event_music(self): + return SITE_NAME != 'rDrama' or self.has_badge(91) + elif IS_HOMOWEEN(): + @property + @lazy + def can_toggle_event_music(self): + return SITE_NAME != 'rDrama' or self.has_badge(185) + + if IS_EVENT(): + @property + @lazy + def event_music(self): + return session.get('event_music', SITE_NAME == 'rDrama') + @property @lazy def poor(self): @@ -375,6 +384,8 @@ class User(Base): def immune_to_awards(self, v): if SITE_NAME != 'rDrama': return False + if IS_EVENT(): + return False if v.id == self.id: return False if v.id in IMMUNE_TO_AWARDS: @@ -920,7 +931,11 @@ class User(Base): @property @lazy def profile_url(self): + if IS_HOMOWEEN() and self.zombie < 0: + return f"{SITE_FULL_IMAGES}/assets/events/homoween/images/zombies/{random.randint(1, 10)}.webp?x=1" if self.chud: + if IS_HOMOWEEN(): + return f"{SITE_FULL}/assets/events/homoween/images/chud/{random.randint(1, 19)}.webp?x=1" return f"{SITE_FULL}/e/chudsey.webp" if self.rainbow: return f"{SITE_FULL}/e/marseysalutepride.webp" @@ -933,6 +948,16 @@ class User(Base): return self.profileurl return f"{SITE_FULL_IMAGES}/i/default-profile-pic.webp?x=6" + @property + @lazy + def pronouns_display(self): + if IS_HOMOWEEN(): + if self.zombie > 2: + return 'VAX/MAXXED' + elif self.zombie > 0: + return 'giga/boosted' + return self.pronouns + @lazy def real_post_count(self, v): if not self.shadowbanned: return self.post_count @@ -1346,12 +1371,6 @@ class User(Base): return output - if IS_FISTMAS(): - @property - @lazy - def can_toggle_event_music(self): - return SITE_NAME != 'rDrama' or self.has_badge(91) - @property @lazy def can_see_my_shit(self): @@ -1375,26 +1394,26 @@ class User(Base): badge_ordering_tuple = ( - 22, 23, 24, 25, 26, 27, 28, #paypig - 257, 258, 259, 260, 261, #lifetime donation - 134, 237, #1 year and 2 year - 10, 11, 12, #referred users - 69, 70, 71, 72, 73, #coins spent - 76, 77, 78, #lootboxes bought - 17, 16, 143, #marsey making - 110, 111, #zwolf making - 112, 113, #platy making - 114, 115, #capy making - 287, 288, #carp making - 152, 153, 154, #hats bought - 160, 161, 162, #casino win - 157, 158, 159, #casino loss - 163, 164, 165, 166, #hat making - 243, 244, 245, 247, #kong - 118, 119, 120, 121, 122, 123, #denazifying r/stupidpol - 190, 192, #word filter - 251, 250, 249, #marsey madness - ) + 22, 23, 24, 25, 26, 27, 28, #paypig + 257, 258, 259, 260, 261, #lifetime donation + 134, 237, #1 year and 2 year + 10, 11, 12, #referred users + 69, 70, 71, 72, 73, #coins spent + 76, 77, 78, #lootboxes bought + 17, 16, 143, #marsey making + 110, 111, #zwolf making + 112, 113, #platy making + 114, 115, #capy making + 287, 288, #carp making + 152, 153, 154, #hats bought + 160, 161, 162, #casino win + 157, 158, 159, #casino loss + 163, 164, 165, 166, #hat making + 243, 244, 245, 247, #kong + 118, 119, 120, 121, 122, 123, #denazifying r/stupidpol + 190, 192, #word filter + 251, 250, 249, #marsey madness +) def badge_ordering_func(b): if b.badge_id in badge_ordering_tuple: diff --git a/files/helpers/actions.py b/files/helpers/actions.py index a7e0c1c230..d5597f2633 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -75,6 +75,8 @@ def execute_snappy(post, v): body = random.choice(("i love you carp", "https://i.rdrama.net/images/16614707883108485.webp", "https://i.rdrama.net/images/1636916964YyM.webp", "https://youtube.com/watch?v=zRbQHTdsjuY")) elif IS_DKD(): body = ":#donkeykongfuckoffcarp:" + elif IS_HOMOWEEN(): + body = "F̵̽̉U̷̓̕C̵̟̍K̴̾̍ ̵́̒O̶͐̇F̷͗̐F̴͛̄ ̸̆͠CARP" else: body = ":#marseyfuckoffcarp:" elif v.id == AEVANN_ID: @@ -85,8 +87,12 @@ def execute_snappy(post, v): else: if IS_DKD(): SNAPPY_CHOICES = SNAPPY_KONGS + elif IS_FISTMAS(): + SNAPPY_CHOICES = SNAPPY_QUOTES_FISTMAS + elif IS_HOMOWEEN(): + SNAPPY_CHOICES = SNAPPY_QUOTES_HOMOWEEN elif SNAPPY_MARSEYS and SNAPPY_QUOTES: - if IS_FISTMAS() or random.random() > 0.5: + if random.random() > 0.5: SNAPPY_CHOICES = SNAPPY_QUOTES else: SNAPPY_CHOICES = SNAPPY_MARSEYS diff --git a/files/helpers/assetcache.py b/files/helpers/assetcache.py index ad8818da8d..843f2395a0 100644 --- a/files/helpers/assetcache.py +++ b/files/helpers/assetcache.py @@ -11,11 +11,13 @@ ASSET_DIR = 'files/assets' ASSET_URL = '/assets/' ASSET_CACHE = defaultdict(lambda: None) -ASSET_SUBDIRS = ['/css', '/js'] -if IS_DKD(): - ASSET_SUBDIRS.extend(['/events/DKD/js']) -elif IS_FISTMAS(): - ASSET_SUBDIRS.extend(['/events/fistmas/css', '/events/fistmas/js']) +ASSET_SUBDIRS = [ + '/css', '/js', + '/events/shared/js', + '/events/DKD/js', + '/events/fistmas/css', '/events/fistmas/js', + '/events/homoween/css', '/events/homoween/js', + ] new_dirs = [] for directory in ASSET_SUBDIRS: @@ -40,7 +42,7 @@ def assetcache_path(asset_path): url = ASSET_URL + asset_path if cachehash: - url += '?v=' + cachehash + url += '?x=' + cachehash return url diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index 13cacff40f..8341f1e200 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -2,6 +2,9 @@ from copy import deepcopy from files.helpers.config.const import * +FISTMAS_AWARDS = ("fireplace", "snow", "gingerbread", "lights", "frostbite", "candycane") +HOMOWEEN_AWARDS = ("spiders", "fog", "bones", "pumpkin", "candy-corn", "ectoplasm", "stab", "upsidedown", "flashlight", "haunt", "jumpscare", "bite", "vax") + #Personal awards are disabled on ghost posts and comments bc they can be used to figure out the identity of the author through https://rdrama.net/badges AWARDS = { "fallback": { @@ -56,7 +59,7 @@ AWARDS = { }, - ### Fistmas + ### Fistmas and Homoween "lootbox": { "kind": "lootbox", "title": "Lootbox", @@ -67,6 +70,20 @@ AWARDS = { "deflectable": True, "cosmetic": False, "ghost": False, + "enabled": IS_FISTMAS() or IS_HOMOWEEN(), + }, + + ### Fistmas + "fireplace": { + "kind": "fireplace", + "title": "Fireplace", + "description": "", + "icon": "fas fa-fireplace", + "color": "text-orange", + "price": 100, + "deflectable": False, + "cosmetic": True, + "ghost": True, "enabled": IS_FISTMAS(), }, "snow": { @@ -105,30 +122,6 @@ AWARDS = { "ghost": True, "enabled": IS_FISTMAS(), }, - "candycane": { - "kind": "candycane", - "title": "Candy Cane", - "description": "", - "icon": "fas fa-candy-cane", - "color": "text-danger", - "price": 400, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_FISTMAS(), - }, - "fireplace": { - "kind": "fireplace", - "title": "Fireplace", - "description": "", - "icon": "fas fa-fireplace", - "color": "text-orange", - "price": 600, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_FISTMAS(), - }, "frostbite": { "kind": "frostbite", "title": "Frostbite", @@ -141,6 +134,18 @@ AWARDS = { "ghost": True, "enabled": IS_FISTMAS(), }, + "candycane": { + "kind": "candycane", + "title": "Candy Cane", + "description": "", + "icon": "fas fa-candy-cane", + "color": "text-danger", + "price": 300, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_FISTMAS(), + }, "grinch": { "kind": "grinch", "title": "Grinch", @@ -155,42 +160,6 @@ AWARDS = { }, ### Homoween - "haunt": { - "kind": "haunt", - "title": "Haunt", - "description": "", - "icon": "fas fa-book-dead", - "color": "text-warning", - "price": 500, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_HOMOWEEN(), - }, - "upsidedown": { - "kind": "upsidedown", - "title": "The Upside Down", - "description": "", - "icon": "fas fa-lights-holiday", - "color": "", - "price": 400, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_HOMOWEEN(), - }, - "stab": { - "kind": "stab", - "title": "Stab", - "description": "", - "icon": "fas fa-knife-kitchen", - "color": "text-danger", - "price": 300, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_HOMOWEEN(), - }, "spiders": { "kind": "spiders", "title": "Spiders", @@ -215,90 +184,6 @@ AWARDS = { "ghost": True, "enabled": IS_HOMOWEEN(), }, - "jumpscare": { - "kind": "jumpscare", - "title": "Jumpscare", - "description": "", - "icon": "fas fa-coffin-cross", - "color": "text-purple", - "price": 600, - "deflectable": True, - "cosmetic": False, - "ghost": False, - "enabled": IS_HOMOWEEN(), - }, - "hw-bite": { - "kind": "hw-bite", - "title": "Zombie Bite", - "description": "", - "icon": "fas fa-biohazard", - "color": "text-danger", - "price": 500, - "deflectable": True, - "cosmetic": False, - "ghost": False, - "enabled": IS_HOMOWEEN(), - }, - "hw-vax": { - "kind": "hw-vax", - "title": "Vaxxmaxx", - "description": "", - "icon": "fas fa-syringe", - "color": "text-blue", - "price": 500, - "deflectable": True, - "cosmetic": False, - "ghost": False, - "enabled": IS_HOMOWEEN(), - }, - "hw-grinch": { - "kind": "hw-grinch", - "title": "Hallowgrinch", - "description": "", - "icon": "fas fa-angry", - "color": "text-orange", - "price": 1000, - "deflectable": True, - "cosmetic": False, - "ghost": False, - "enabled": IS_HOMOWEEN(), - }, - "flashlight": { - "kind": "flashlight", - "title": "Flashlight", - "description": "", - "icon": "fas fa-flashlight", - "color": "text-black", - "price": 400, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_HOMOWEEN(), - }, - "candy-corn": { - "kind": "candy-corn", - "title": "Candy Corn", - "description": "", - "icon": "fas fa-candy-corn", - "color": "text-orange", - "price": 400, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_HOMOWEEN(), - }, - "ectoplasm": { - "kind": "ectoplasm", - "title": "Ectoplasm", - "description": "", - "icon": "fas fa-ghost", - "color": "text-success", - "price": 400, - "deflectable": False, - "cosmetic": True, - "ghost": True, - "enabled": IS_HOMOWEEN(), - }, "bones": { "kind": "bones", "title": "Bones", @@ -323,6 +208,129 @@ AWARDS = { "ghost": True, "enabled": IS_HOMOWEEN(), }, + "candy-corn": { + "kind": "candy-corn", + "title": "Candy Corn", + "description": "", + "icon": "fas fa-candy-corn", + "color": "text-orange", + "price": 400, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_HOMOWEEN(), + }, + "ectoplasm": { + "kind": "ectoplasm", + "title": "Ectoplasm", + "description": "", + "icon": "fas fa-ghost", + "color": "text-success", + "price": 400, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_HOMOWEEN(), + }, + "stab": { + "kind": "stab", + "title": "Stab", + "description": "", + "icon": "fas fa-knife-kitchen", + "color": "text-danger", + "price": 400, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_HOMOWEEN(), + }, + "upsidedown": { + "kind": "upsidedown", + "title": "Upside Down", + "description": "", + "icon": "fas fa-trees", + "color": "", + "price": 400, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_HOMOWEEN(), + }, + "flashlight": { + "kind": "flashlight", + "title": "Flashlight", + "description": "", + "icon": "fas fa-flashlight", + "color": "text-black", + "price": 400, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_HOMOWEEN(), + }, + "haunt": { + "kind": "haunt", + "title": "Haunt", + "description": "", + "icon": "fas fa-book-dead", + "color": "text-warning", + "price": 400, + "deflectable": False, + "cosmetic": True, + "ghost": True, + "enabled": IS_HOMOWEEN(), + }, + + "jumpscare": { + "kind": "jumpscare", + "title": "Jumpscare", + "description": "", + "icon": "fas fa-coffin-cross", + "color": "text-purple", + "price": 500, + "deflectable": True, + "cosmetic": False, + "ghost": False, + "enabled": IS_HOMOWEEN(), + }, + "bite": { + "kind": "bite", + "title": "Zombie Bite", + "description": "", + "icon": "fas fa-biohazard", + "color": "text-danger", + "price": 500, + "deflectable": True, + "cosmetic": False, + "ghost": False, + "enabled": IS_HOMOWEEN(), + }, + "vax": { + "kind": "vax", + "title": "Vaxxmaxx", + "description": "", + "icon": "fas fa-syringe", + "color": "text-blue", + "price": 500, + "deflectable": True, + "cosmetic": False, + "ghost": False, + "enabled": IS_HOMOWEEN(), + }, + "hw-grinch": { + "kind": "hw-grinch", + "title": "Hallowgrinch", + "description": "", + "icon": "fas fa-angry", + "color": "text-orange", + "price": 1000, + "deflectable": True, + "cosmetic": False, + "ghost": False, + "enabled": IS_HOMOWEEN(), + }, + + ### Birthgay/Birthdead "confetti": { "kind": "confetti", "title": "Confetti", @@ -333,7 +341,7 @@ AWARDS = { "deflectable": False, "cosmetic": True, "ghost": True, - "enabled": IS_BIRTHGAY(), + "enabled": IS_BIRTHGAY() or IS_BIRTHDEAD(), }, ### Standard @@ -801,7 +809,6 @@ for k, val in AWARDS.items(): AWARDS_ENABLED[k] = val LOOTBOX_ITEM_COUNT = 5 -LOOTBOX_CONTENTS = ["snow", "gingerbread", "lights", "candycane", "fireplace", "frostbite"] HOUSE_AWARDS = { "Furry": { diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 83f7b7edb4..545adabe77 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -970,14 +970,14 @@ EMOJI_KINDS = ("Marsey", "Platy", "Wolf", "Donkey Kong", "Tay", "Capy", "Carp", t = datetime.datetime.now() fistmas_begin = datetime.datetime.strptime(f'1/12/{t.year}', '%d/%m/%Y') -fistmas_end = datetime.datetime.strptime(f'30/12/{t.year}', '%d/%m/%Y') +fistmas_end = datetime.datetime.strptime(f'26/12/{t.year}', '%d/%m/%Y') def IS_FISTMAS(): return fistmas_begin < datetime.datetime.now() < fistmas_end -homoween_begin = datetime.datetime.strptime(f'15/10/{t.year}', '%d/%m/%Y') +homoween_begin = datetime.datetime.strptime(f'10/10/{t.year}', '%d/%m/%Y') homoween_end = datetime.datetime.strptime(f'1/11/{t.year}', '%d/%m/%Y') def IS_HOMOWEEN(): - return homoween_begin < datetime.datetime.now() < homoween_end + return IS_LOCALHOST or SITE == 'devrama.net' or homoween_begin < datetime.datetime.now() < homoween_end dkd_begin = datetime.datetime.strptime(f'25/4/{t.year}', '%d/%m/%Y') dkd_end = datetime.datetime.strptime(f'2/5/{t.year}', '%d/%m/%Y') diff --git a/files/helpers/const_stateful.py b/files/helpers/const_stateful.py index a045806ee0..65d905fa1e 100644 --- a/files/helpers/const_stateful.py +++ b/files/helpers/const_stateful.py @@ -9,10 +9,12 @@ marseys_const2 = [] marsey_mappings = {} SNAPPY_MARSEYS = [] SNAPPY_QUOTES = [] +SNAPPY_QUOTES_FISTMAS = [] +SNAPPY_QUOTES_HOMOWEEN = [] STEALTH_HOLES = [] def const_initialize(): - global marseys_const, marseys_const2, marsey_mappings, SNAPPY_KONGS, SNAPPY_MARSEYS, SNAPPY_QUOTES, STEALTH_HOLES + global marseys_const, marseys_const2, marsey_mappings, SNAPPY_KONGS, SNAPPY_MARSEYS, SNAPPY_QUOTES, SNAPPY_QUOTES_FISTMAS, SNAPPY_QUOTES_HOMOWEEN, STEALTH_HOLES db = db_session() @@ -26,9 +28,8 @@ def const_initialize(): else: marsey_mappings[tag] = [marsey.name] - if IS_DKD(): - SNAPPY_KONGS = db.query(Emoji.name).filter(Emoji.kind=="Donkey Kong", Emoji.submitter_id==None).all() - SNAPPY_KONGS = [f':#{x[0]}:' for x in SNAPPY_KONGS] + SNAPPY_KONGS = db.query(Emoji.name).filter(Emoji.kind=="Donkey Kong", Emoji.submitter_id==None).all() + SNAPPY_KONGS = [f':#{x[0]}:' for x in SNAPPY_KONGS] STEALTH_HOLES = [x[0] for x in db.query(Sub.name).filter_by(stealth=True)] @@ -37,13 +38,12 @@ def const_initialize(): SNAPPY_MARSEYS = [f':#{x}:' for x in marseys_const2] - if IS_FISTMAS(): - filename = f"snappy_fistmas_{SITE_NAME}.txt" - else: - filename = f"snappy_{SITE_NAME}.txt" - try: - with open(filename, "r") as f: + with open(f"snappy_{SITE_NAME}.txt", "r") as f: SNAPPY_QUOTES = f.read().split("\n{[para]}\n") + with open(f"snappy_fistmas_{SITE_NAME}.txt", "r") as f: + SNAPPY_QUOTES_FISTMAS = f.read().split("\n{[para]}\n") + with open("snappy_homoween.txt", "r") as f: + SNAPPY_QUOTES_HOMOWEEN = f.read().split("\n{[para]}\n") except FileNotFoundError: pass diff --git a/files/helpers/cron.py b/files/helpers/cron.py index 811453b9fd..e6bbb3ca9e 100644 --- a/files/helpers/cron.py +++ b/files/helpers/cron.py @@ -55,8 +55,9 @@ def cron_fn(every_5m, every_1d, every_fri_12, every_fri_23, every_sat_00, every_ _grant_two_year_badges() g.db.commit() - offsitementions.offsite_mentions_task(cache) - g.db.commit() + if not IS_LOCALHOST: + offsitementions.offsite_mentions_task(cache) + g.db.commit() if every_1d or (not cache.get('stats') and not IS_LOCALHOST): _generate_emojis_zip() @@ -78,6 +79,14 @@ def cron_fn(every_5m, every_1d, every_fri_12, every_fri_23, every_sat_00, every_ cache.set('stats', stats.stats(), timeout=CRON_CACHE_TIMEOUT) g.db.commit() + if IS_HOMOWEEN(): + g.db.execute(text( + "INSERT INTO award_relationships (user_id, kind, created_utc) " + f"SELECT id, 'bite', {int(time.time())} FROM users " + "WHERE users.zombie < 0")) + g.db.commit() + + if every_fri_12: _create_post(f'Movie Night', f'''Our Movie Night today will show `{get_name()}`.\nThe movie will start at 8 PM EST. [Here is a timezone converter for whoever needs it.](https://dateful.com/time-zone-converter?t=8pm&tz1=EST-EDT-Eastern-Time). You can also check this [countdown timer](https://www.tickcounter.com/countdown/4435809/movie-night) instead.\nIt will be shown [here](/chat).\nThere will be a 5-minute bathroom break at the 50:00 mark.\nRerun will be Sunday 4 PM EST.''', 11) g.db.commit() @@ -146,7 +155,7 @@ def _create_post(title, body, pin_hours): body_html = sanitize(body) stickied_utc = int(time.time()) + (3600 * pin_hours) - + p = Post( private=False, notify=True, @@ -186,7 +195,7 @@ def _create_and_delete_orgy(): g.db.close() del g.db stdout.flush() - + requests.post('http://localhost:5001/refresh_chat', headers={"Host": SITE}) video_info = ffmpeg.probe(f'/orgies/{get_file()}') diff --git a/files/helpers/twentyone.py b/files/helpers/twentyone.py index e294d2c944..390157f1ad 100644 --- a/files/helpers/twentyone.py +++ b/files/helpers/twentyone.py @@ -231,7 +231,7 @@ def check_for_completion(state): state['status'] = BlackjackStatus.LOST else: state['status'] = BlackjackStatus.PUSHED - + state['player_value'] = get_value_of_hand(state['player']) state['dealer_value'] = get_value_of_hand(state['dealer']) @@ -308,7 +308,7 @@ def handle_payout(gambler, state, game): payout = game.wager else: raise Exception("Attempted to payout a game that has not finished.") - + if split_status == BlackjackStatus.WON: game.winnings += game.wager payout += game.wager * 2 @@ -466,7 +466,7 @@ def get_available_actions(state): if can_purchase_insurance(state): actions.append(BlackjackAction.BUY_INSURANCE) - + if can_split(state): actions.append(BlackjackAction.SPLIT) diff --git a/files/routes/awards.py b/files/routes/awards.py index 8e6500d072..6448af3345 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -10,7 +10,7 @@ from files.helpers.actions import * from files.helpers.alerts import * from files.helpers.config.const import * from files.helpers.slurs_and_profanities import censor_slurs_profanities -from files.helpers.config.awards import AWARDS_ENABLED, HOUSE_AWARDS, LOOTBOX_ITEM_COUNT, LOOTBOX_CONTENTS +from files.helpers.config.awards import * from files.helpers.get import * from files.helpers.marsify import marsify from files.helpers.owoify import owoify @@ -105,6 +105,10 @@ def buy(v, award): if award == "lootbox": lootbox_items = [] for _ in range(LOOTBOX_ITEM_COUNT): # five items per lootbox + if IS_FISTMAS(): + LOOTBOX_CONTENTS = FISTMAS_AWARDS + elif IS_HOMOWEEN(): + LOOTBOX_CONTENTS = HOMOWEEN_AWARDS lb_award = random.choice(LOOTBOX_CONTENTS) lootbox_items.append(AWARDS[lb_award]['title']) lb_award = AwardRelationship(user_id=v.id, kind=lb_award, price_paid=price // LOOTBOX_ITEM_COUNT) @@ -545,9 +549,46 @@ def award_thing(v, thing_type, id): if author.spider: author.spider += 86400 else: author.spider = int(time.time()) + 86400 badge_grant(user=author, badge_id=179, notify=False) - if kind == "grinch": + elif kind == "grinch": badge_grant(badge_id=91, user=author) - author.event_music = False + elif kind == "hw-grinch": + badge_grant(badge_id=185, user=author) + elif kind == "bite": + if author.zombie < 0: + author = v + + if author.zombie == 0: + author.zombie = -1 + badge_grant(user=author, badge_id=181) + + award_object = AwardRelationship(user_id=author.id, kind='bite') + g.db.add(award_object) + send_repeatable_notification(author.id, + "As the zombie virus washes over your mind, you feel the urge " + "to… BITE YUMMY BRAINS :marseyzombie:
" + "You receive a free **Zombie Bite** award: pass it on!") + + elif author.zombie > 0: + author.zombie -= 1 + if author.zombie == 0: + send_repeatable_notification(author.id, "You are no longer **VAXXMAXXED**! Time for another booster!") + + badge = author.has_badge(182) + if badge: g.db.delete(badge) + elif kind == "vax": + if author.zombie < 0: + author.zombie = 0 + send_repeatable_notification(author.id, "You are no longer **INFECTED**! Praise Fauci!") + + badge = author.has_badge(181) + if badge: g.db.delete(badge) + elif author.zombie >= 0: + author.zombie += 2 + author.zombie = min(author.zombie, 10) + + badge_grant(user=author, badge_id=182) + elif kind == "jumpscare": + author.jumpscare += 1 if author.received_award_count: author.received_award_count += 1 @@ -556,18 +597,33 @@ def award_thing(v, thing_type, id): return {"message": f"{AWARDS[kind]['title']} award given to {thing_type} successfully!"} -def shift_number_down(input, mod): - if input <= 0: - return 0, 0 - number = (input%mod) - input -= number - input /= mod - return int(number), int(input) +@app.post("/trick-or-treat") +@limiter.limit("1/hour", key_func=lambda:f'{SITE}-{session.get("lo_user")}') +@auth_required +def trick_or_treat(v): + if v.client: abort(403, "Not allowed from the API") -def get_number_tuple(input, mods): - results = [] - for mod in mods: - result, input = shift_number_down(input, mod) - results.append(result) - results.append(input) - return results + result = random.choice([0,1]) + + if result == 0: + message = "Trick!" + else: + award = random.choice(HOMOWEEN_AWARDS) + award_object = AwardRelationship(user_id=v.id, kind=award) + g.db.add(award_object) + + award_title = AWARDS_ENABLED[award]['title'] + message = f"Treat! You got a {award_title} award!" + + return {"message": f"{message}", "result": f"{result}"} + + +@app.post("/jumpscare") +@auth_required +def execute_jumpscare(v): + if v.client: abort(403, "Not allowed from the API") + if v.jumpscare > 0: + v.jumpscare -= 1 + g.db.add(v) + + return {} diff --git a/files/routes/jinja2.py b/files/routes/jinja2.py index 9b14bf2794..7757927533 100644 --- a/files/routes/jinja2.py +++ b/files/routes/jinja2.py @@ -1,10 +1,12 @@ import time +import math from os import environ, listdir, path from flask import g, session, has_request_context, request from jinja2 import pass_context from PIL import ImageColor +from sqlalchemy import text from files.classes.user import User from files.classes.orgy import get_orgy @@ -102,6 +104,20 @@ def git_head(): def max_days(): return int((2147483647-time.time())/86400) +@cache.memoize(timeout=60) +def bar_position(): + db = db_session() + vaxxed = db.execute(text("SELECT COUNT(*) FROM users WHERE zombie > 0")).one()[0] + zombie = db.execute(text("SELECT COUNT(*) FROM users WHERE zombie < 0")).one()[0] + total = db.execute(text("SELECT COUNT(*) FROM " + "(SELECT DISTINCT ON (author_id) author_id AS uid FROM comments " + "WHERE created_utc > 1666402200) AS q1 " + "FULL OUTER JOIN (SELECT id AS uid FROM users WHERE zombie != 0) as q2 " + "ON q1.uid = q2.uid")).one()[0] + total = max(total, 1) + + return [int((vaxxed * 100) / total), int((zombie * 100) / total), vaxxed, zombie] + @app.context_processor def inject_constants(): return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, @@ -127,8 +143,8 @@ def inject_constants(): "BIO_FRIENDS_ENEMIES_LENGTH_LIMIT":BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, "IMMUNE_TO_AWARDS": IMMUNE_TO_AWARDS, "SITE_FULL_IMAGES": SITE_FULL_IMAGES, "IS_FISTMAS":IS_FISTMAS, "IS_HOMOWEEN":IS_HOMOWEEN, "IS_DKD":IS_DKD, "IS_EVENT":IS_EVENT, "IS_BIRTHGAY":IS_BIRTHGAY, - "CHUD_PHRASES":CHUD_PHRASES, "hasattr":hasattr, "calc_users":calc_users, "HOLE_INACTIVITY_DELETION":HOLE_INACTIVITY_DELETION, + "CHUD_PHRASES":CHUD_PHRASES, "hasattr":hasattr, "calc_users":calc_users, "HOLE_INACTIVITY_DELETION":HOLE_INACTIVITY_DELETION, "LIGHT_THEMES":LIGHT_THEMES, "MAX_IMAGE_AUDIO_SIZE_MB":MAX_IMAGE_AUDIO_SIZE_MB, "MAX_IMAGE_AUDIO_SIZE_MB_PATRON":MAX_IMAGE_AUDIO_SIZE_MB_PATRON, "MAX_VIDEO_SIZE_MB":MAX_VIDEO_SIZE_MB, "MAX_VIDEO_SIZE_MB_PATRON":MAX_VIDEO_SIZE_MB_PATRON, - "CURSORMARSEY_DEFAULT":CURSORMARSEY_DEFAULT, "SNAPPY_ID":SNAPPY_ID, "get_orgy":get_orgy, "TRUESCORE_CC_CHAT_MINIMUM":TRUESCORE_CC_CHAT_MINIMUM, + "CURSORMARSEY_DEFAULT":CURSORMARSEY_DEFAULT, "SNAPPY_ID":SNAPPY_ID, "get_orgy":get_orgy, "TRUESCORE_CC_CHAT_MINIMUM":TRUESCORE_CC_CHAT_MINIMUM, "bar_position":bar_position, } diff --git a/files/routes/login.py b/files/routes/login.py index 87108cb448..f57993245a 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -378,7 +378,7 @@ def post_forgot(): return render_template("login/forgot_password.html", error="Invalid email!"), 400 user = get_user(username, graceful=True) - + email = escape_for_search(email) if user and user.email and user.email.lower() == email.lower(): diff --git a/files/routes/posts.py b/files/routes/posts.py index 66fd78fca8..055d10c754 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -692,10 +692,6 @@ def submit_post(v, sub=None): p.stickied_utc = int(time.time()) + 28800 p.stickied = "AutoJanny" - if SITE == 'rdrama.net' and v.id == 7465 and p.title.lower().startswith("women's world cup betting: "): - p.stickied_utc = int(time.time()) + 28800 - p.stickied = "AutoJanny" - cache.delete_memoized(frontlist) cache.delete_memoized(userpagelisting) diff --git a/files/routes/settings.py b/files/routes/settings.py index e5db1f14d6..a61b373c32 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -182,6 +182,10 @@ def settings_personal_post(v): updated = True session["over_18"] = int(request.values.get("over_18") == 'true') + elif not updated and v.can_toggle_event_music and request.values.get("event_music", v.event_music) != v.event_music: + updated = True + session['event_music'] = request.values.get("event_music", v.event_music) == 'true' + elif not updated and request.values.get("marsify", v.marsify) != v.marsify and v.marsify <= 1: if not v.patron: abort(403, f"Perma-marsify is only available to {patron}s!") @@ -192,10 +196,6 @@ def settings_personal_post(v): badge = v.has_badge(170) if badge: g.db.delete(badge) - elif IS_FISTMAS() and not updated and request.values.get("event_music", v.event_music) != v.event_music and v.can_toggle_event_music: - updated = True - v.event_music = not v.event_music - elif not updated and request.values.get("bio") == "" and not request.files.get('file'): v.bio = None v.bio_html = None diff --git a/files/routes/votes.py b/files/routes/votes.py index 9da62de81a..75c85c8756 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -58,6 +58,9 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): if IS_EVENT(): coin_mult *= 2 + if IS_HOMOWEEN() and target.author.zombie > 0: + coin_mult += 1 + coin_value = coin_delta * coin_mult imlazy = 0 @@ -142,7 +145,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): send_notification(AEVANN_ID, target.permalink) elif SITE == 'rdrama.net' and target.author_id == 29: mul = 3 - elif target.author.progressivestack or target.author.admin_level >= PERMS['IS_PERMA_PROGSTACKED']: + elif target.author.progressivestack or (IS_HOMOWEEN() and target.author.zombie < 0) or target.author.admin_level >= PERMS['IS_PERMA_PROGSTACKED']: mul = 2 elif SITE == 'rdrama.net' and cls == Post: if (target.domain.endswith('.win') diff --git a/files/routes/wrappers.py b/files/routes/wrappers.py index 2ddd728f25..40c53eaa88 100644 --- a/files/routes/wrappers.py +++ b/files/routes/wrappers.py @@ -118,6 +118,9 @@ def get_logged_in_user(): g.is_tor = (request.headers.get("cf-ipcountry") == "T1" and not (v and v.truescore >= 1000)) + if v and not IS_EVENT(): + session.pop("event_music") + return v def auth_desired(f): diff --git a/files/templates/awards.html b/files/templates/awards.html index b85b351bd6..8996d98ed1 100644 --- a/files/templates/awards.html +++ b/files/templates/awards.html @@ -1,42 +1,51 @@
-{% macro stackable_award(award, src, alt) %} -
- {% for i in range(p.award_count(award, v)) %} -
- {{alt}} + {% macro stackable_award(award, src, alt) %} +
+ {% for i in range(p.award_count(award, v)) %} +
+ {{alt}} +
+ {% endfor %}
- {% endfor %} -
-{% endmacro %} + {% endmacro %} -{% if p.award_count("wholesome", v) %} - {% set wholesome = '/e/marseywholesome.webp' %} - {{stackable_award('wholesome', wholesome, ':#marseywholesome:')}} -{% endif %} + {% if p.award_count("wholesome", v) %} + {% if IS_HOMOWEEN() %} + {% set wholesome = '/e/marseypumpkin.webp' %} + {% else %} + {% set wholesome = '/e/marseywholesome.webp' %} + {% endif %} + {{stackable_award('wholesome', wholesome, ':#marseywholesome:')}} + {% endif %} -{% if p.award_count("train", v) %} - {{stackable_award('train', '/e/marseytrain.webp', ':#marseytrain:')}} -{% endif %} + {% if p.award_count("train", v) %} + {{stackable_award('train', '/e/marseytrain.webp', ':#marseytrain:')}} + {% endif %} -{% if p.award_count("scooter", v) %} - {{stackable_award('scooter', '/e/marseyscooter.webp', ':#marseyscooter:')}} -{% endif %} + {% if p.award_count("scooter", v) %} + {{stackable_award('scooter', '/e/marseyscooter.webp', ':#marseyscooter:')}} + {% endif %} -{% if p.award_count("firework", v) %} - - {{stackable_award('firework')}} -{% endif %} + {% if p.award_count("firework", v) %} + + {{stackable_award('firework')}} + {% endif %} -{% if p.award_count("confetti", v) and IS_BIRTHGAY() %} -
-{% endif %} - -{% if p.award_count("ricardo", v) %} - {% for i in range(min(p.award_count("ricardo", v), 3)) %} -
- -
- {% endfor %} -{% endif %} + {% if p.award_count("confetti", v) and (IS_BIRTHGAY() or IS_BIRTHDEAD()) %} +
+ {% endif %} + {% if p.award_count("ricardo", v) %} + {% for i in range(min(p.award_count("ricardo", v), 3)) %} + {% set i = i + 1 %} +
+ {% if IS_HOMOWEEN() %} + {% set src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/ricardo" ~ i ~ ".webp" %} + {% else %} + {% set src = SITE_FULL_IMAGES ~ "/i/ricardo" ~ i ~ ".webp" %} + {% endif %} + +
+ {% endfor %} + {% endif %}
diff --git a/files/templates/casino/blackjack_screen.html b/files/templates/casino/blackjack_screen.html index 6c11c00bb1..291acfd8ab 100644 --- a/files/templates/casino/blackjack_screen.html +++ b/files/templates/casino/blackjack_screen.html @@ -27,11 +27,11 @@ Insurance
-