Skip to content

Commit 44db259

Browse files
committed
add data to supporters
1 parent 575b2a3 commit 44db259

File tree

9 files changed

+134
-157
lines changed

9 files changed

+134
-157
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<section>
2+
<h2>Foundational Supporters</h2>
3+
<p>Black Python Devs operates primarily on support from individuals. It is those supporters that serve as the foundation for what we do.</p>
4+
<p>We would like to recognize our supporters who donate at least $200 each year.</p>
5+
{% for year in data %}
6+
<article>
7+
<h3>{{year}} Supporters</h3>
8+
<div class="grid">
9+
{% for data_lists in data[year] | slice(3) %}
10+
<section class="">
11+
<div>
12+
<ul>
13+
{% for supporter in data_lists %}
14+
<li>{{supporter}}</li>
15+
{% endfor %}
16+
</ul>
17+
</div>
18+
</section>
19+
{% endfor %}
20+
</div>
21+
</article>
22+
{% endfor %}
23+
<p>You can view the archive of supporters<sup>*</sup> by year at https://github.com/blackpythondevs/blackpythondevs.</p>
24+
<p>* <sub>Those who marked their desire to remain anonymous have not been included</sub></p>
25+
</div>
26+
</section>

_layouts/_includes/join_us.html

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,7 @@ <h2>Not a member yet?</h2>
1616
<h2>Support Black Python Devs</h2>
1717
<article>
1818
<div class="grid">
19-
<div>
20-
<script>
21-
(function () {
22-
if (document.getElementById("commitchange-script")) return;
23-
var npo = 6464;
24-
var script = document.createElement("script");
25-
var first = document.getElementsByTagName("script")[0];
26-
script.setAttribute("data-npo-id", npo);
27-
script.id = "commitchange-script";
28-
script.src = "https://us.commitchange.com/js/donate-button.v2.js";
29-
30-
script.onload = function () {
31-
const observer = new MutationObserver(function (mutations) {
32-
const iframe = document.querySelector(".commitchange-iframe-embedded");
33-
if (iframe && !iframe.hasAttribute("title")) {
34-
iframe.setAttribute("title", "Donation form for Black Python Devs");
35-
observer.disconnect(); // Stop observing once we've set the title
36-
}
37-
});
38-
39-
observer.observe(document.body, { childList: true, subtree: true });
40-
};
41-
42-
first.parentNode.insertBefore(script, first);
43-
})();
44-
</script>
45-
<a data-amounts="25,50,100,250,500,1000,1500" class="commitchange-donate" data-designation="Black Python Devs" data-embedded=""></a>
46-
</div>
19+
<div>{% include "_includes/support_widget.html" %}</div>
4720
<div>
4821
<img class="donation-photo" src="/assets/images/gnome_powered_bpd_stacked.png" alt="Black Python Devs logo with GNOME Foundation sponsorship" />
4922
</div>

_layouts/_includes/pitch_deck.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<h2>Learn More about Supporting</h2>
2+
<div style="position: relative; width: 100%; height: 0; padding-top: 56.25%; padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63, 69, 81, 0.16); margin-top: 1.6em; margin-bottom: 0.9em; overflow: hidden; border-radius: 8px; will-change: transform">
3+
<iframe
4+
loading="lazy"
5+
title="Black Python Devs support information"
6+
style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0; margin: 0"
7+
src="https://www.canva.com/design/DAGKXBERZ2s/AbT0GzW284THN6wSayNMMg/view?embed"
8+
allowfullscreen="allowfullscreen"
9+
allow="fullscreen"
10+
>
11+
</iframe>
12+
</div>
13+
<a href="https:&#x2F;&#x2F;www.canva.com&#x2F;design&#x2F;DAGKXBERZ2s&#x2F;AbT0GzW284THN6wSayNMMg&#x2F;view?utm_content=DAGKXBERZ2s&amp;utm_campaign=designshare&amp;utm_medium=embeds&amp;utm_source=link" target="_blank" rel="noopener"
14+
>PITCH Deck</a
15+
>
16+
by Black Python Devs
17+
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<script>
2+
(function () {
3+
if (document.getElementById("commitchange-script")) return;
4+
var npo = 6464;
5+
var script = document.createElement("script");
6+
var first = document.getElementsByTagName["script"](0);
7+
script.setAttribute("data-npo-id", npo);
8+
script.id = "commitchange-script";
9+
script.src = "https://us.commitchange.com/js/donate-button.v2.js";
10+
11+
// Add this to your existing CommitChange script
12+
const observer = new MutationObserver(() => {
13+
document.querySelectorAll(".commitchange-iframe-embedded").forEach((iframe) => {
14+
if (!iframe.title) iframe.title = "Donation form for Black Python Devs";
15+
});
16+
});
17+
observer.observe(document.body, { childList: true, subtree: true });
18+
19+
first.parentNode.insertBefore(script, first);
20+
})();
21+
</script>
22+
<a data-amounts="25,50,100,250,500,1000,1500" class="commitchange-donate" data-designation="Black Python Devs" data-embedded=""></a>

