Skip to content

GitHub Sponsors Link #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions website/content/donate.njk
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,28 @@ title: Donate
<p>To ensure MonoGame continues to thrive into the future the MonoGame Foundation <b>needs your support</b>. Your donations help us keep pace with advancing technology and new platforms, ensuring MonoGame remains a powerful tool for all game developers.</p>
<p>If your time using MonoGame has been enjoyable, educational, or it helped create your successful game, consider giving back to the project. Your contributions ensure a future where game development is accessible to everyone.</p>
<p>Donate now and be a part of this exciting journey.</p>
<a class="btn mg-patreon-button" type="button" href="https://www.patreon.com/bePatron?u=3142012" target="_blank">
{% include 'svgs/logos/patreon.svg'%}
Become a member!
</a>
<br/>
<div class="row justify-content-center">
<div class="col-md-auto mb-2 mx-4">
<a class="btn mg-patreon-button px-4" type="button" href="https://github.com/sponsors/MonoGame" target="_blank">
<i class="bi bi-heart"></i> GitHub
</a>
</div>
<div class="col-md-auto mb-2 mx-4">
<a class="btn mg-patreon-button px-4" type="button" href="https://www.patreon.com/bePatron?u=3142012" target="_blank">
{% include 'svgs/logos/patreon.svg'%} Patreon
</a>
</div>
</div>
</div>
<div class="col-sm-3 patreon-stats">
<div class="patreon-stat monthly">
<span id="per-month"></span>
<p>monthly</p>
<p>Monthly</p>
</div>
<div class="patreon-stat patreon">
<span id="total-patrons"></span>
<p>patrons</p>
<p>Sponsors</p>
</div>
</div>
</div>
Expand Down
11 changes: 10 additions & 1 deletion website/content/public/js/patreon.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@
if(data.included && data.included.length > 0) {
const attributes = data.included[0].attributes;
const patron_count = attributes.patron_count;
const pledge_sum = attributes.pledge_sum;
let pledge_sum = attributes.pledge_sum;

// HACK: Add in a few things from other services.
{
// Re-logic's monthly donation.
pledge_sum += 100000;

// TODO: Get GitHub sponsors and merge them with this.
// Requires a personal access token to do so.
}

const total_patrons = document.getElementById('total-patrons');
countUp(total_patrons, patron_count, (x) => x);
Expand Down