Update donation popup and update links going to /donate/

This commit is contained in:
Emi
2025-01-03 19:56:43 +01:00
parent 84ec3f348c
commit 44f8e37f87
9 changed files with 187 additions and 285 deletions

View File

@@ -306,90 +306,6 @@ layout: default
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const thankYouWrapper = document.getElementById('thank-you');
// Close itself, when clicked outside of the popup area.
thankYouWrapper.addEventListener('click', (e) => {
if (e.target === thankYouWrapper) {
thankYouWrapper.style.display = 'none';
}
});
// Close with a close button.
const thankYouBackButton = document.querySelector('.btn-back-to-downloads');
thankYouBackButton.addEventListener('click', () => {
thankYouWrapper.style.display = 'none';
});
// Open from the main download buttons.
const downloadButtons = document.querySelectorAll('.btn-download');
downloadButtons.forEach((it) => {
it.addEventListener('click', () => {
thankYouWrapper.style.display = '';
document.querySelector('.btn.btn-donate').focus();
});
});
// Open from the all downloads list.
const downloadLinks = document.querySelectorAll('.download-link');
downloadLinks.forEach((it) => {
it.addEventListener('click', () => {
thankYouWrapper.style.display = '';
});
});
// Close the dialog when the user presses the escape key.
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
thankYouWrapper.style.display = 'none';
}
});
});
</script>
<div class="thankyou-wrapper" id="thank-you" style="display:none">
<div class="thankyou">
<h2>Godot is downloading!</h2>
<p class="thankyou-donate">
Godot exists thanks to people like you! Consider supporting continued development of the engine with a donation.
</p>
<a href="https://fund.godotengine.org" class="btn btn-donate">
Make a Donation
</a>
<h3>Thank you!</h3>
<hr style="width:65%">
<p class="thankyou-reading">
If this is your first time using the Godot Engine, take a look at our beginner resources:
</p>
<ul class="thankyou-reading-list">
<li>
A comprehensive
<a href="https://docs.godotengine.org/en/stable/getting_started/step_by_step/">Step by Step tutorial</a>
for 2D and 3D.
</li>
<li>
A collection of
<a href="https://godotengine.org/asset-library/asset?category=10&support[official]=1">official demo projects</a>
showcasing some of the engine features.
</li>
<li>
A guide to install Godot on
<a href="https://docs.godotengine.org/en/stable/about/faq.html#linux">Linux</a>,
<a href="https://docs.godotengine.org/en/stable/about/faq.html#windows">Windows</a>,
and
<a href="https://docs.godotengine.org/en/stable/about/faq.html#macos">macOS</a>.
</li>
</ul>
<div class="btn-back-to-downloads">
<img src="/assets/icons/cross.svg" width="24" height="24" alt="Close this popup">
</div>
</div>
</div>
{% include thankyou.html %}
{% include footer.html %}

View File

@@ -293,90 +293,6 @@ layout: default
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', () => {
const thankYouWrapper = document.getElementById('thank-you');
// Close itself, when clicked outside of the popup area.
thankYouWrapper.addEventListener('click', (e) => {
if (e.target === thankYouWrapper) {
thankYouWrapper.style.display = 'none';
}
});
// Close with a close button.
const thankYouBackButton = document.querySelector('.btn-back-to-downloads');
thankYouBackButton.addEventListener('click', () => {
thankYouWrapper.style.display = 'none';
});
// Open from the main download buttons.
const downloadButtons = document.querySelectorAll('.btn-download');
downloadButtons.forEach((it) => {
it.addEventListener('click', () => {
thankYouWrapper.style.display = '';
document.querySelector('.btn.btn-donate').focus();
});
});
// Open from the all downloads list.
const downloadLinks = document.querySelectorAll('.download-link');
downloadLinks.forEach((it) => {
it.addEventListener('click', () => {
thankYouWrapper.style.display = '';
});
});
// Close the dialog when the user presses the escape key.
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') {
thankYouWrapper.style.display = 'none';
}
});
});
</script>
<div class="thankyou-wrapper" id="thank-you" style="display:none">
<div class="thankyou">
<h2>Godot is downloading!</h2>
<p class="thankyou-donate">
Godot exists thanks to people like you! Consider supporting continued development of the engine with a donation.
</p>
<a href="/donate/" class="btn btn-donate">
Make a Donation
</a>
<h3>Thank you!</h3>
<hr style="width:65%">
<p class="thankyou-reading">
If this is your first time using the Godot Engine, take a look at our beginner resources:
</p>
<ul class="thankyou-reading-list">
<li>
A comprehensive
<a href="https://docs.godotengine.org/en/stable/getting_started/step_by_step/">Step by Step tutorial</a>
for 2D and 3D.
</li>
<li>
A collection of
<a href="https://godotengine.org/asset-library/asset?category=10&support[official]=1">official demo projects</a>
showcasing some of the engine features.
</li>
<li>
A guide to install Godot on
<a href="https://docs.godotengine.org/en/stable/about/faq.html#linux">Linux</a>,
<a href="https://docs.godotengine.org/en/stable/about/faq.html#windows">Windows</a>,
and
<a href="https://docs.godotengine.org/en/stable/about/faq.html#macos">macOS</a>.
</li>
</ul>
<div class="btn-back-to-downloads">
<img src="/assets/icons/cross.svg" width="24" height="24" alt="Close this popup">
</div>
</div>
</div>
{% include thankyou.html %}
{% include footer.html %}