Skip to content

Commit 34b0fb0

Browse files
committed
refactor: modernize hero design and simplify navigation
- Stack hero image and text vertically, prioritizing image. - Refactor navigation: - Remove Home and Community links. - Rename Blog to News. - Combine BPD and Sponsored Events into Events dropdown. - Combine Support and Discounts. - Add Partnership Discounts to Support page. - Fix variable name for foundational supporters.
1 parent aa6febf commit 34b0fb0

File tree

9 files changed

+262
-58
lines changed

9 files changed

+262
-58
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>

_layouts/_includes/header.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@ <h1 class="site-title">
88
<ul class="menu" role="menu">
99
{% for item in navigation %} {% set current = nil %} {% set nav_lang = nil %} {% if url == item.url %} {% set current = 'nav-current' %} {% endif %} {% if lang != 'en' %} {% set nav_lang = lang %} {% endif %}
1010
<li class="menu-item {{ current }}" role="menuitem">
11+
{% if item.sublinks %}
12+
<a href="#" aria-haspopup="true"> <i class="{{ item.fa }}" aria-hidden="true"></i>&nbsp;{{ item.text }} <i class="fa fa-caret-down"></i></a>
13+
<ul class="submenu" aria-label="submenu">
14+
{% for sub in item.sublinks %}
15+
<li><a href="{{ nav_lang }}{{ sub.url }}">{{ sub.text }}</a></li>
16+
{% endfor %}
17+
</ul>
18+
{% else %}
1119
<a class="{{ current }}" href="{{ nav_lang }}{{ item.url }}"> <i class="{{ item.fa }}" aria-hidden="true"></i>&nbsp;{{ item.text }} </a>
20+
{% endif %}
1221
</li>
1322
{% endfor %} {% if locales | length > 1 %}
1423
<li class="menu-item" role="menuitem">

_layouts/_includes/stats.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="grid" style="text-align: center; margin: 2rem 0 3rem">
1+
<div class="grid" style="text-align: center; margin: 2rem auto 3rem">
22
<article>
33
<h2 class="pico-color-pumpkin-500">{{ member_count }}</h2>
44
<p>Community Members</p>

_layouts/about.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@ <h2>The Goal of Black Python Devs</h2>
3434
<li>Increase participation of Black Python Devs members in existing Python community programs, events, and initiatives.</li>
3535
</ul>
3636
</article>
37+
38+
<article>
39+
<h2>Join the Community</h2>
40+
<p>We understand the importance of communication and collaboration. That's why we've created spaces where you can connect with us and other community members.</p>
41+
42+
<div class="grid">
43+
<div>
44+
<h3><i class="fab fa-discord"></i> Discord</h3>
45+
<p>Join our Discord server to discuss everything from Python basics to advanced topics. <a href="https://discord.gg/XUc3tFqCT3">Join here</a>.</p>
46+
</div>
47+
<div>
48+
<h3><i class="fab fa-linkedin"></i> LinkedIn</h3>
49+
<p>Connect with professionals and stay updated. Follow our <a href="https://www.linkedin.com/company/black-python-devs">Page</a> and join our <a href="https://www.linkedin.com/groups/14336241/">Group</a>.</p>
50+
</div>
51+
<div>
52+
<h3><i class="fab fa-x-twitter"></i> X (Twitter)</h3>
53+
<p>Follow us on <a href="https://x.com/blackpythondevs">X</a> for the latest updates.</p>
54+
</div>
55+
</div>
56+
</article>
3757
</div>
3858
</section>
3959
<h3>Leadership Team</h3>

_layouts/index.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,29 @@
1414
<div class="hero-content">
1515
<div class="hero-text-wrapper">
1616
<h1 class="hero-text">Helping build communities for Black Pythonistas around the world.</h1>
17+
18+
<div class="hero-values">
19+
<ul class="hero-values-list">
20+
<li>Build & Support Black Leadership in Python</li>
21+
<li>Support the Communities that Build that Black Leadership</li>
22+
<li>Raise Money to do both</li>
23+
</ul>
24+
<a href="/about.html" role="button" class="contrast">Learn More</a>
25+
</div>
1726
</div>
1827
<div class="hero-image-wrapper">
1928
<img src="/assets/images/BPD_PyCon_2024_cropped.jpg" alt="Black Python Devs at PyCon 2024" class="hero-image" />
2029
</div>
2130
</div>
2231
</article>
2332

24-
<article>
33+
<article class="section-stats">
2534
{% include "_includes/stats.html" %}
2635
</article>
27-
<article>
36+
<article class="section-support">
2837
{% include "_includes/support.html" %}
2938
</article>
30-
<article>
39+
<article class="section-newsletter">
3140
{% include "_includes/newsletter_form.html" %}
3241
</article>
3342
{% endblock %}

_layouts/partnerships.html

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

_layouts/support.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% block content %}
44
{{content}}
55
{% include "_includes/support_widget.html" %}
6+
{% include "_includes/partnerships.html" %}
67
{% include "_includes/foundational_supporters.html" %}
78
{% include "_includes/pitch_deck.html" %}
89
{% endblock %}

app.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
from render_engine_markdown import MarkdownPageParser
77

88
navigation = [
9-
{"text": "Home", "url": "/index.html", "fa": "fa fa-home fa-fw"},
10-
{"text": "Blog", "url": "/blog/blog1.html", "fa": "fa fa-newspaper fa-fw"},
9+
{"text": "News", "url": "/blog/blog1.html", "fa": "fa fa-newspaper fa-fw"},
1110
{"text": "About Us", "url": "/about.html", "fa": "fa fa-info-circle fa-fw"},
12-
{"text": "BPD Events", "url": "/bpd-events", "fa": "fa fa-calendar fa-fw"},
1311
{
14-
"text": "Sponsored Events",
15-
"url": "/sponsored-events.html",
16-
"fa": "fa fa-handshake fa-fw",
12+
"text": "Events",
13+
"url": "#",
14+
"fa": "fa fa-calendar fa-fw",
15+
"sublinks": [
16+
{"text": "BPD Events", "url": "/bpd-events"},
17+
{"text": "Sponsored Events", "url": "/sponsored-events.html"},
18+
],
1719
},
18-
{"text": "Community", "url": "/community.html", "fa": "fa fa-users fa-fw"},
19-
{"text": "Discounts", "url": "/partnerships.html", "fa": "fa-regular fa-handshake"},
2020
{
21-
"text": "Support Us",
21+
"text": "Support",
2222
"url": "/support.html",
2323
"fa": "fa-solid fa-money-check-dollar",
2424
},
@@ -56,7 +56,12 @@ class Support(Page):
5656
Parser = MarkdownPageParser
5757
content_path = "support.md"
5858
template = "support.html"
59-
data = json.loads(pathlib.Path("_data/foundational_supporters.json").read_text())
59+
template_vars = {
60+
"foundational_supporters": json.loads(
61+
pathlib.Path("_data/foundational_supporters.json").read_text()
62+
),
63+
"partnerships": json.loads(pathlib.Path("_data/partnerships.json").read_text()),
64+
}
6065

6166

6267
@app.page
@@ -67,12 +72,6 @@ class SponsoredEvents(Page):
6772
template_vars = {}
6873

6974

70-
@app.page
71-
class Partnerships(Page):
72-
template = "partnerships.html"
73-
data = json.loads(pathlib.Path("_data/partnerships.json").read_text())
74-
75-
7675
@app.collection
7776
class Pages(Collection):
7877
Parser = MarkdownPageParser

0 commit comments

Comments
 (0)