Skip to content

Commit 8ac6867

Browse files
kjaymillerclaude
andauthored
Update foundational supporters (#744)
* update foundational supporters * Add current year to global site variables - Move year variable from SponsoredEvents template_vars to global site_vars - Makes current year available to all templates - Enables year-based logic in foundational supporters display 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Update foundational supporters display with collapsible sections - Replace article elements with details/summary for better UX - Add sorting to supporter lists for consistent ordering - Set current year as default open section - Improve navigation between different years 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent af76b6c commit 8ac6867

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

_data/foundational_supporters.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
{
2-
"2025": ["Aman Singh", "Angela Andrews", "Carol Willing", "Hugh Dyar", "Jeremy Carbaugh", "Jonathan Banafato", "Mike Fiedler", "Ned Batchelder", "Peter Pinch", "Savannah Ostrowski", "Tim Schilling", "Vance Arocho"],
2+
"2025": [
3+
"Aman Singh",
4+
"Ned Batchelder",
5+
"Tim Schilling",
6+
"Jannis Leidel",
7+
"Angela Andrews",
8+
"Vance Arocho",
9+
"jonathan banafato",
10+
"Jeremy Carbaugh",
11+
"Mike Fiedler",
12+
"Savannah Bailey",
13+
"Peter Pinch",
14+
"Carol Willing",
15+
"Tim Schilling",
16+
"Hugh Dyar",
17+
"Melanie Arbor",
18+
"Joseph Bannerman",
19+
"Philip James",
20+
"Erik Johnson",
21+
"Deb Nicholson",
22+
"Andrew Sutherland",
23+
"David Scharbach"
24+
],
325
"2024": [
426
"Albert Sweigart",
527
"Angela Andrews",

_layouts/_includes/foundational_supporters.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
<h2>Foundational Supporters</h2>
33
<p>Black Python Devs operates primarily on support from individuals. It is those supporters that serve as the foundation for what we do.</p>
44
<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>
5+
6+
{% for data_year in data %}
7+
<details name="{{data_year}}" {% if data_year="" ="year" %}open{% endif %}>
8+
<summary>{{data_year}}</summary>
89
<div class="grid">
9-
{% for data_lists in data[year] | slice(3) %}
10+
{% for data_lists in data[data_year] | sort | slice(3) %}
1011
<section class="">
1112
<div>
1213
<ul>
@@ -18,7 +19,7 @@ <h3>{{year}} Supporters</h3>
1819
</section>
1920
{% endfor %}
2021
</div>
21-
</article>
22+
</details>
2223
{% endfor %}
2324
<p>You can view the archive of supporters<sup>*</sup> by year at https://github.com/blackpythondevs/blackpythondevs.</p>
2425
<p>* <sub>Those who marked their desire to remain anonymous have not been included</sub></p>

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
app.site_vars["locales"] = ["en"]
3232
app.site_vars["navigation"] = navigation
3333
app.site_vars["DATETIME_FORMAT"] = "%d %b %Y"
34+
app.site_vars["year"] = str(datetime.date.today().year)
3435

3536

3637
@app.page
@@ -58,7 +59,7 @@ class SponsoredEvents(Page):
5859
template = "sponsored-events.html"
5960
slug = "sponsored-events"
6061
data = json.loads(pathlib.Path("_data/sponsored_events.json").read_text())
61-
template_vars = {"year": str(datetime.date.today().year)}
62+
template_vars = {}
6263

6364

6465
@app.collection

0 commit comments

Comments
 (0)