Skip to content

Commit

Permalink
Remove donate JS code in favor of CSS-only solution (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
doup authored Dec 10, 2024
1 parent b1912ac commit 7c3c6b7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
18 changes: 18 additions & 0 deletions sass/pages/_donate.scss
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,21 @@ div.donate-sponsor {
text-align: center;
margin-top: 4rem;
}

#membership {
display: block;
}

#corporate-sponsorship {
display: none;
}

@include state-checked("donate-view") {
#membership {
display: none;
}

#corporate-sponsorship {
display: block;
}
}
16 changes: 0 additions & 16 deletions static/donate.js

This file was deleted.

17 changes: 8 additions & 9 deletions templates/donate.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{% import "macros/numbers.html" as numbers %}
{% extends "layouts/base.html" %}

{% block head_extensions %}
<script src="/donate.js"></script>
{% endblock head_extensions %}

{% block content %}

{% set donors = load_data(path="content/donate/donors.toml") %}
Expand Down Expand Up @@ -83,6 +79,8 @@
</div>
</div>

<input id="donate-view-state" class="hidden" type="checkbox">
<div data-donate-view-state-container>
<div id="membership">
<h2 class="donate-header-padding">Membership</h2>
<div class="donate-levels-container">
Expand Down Expand Up @@ -120,12 +118,12 @@ <h2 class="donate-header-padding">Membership</h2>
{% endfor %}
</div>
</div>
<button type="button" class="card donate-corporate-button" onclick="show_corporate()">
<label for="donate-view-state" class="card donate-corporate-button">
Corporate Tiers
</button>
</label>
</div>

<div id="corporate-sponsorship" style="display: none">
<div id="corporate-sponsorship">
<h2 class="donate-header-padding">Corporate Sponsorship</h2>
<div class="donate-membership-description">
These tiers exist for individuals or organizations that want to support Bevy in a big way. We <i>highly</i> recommend using bank transfers for payments at these levels to avoid exorbitant credit card processor fees. Please <a href="mailto:[email protected]">contact us</a> if you have any questions, or if you would like to discuss other payment options!
Expand Down Expand Up @@ -166,9 +164,10 @@ <h2 class="donate-header-padding">Corporate Sponsorship</h2>
{% endfor %}
</div>
</div>
<button type="button" class="card donate-corporate-button" onclick="show_membership()">
<label for="donate-view-state" class="card donate-corporate-button">
Individual Tiers
</button>
</label>
</div>
</div>

<div class="donate-faq-link"><a href="/donate/options">Click here</a> for more donation options and FAQs</div>
Expand Down

0 comments on commit 7c3c6b7

Please sign in to comment.