Skip to content

Commit 5fbcef3

Browse files
committed
Refactored sponsorship overview into component
1 parent e9c5b53 commit 5fbcef3

File tree

22 files changed

+359
-110
lines changed

22 files changed

+359
-110
lines changed

docs/insiders.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,19 @@ You can cancel your sponsorship anytime.[^3]
8989
through Stripe. As we don't receive any information regarding your payment,
9090
and GitHub doesn't offer refunds, sponsorships are non-refundable.
9191

92-
[:octicons-heart-fill-24:{ .mdx-heart } &nbsp; Join our <span class="mdx-insiders-count"></span> awesome sponsors][5]{ .md-button .md-button--primary .mdx-insiders-button }
93-
94-
<div class="mdx-insiders-container" markdown="1" hidden>
95-
<div class="mdx-insiders-list"></div>
96-
_If you sponsor publicly, you're automatically added here with a link to
97-
your profile and avatar to show your support for Material for MkDocs.
98-
Alternatively, if you wish to keep your sponsorship private, you'll be a
99-
silent +1. You can select visibility during checkout and change it
100-
afterwards._
92+
[:octicons-heart-fill-24:{ .mdx-heart } &nbsp; Join our <span class="mdx-sponsorship-count" data-mdx-component="sponsorship-count"></span> awesome sponsors][5]{ .md-button .md-button--primary .mdx-sponsorship-button }
93+
94+
<div class="mdx-sponsorship" data-mdx-component="sponsorship" hidden>
95+
<div class="mdx-sponsorship__list"></div>
96+
<small>
97+
If you sponsor publicly, you're automatically added here with a link to
98+
your profile and avatar to show your support for Material for MkDocs.
99+
Alternatively, if you wish to keep your sponsorship private, you'll be a
100+
silent +1. You can select visibility during checkout and change it
101+
afterwards.
102+
</small>
101103
</div>
102104

103-
<script>
104-
fetch("https://gpiqp43wvb.execute-api.us-east-1.amazonaws.com/_/").then(function(e){return e.json()}).then(function(e){var t=document.querySelector(".mdx-insiders-list"),n=0;for(var o of e.sponsors)if("PUBLIC"===o.type){var s;(s=document.createElement("a")).href=o.url,s.title="@"+o.name,s.className="mdx-insiders-list__item",t.appendChild(s);var r=document.createElement("img");r.src=o.image,s.appendChild(r)}else n++;(s=document.createElement("a")).href="https://github.com/sponsors/squidfunk",s.title="[private]",s.innerText="+"+n,s.className="mdx-insiders-list__item mdx-insiders-list__item--private",t.appendChild(s),document.querySelector(".mdx-insiders-count").innerText=e.sponsors.length,document.querySelector(".mdx-insiders-container").removeAttribute("hidden"),document.querySelector('.mdx-insiders-total').innerText=" $ "+e.total.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")}).catch(console.log);
105-
</script>
106-
107105
[5]: https://github.com/sponsors/squidfunk
108106

109107
## Exclusive features
@@ -133,7 +131,7 @@ from time to time to learn about what's new, or follow [@squidfunk on
133131

134132
[6]: https://twitter.com/squidfunk
135133

136-
## Funding<span class="mdx-insiders-total mdx-insiders-count"></span>
134+
## Funding <span class="mdx-sponsorship-total" data-mdx-component="sponsorship-total"></span>
137135

138136
### Goals
139137

material/assets/javascripts/bundle.9b55be7b.min.js renamed to material/assets/javascripts/bundle.1a39fc1d.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/javascripts/bundle.9b55be7b.min.js.map renamed to material/assets/javascripts/bundle.1a39fc1d.min.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ <h1>{{ page.title | d(config.site_name, true)}}</h1>
217217
</script>
218218
{% endblock %}
219219
{% block scripts %}
220-
<script src="{{ 'assets/javascripts/bundle.9b55be7b.min.js' | url }}"></script>
220+
<script src="{{ 'assets/javascripts/bundle.1a39fc1d.min.js' | url }}"></script>
221221
{% for path in config["extra_javascript"] %}
222222
<script src="{{ path | url }}"></script>
223223
{% endfor %}

material/overrides/assets/javascripts/bundle.55e80bbe.min.js

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/overrides/assets/javascripts/bundle.cf78cd63.min.js.map renamed to material/overrides/assets/javascripts/bundle.55e80bbe.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/overrides/assets/javascripts/bundle.cf78cd63.min.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

material/overrides/assets/stylesheets/main.0220c4ec.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/overrides/assets/stylesheets/main.0220c4ec.min.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/overrides/assets/stylesheets/main.6c7993e4.min.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)