Skip to content

Commit

Permalink
Add a donation button
Browse files Browse the repository at this point in the history
  • Loading branch information
lazygyu committed Apr 26, 2024
1 parent cae4299 commit 11a1a4d
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
content: '';
background: #00baff;
}

}

.btn-group {
Expand Down Expand Up @@ -250,9 +249,26 @@
}
}

#donate {
position: fixed;
bottom: calc(160px + 1.5rem);
left: 1rem;
z-index: 999;
visibility: visible;
opacity: 1;
transition: visibility 0s, opacity 1s linear;
&.hide {
opacity: 0;
visibility: hidden;
}
}

@media screen and (max-width: 750px) {
#settings {
#donate {
bottom: 1rem;
}
#settings {
bottom: calc(1.5rem + 60px);
display: block;
min-width: 0;
max-width: 100%;
Expand Down Expand Up @@ -408,6 +424,7 @@
});
window.roullete.start();
document.querySelector('#settings').classList.add('hide');
document.querySelector('#donate').classList.add('hide');
});

document.querySelector('#chkAutoRecording').addEventListener('change', (e) => {
Expand Down Expand Up @@ -447,7 +464,10 @@

window.roullete.addEventListener('goal', () => {
ready = false;
document.querySelector('#settings').classList.remove('hide');
setTimeout(() => {
document.querySelector('#settings').classList.remove('hide');
document.querySelector('#donate').classList.remove('hide');
}, 3000);
});
window.roullete.addEventListener('shakeAvailableChanged', (e) => {
document.querySelector('#inGame').classList.toggle('hide', !e.detail);
Expand Down Expand Up @@ -519,6 +539,9 @@ <h3>Enter names below</h3>
</div>
</div>
</div>
<div id="donate">
<script type="text/javascript" src="https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js" data-name="bmc-button" data-slug="lazygyu" data-color="#FFDD00" data-emoji="" data-font="Cookie" data-text="Buy me a coffee" data-outline-color="#000000" data-font-color="#000000" data-coffee-color="#ffffff" ></script>
</div>
<div id="inGame" class="settings hide">
<button id="btnShake">Shake!</button>
</div>
Expand Down

0 comments on commit 11a1a4d

Please sign in to comment.