_layouts/support.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% extends "default.html" %}
2+
3+
{% block content %}
4+
{{content}}
5+
6+
7+
{% include "_includes/support_widget.html" %}
8+
{% include "_includes/foundational_supporters.html" %}
9+
{% include "_includes/pitch_deck.html" %}
10+
{% endblock %}

app.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
import typing
2+
import pathlib
3+
import json
14
from render_engine import Site, Page, Collection, Blog
25
from render_engine_markdown import MarkdownPageParser
6+
from render_engine_parser import BasePageParser
37

48
navigation = [
59
{"text": "Home", "url": "/index.html", "fa": "fa fa-home fa-fw"},
@@ -29,7 +33,32 @@ class Index(Page):
2933

3034
@app.page
3135
class About(Page):
32-
content_path = "pages/about.html"
36+
content_path = "about.html"
37+
template = "default.html"
38+
39+
40+
@app.page
41+
class Support(Page):
42+
parser = MarkdownPageParser
43+
content_path = "support.md"
44+
template = "support.html"
45+
46+
def __init__(
47+
self,
48+
content_path: pathlib.Path | str | None = None,
49+
content: typing.Any | None = None,
50+
Parser: type[BasePageParser] | None = None,
51+
) -> None:
52+
super().__init__(content_path, content, Parser)
53+
self.data = json.loads(
54+
pathlib.Path("_data/foundational_supporters.json").read_text()
55+
)
56+
57+
58+
@app.collection
59+
class Pages(Collection):
60+
Parser = MarkdownPageParser
61+
content_path = "pages"
3362
template = "default.html"
3463

3564

output/index.html

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,28 @@ <h2>Not a member yet?</h2>
9999
<h2>Support Black Python Devs</h2>
100100
<article>
101101
<div class="grid">
102-
<div>
103-
<script>
104-
(function () {
105-
if (document.getElementById("commitchange-script")) return;
106-
var npo = 6464;
107-
var script = document.createElement("script");
108-
var first = document.getElementsByTagName("script")[0];
109-
script.setAttribute("data-npo-id", npo);
110-
script.id = "commitchange-script";
111-
script.src = "https://us.commitchange.com/js/donate-button.v2.js";
112-
113-
script.onload = function () {
114-
const observer = new MutationObserver(function (mutations) {
115-
const iframe = document.querySelector(".commitchange-iframe-embedded");
116-
if (iframe && !iframe.hasAttribute("title")) {
117-
iframe.setAttribute("title", "Donation form for Black Python Devs");
118-
observer.disconnect(); // Stop observing once we've set the title
119-
}
120-
});
102+
<div><script>
103+
(function () {
104+
if (document.getElementById("commitchange-script")) return;
105+
var npo = 6464;
106+
var script = document.createElement("script");
107+
var first = document.getElementsByTagName["script"](0);
108+
script.setAttribute("data-npo-id", npo);
109+
script.id = "commitchange-script";
110+
script.src = "https://us.commitchange.com/js/donate-button.v2.js";
121111

122-
observer.observe(document.body, { childList: true, subtree: true });
123-
};
112+
// Add this to your existing CommitChange script
113+
const observer = new MutationObserver(() => {
114+
document.querySelectorAll(".commitchange-iframe-embedded").forEach((iframe) => {
115+
if (!iframe.title) iframe.title = "Donation form for Black Python Devs";
116+
});
117+
});
118+
observer.observe(document.body, { childList: true, subtree: true });
124119

125-
first.parentNode.insertBefore(script, first);
126-
})();
127-
</script>
128-
<a data-amounts="25,50,100,250,500,1000,1500" class="commitchange-donate" data-designation="Black Python Devs" data-embedded=""></a>
129-
</div>
120+
first.parentNode.insertBefore(script, first);
121+
})();
122+
</script>
123+
<a data-amounts="25,50,100,250,500,1000,1500" class="commitchange-donate" data-designation="Black Python Devs" data-embedded=""></a></div>
130124
<div>
131125
<img class="donation-photo" src="/assets/images/gnome_powered_bpd_stacked.png" alt="Black Python Devs logo with GNOME Foundation sponsorship" />
132126
</div>

support.html

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

support.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
lang: en
3+
title: Support
4+
---
5+
6+
# Support Black Python Devs
7+
8+
Black Python Devs is a Non-Profit, fiscally hosted under the [GNOME Foundation](https://foundation.gnome.org/). The GNOME Foundation takes a small percentage for administration costs and support but at least 90% of proceeds goes directly to Black Python Devs Fund to support operational costs and supporting community events in the communities of Black Python Devs.

0 commit comments

Comments
 (0)