This commit is contained in:
kek7198 2021-12-11 16:55:56 -06:00
parent 7deb60d7be
commit 4f6497280f
4 changed files with 28 additions and 2 deletions

View file

@ -0,0 +1,18 @@
const audio = new Audio('/assets/christmas/songs/fireplace.mp3');
audio.loop=true;
function play() {
audio.play();
}
console.log(audio)
audio.loop=true;
window.addEventListener('load', function() {
audio.play();
document.getElementById('thread').addEventListener('click', () => {
if (audio.paused) audio.play();
}, {once : true});
});

View file

@ -24,13 +24,14 @@ const trackList = [
'santa',
'santababy',
'simply',
'simplyhaving',
'sinatra',
'sinatra2',
'steve',
'trans',
'waitresses',
'wham',
'wonderland',
'wonderland'
];
const selected = trackList[Math.floor(Math.random() * trackList.length)];

View file

@ -0,0 +1,2 @@
<div class="fixed w-full h-full z-[1000] bg-cover pointer-events-none opacity-[.1]" style="background-image: url('https://media0.giphy.com/media/3o72FhIuVWddxQHftS/giphy.gif');">
</div>

View file

@ -123,9 +123,14 @@
</script>
{% endif %}
<!-- Songs & Mariah award -->
<!-- Songs & Fireplace awards -->
{% if p.award_count("snow") and p.award_count("fireplace") %}
<script defer src="/assets/js/christmas/deanmartin.js?v=1"></script>
{% elif p.award_count("fireplace")%}
<script defer src="/assets/js/christmas/fireplace.js?v=2"></script>
{% else %}
<script defer src="/assets/js/christmas/playlist.js?v=2"></script>
{% endif %}
<!-- Fireplace award -->
{% include "/awards/Christmas/Fireplace.html" %}