Skip to content

Commit 252c815

Browse files
authored
fix partnerships (#847)
* fix partnerships * lint * more changes to link and show partnerships * lint
1 parent 5b6b17a commit 252c815

File tree

6 files changed

+29
-11
lines changed

6 files changed

+29
-11
lines changed

_layouts/_includes/foundational_supporters.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ <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>
55

6-
{% for data_year in data %} {% if data_year == year %}
6+
{% for data_year in foundational_supporters %} {% if data_year == year %}
77
<details name="{{data_year}}" open>
88
{% else %}
99
<details name="{{data_year}}">
1010
{% endif %}
1111
<summary>{{data_year}}</summary>
1212
<div class="grid">
13-
{% for data_lists in data[data_year] | sort | slice(3) %}
13+
{% for data_lists in foundational_supporters[data_year] | sort | slice(3) %}
1414
<section class="">
1515
<div>
1616
<ul>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<section>
2+
<h2 id="partnerships">Partnerships</h2>
3+
<p>Black Python Devs has partnered with the following organizations to offer discounts and benefits to our community.</p>
4+
<div class="grid">
5+
{% for partner in partnerships %}
6+
<article>
7+
<header>
8+
<a href="{{partner.url}}">
9+
<img src="{{partner.logo}}" alt="{{partner.name}} logo" style="max-height: 80px; object-fit: contain" />
10+
</a>
11+
</header>
12+
<h3><a href="{{partner.url}}">{{partner.name}}</a></h3>
13+
<p>{{partner.description}}</p>
14+
</article>
15+
{% endfor %}
16+
</div>
17+
</section>

_layouts/partnerships.html

Whitespace-only changes.

_layouts/support.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
{% block content %}
44
{{content}}
55
{% include "_includes/support_widget.html" %}
6+
{% set partnerships=data.partnerships %}
7+
{% include "_includes/partnerships.html" %}
8+
{% set foundational_supporters=data.foundational_supporters %}
69
{% include "_includes/foundational_supporters.html" %}
710
{% include "_includes/pitch_deck.html" %}
811
{% endblock %}

app.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
navigation = [
99
{"text": "News", "url": "/blog/blog1.html", "fa": "fa fa-newspaper fa-fw"},
1010
{"text": "About Us", "url": "/about.html", "fa": "fa fa-info-circle fa-fw"},
11-
{"text": "Discounts", "url": "/partnerships.html", "fa": "fa-regular fa-handshake"},
1211
{"text": "Events", "fa": "fa fa-calendar fa-fw", "url": "/events.html"},
1312
{
1413
"text": "Support Us",
@@ -46,7 +45,12 @@ class Support(Page):
4645
Parser = MarkdownPageParser
4746
content_path = "support.md"
4847
template = "support.html"
49-
data = json.loads(pathlib.Path("_data/foundational_supporters.json").read_text())
48+
data = {
49+
"foundational_supporters": json.loads(
50+
pathlib.Path("_data/foundational_supporters.json").read_text()
51+
),
52+
"partnerships": json.loads(pathlib.Path("_data/partnerships.json").read_text()),
53+
}
5054

5155

5256
@app.page
@@ -64,12 +68,6 @@ class BPDEvents(Collection):
6468
routes = ["./-events"]
6569

6670

67-
@app.page
68-
class Partnerships(Page):
69-
template = "partnerships.html"
70-
data = json.loads(pathlib.Path("_data/partnerships.json").read_text())
71-
72-
7371
@app.collection
7472
class Pages(Collection):
7573
Parser = MarkdownPageParser

support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ title: Support
77

88
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.
99

10-
Looking for member discounts? View our [Partnerships](/partnerships.html) page.
10+
Looking for member discounts? View our [Partnerships](#partnerships).

0 commit comments

Comments
 (0)