Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ _includes/svg_symbol.html
_includes/disqus_comments.html
_includes/posts.html
_data/conferences.yml
_layouts/_includes/sponsored-events.html
24 changes: 16 additions & 8 deletions _data/sponsored_events.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"2024": {
"Africa": ["PyCon Africa", "PyCon South Africa", "PyCon Zimbabwe", "PyCon Nigeria", "IndabaX - Botswana", "PyCon Uganda", "PyHo - Ghana"],
"North America": ["PyTexas", "PyOhio"]
},
"2025": {
"Africa": ["Django Girls - Koforidua", "Django Girls - Ho", "PyCon Africa", "DjangoCon Africa", "IndabaX - Botswana", "PyCon Namibia", "PyTogo", "Zero to Hero Mentorship Program - Nigeria", "PyCon Nigeria"],
"North America": ["PyTexas Foundation", "PyOhio", "PyBeach", "PyBay", "PyDay Santo Domingo (SDQ)"],
"South America": ["Ubuntu Tech - Colombia", "Django Girls - Colombia"]
"bpd": [
{
"title": "Black Python Devs Leadership Summita 2024",
"url": "/bpd-events/black-python-devs-leadership-summit-2024.html"
}
],
"sponsored": {
"2024": {
"Africa": ["PyCon Africa", "PyCon South Africa", "PyCon Zimbabwe", "PyCon Nigeria", "IndabaX - Botswana", "PyCon Uganda", "PyHo - Ghana"],
"North America": ["PyTexas", "PyOhio"]
},
"2025": {
"Africa": ["Django Girls - Koforidua", "Django Girls - Ho", "PyCon Africa", "DjangoCon Africa", "IndabaX - Botswana", "PyCon Namibia", "PyTogo", "Zero to Hero Mentorship Program - Nigeria", "PyCon Nigeria"],
"North America": ["PyTexas Foundation", "PyOhio", "PyBeach", "PyBay", "PyDay Santo Domingo (SDQ)"],
"South America": ["Ubuntu Tech - Colombia", "Django Girls - Colombia"]
}
}
}
8 changes: 8 additions & 0 deletions _layouts/_includes/event-list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<article>
<h2>BPD Organized Events</h2>
<ul>
{% for page in data.bpd %}
<li><a href="{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
</article>
15 changes: 14 additions & 1 deletion _layouts/_includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@ <h1 class="site-title">
<nav class="site-navigation" aria-label="Main navigation" style="padding-right: 2em">
<div class="site-navigation-wrap">
<ul class="menu" role="menu">
{% 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 %}
{% for item in navigation %} {% set current = nil %} {% set nav_lang = nil %} {% if item.url and url == item.url %} {% set current = 'nav-current' %} {% endif %} {% if lang != 'en' %} {% set nav_lang = lang %} {% endif %}
<li class="menu-item {{ current }}" role="menuitem">
{% if item.subitems %}
<details class="dropdown">
<summary><i class="{{ item.fa }}" aria-hidden="true"></i>&nbsp;{{ item.text }}</summary>
<ul class="dropdown-menu">
{% for sub in item.subitems %}
<li class="dropdown-item">
<a href="{{ nav_lang }}{{ sub.url }}"><i class="{{ sub.fa }}" aria-hidden="true"></i>&nbsp;{{ sub.text }}</a>
</li>
{% endfor %}
</ul>
</details>
{% else %}
<a class="{{ current }}" href="{{ nav_lang }}{{ item.url }}"> <i class="{{ item.fa }}" aria-hidden="true"></i>&nbsp;{{ item.text }} </a>
{% endif %}
</li>
{% endfor %} {% if locales | length > 1 %}
<li class="menu-item" role="menuitem">
Expand Down
30 changes: 7 additions & 23 deletions _layouts/_includes/meetups.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
{% if site.data.events.meetups.size > 0 %}
<div class="conference grid">
{% for meetup in site.data.events.meetups %}
<article>
<h2>
<a href="https://discord.gg/XUc3tFqCT3">{{ meetup.name }}</a>
</h2>
<h5>Speaking: {{ meetup.speaker }}</h5>
<p>
<strong>{{ meetup.date }}</strong><br />
<strong>{{ meetup.location }}</strong>
</p>
<p>{{ meetup.description }}</p>

<p>{{ conference.topic }}</p>
</article>
{% endfor %}
</div>
{% else %}
<b>No Meetups</b>
{% endif %}

<hr />
<article>
<h2>Regular Meetups</h2>
<p>
Join us every Friday for a cup of coffee and a chance to code with fellow Python enthusiasts. Our community is open to all levels of experience, sharing tips and tricks, and working on projects together. Whether you're looking to learn something
new or just want to hang out with like-minded people, this is the perfect opportunity to do so. We look forward to seeing you there!
</p>
</article>
45 changes: 45 additions & 0 deletions _layouts/_includes/sponsored-events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!-- This file is ignored by Prettier due to Jinja syntax conflicts -->
<article>
<section>
<h2>Supported Events</h2>

<p>Black Python Devs aims to partner with Python conferences and events around the world to increase the visibility and opportunities for Black developers and leaders in the Python community.</p>

<p>We believe that sponsorships does the following:</p>
<ul>
<li>👫 - raises awareness amongst our community to attend events.</li>
<li>🌐 - supports Python events that are accessible to black communities</li>

</ul>
<p>Here is a look at events this year that we've supported:</p>
</section>


<section>
<h2>Events Sponsored by year</h2>
{% for segment_year in data.sponsored | sort(reverse=True) %}
{% if segment_year == year %}
<details name="{{segment_year}}" open>
{% else %}
<details name="{{segment_year}}">
{% endif %}
<summary>{{segment_year}}</summary>
<section class="grid">
{% for segment in data.sponsored[segment_year] | sort %}
<article>
<h3>{{segment}}</h3>
{% for event in data.sponsored[segment_year][segment] | sort %}
<p>{{event}}</p>
{% endfor %}
</article>
{% endfor %}
</section>
</details>
<hr/>
{% endfor %}
</section>

<section>
<p>Interested in Black Python Devs supporting your event. Review our <a href="https://github.com/BlackPythonDevs/blackpythondevs/blob/main/policies/event-grants.md#22-budget-considerations">Grant Criteria</a> and email your prospectus to <a href="mailto:sponsorships@blackpythondevs.com">sponsorships@blackpythondevs.com</a></p>
</section>
</article>
14 changes: 0 additions & 14 deletions _layouts/event-list.html

This file was deleted.

6 changes: 6 additions & 0 deletions _layouts/events.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "default.html" %}
{% block content %}
{% include "_includes/sponsored-events.html" %}
{% include "_includes/event-list.html" %}
{% include "_includes/meetups.html" %}
{% endblock %}
24 changes: 0 additions & 24 deletions _layouts/partnerships.html
Original file line number Diff line number Diff line change
@@ -1,24 +0,0 @@
{% extends "default.html" %}

{% block content %}
<div>
<h2>Partnerships</h2>

<p>We're happy to share with you our proud sponsors who offer their products at discounted rates and a portion of proceeds go to support Black Python Devs!</p>

{% for partner in data %}
<article>
<div class="grid">
<div>
<img src="{{partner['logo']}}" alt="{{partner['name']}} Logo" style="max-height: 14em" />
</div>
<div>
<h3><a href="{{partner['url']}}">{{ partner['name'] }}</a></h3>
<p>{{ partner['description'] }}</p>
<a href="{{ partner[url] }}">Learn more</a>
</div>
</div>
</article>
{% endfor %}
</div>
{%endblock%}
50 changes: 0 additions & 50 deletions _layouts/sponsored-events.html

This file was deleted.

33 changes: 12 additions & 21 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
{"text": "Home", "url": "/index.html", "fa": "fa fa-home fa-fw"},
{"text": "Blog", "url": "/blog/blog1.html", "fa": "fa fa-newspaper fa-fw"},
{"text": "About Us", "url": "/about.html", "fa": "fa fa-info-circle fa-fw"},
{"text": "BPD Events", "url": "/bpd-events", "fa": "fa fa-calendar fa-fw"},
{
"text": "Sponsored Events",
"url": "/sponsored-events.html",
"fa": "fa fa-handshake fa-fw",
},
{"text": "Events", "fa": "fa fa-calendar fa-fw", "url": "/events.html"},
{"text": "Community", "url": "/community.html", "fa": "fa fa-users fa-fw"},
{"text": "Discounts", "url": "/partnerships.html", "fa": "fa-regular fa-handshake"},
{
Expand Down Expand Up @@ -57,11 +52,18 @@ class Support(Page):


@app.page
class SponsoredEvents(Page):
template = "sponsored-events.html"
slug = "sponsored-events"
class Events(Page):
template = "events.html"
data = json.loads(pathlib.Path("_data/sponsored_events.json").read_text())
template_vars = {}


@app.collection
class BPDEvents(Collection):
title = "BPD Events"
Parser = MarkdownPageParser
content_path = "events"
template = "default.html"
routes = ["./-events"]


@app.page
Expand All @@ -77,17 +79,6 @@ class Pages(Collection):
template = "default.html"


@app.collection
class BPDEvents(Collection):
title = "BPD Events"
Parser = MarkdownPageParser
content_path = "events"
template = "default.html"
routes = ["./bpd-events"]
has_archive = True
archive_template = "event-list.html"


@app.collection
class Blog(Blog):
Parser = MarkdownPageParser
Expand Down
86 changes: 86 additions & 0 deletions assets/css/bpd.css
Original file line number Diff line number Diff line change
Expand Up @@ -586,3 +586,89 @@ ul.speaking-list {
cursor: not-allowed;
}
}

/* Navigation Dropdowns */
.menu-item details.dropdown {
position: relative;
display: inline-block;
padding: 0;
margin: 0;
border: none;
background: transparent !important;
box-shadow: none !important;
width: auto;
}

.menu-item details.dropdown summary {
cursor: pointer;
list-style: none;
margin-bottom: 0;
padding: 5px 0;
background: transparent !important;
border: none !important;
box-shadow: none !important;
color: #868e96;
font-weight: 700;
font-size: 0.88889rem;
font-family: inherit;
outline: none;
}

.menu-item details.dropdown summary:hover,
.menu-item details.dropdown[open] summary {
color: #3588ff;
background: transparent !important;
}

.menu-item details.dropdown summary::-webkit-details-marker {
display: none;
}

/* Remove the default arrow from Pico or browser */
.menu-item details.dropdown summary::after {
display: none;
}

.menu-item details.dropdown[open] > summary {
margin-bottom: 0;
}

.menu-item details.dropdown ul.dropdown-menu {
position: absolute;
top: 100%;
right: 0;
left: auto; /* Ensure it doesn't align left */
min-width: 200px;
background-color: #222;
border: 1px solid #d7d7d7;
padding: 0.5rem 0;
margin: 0;
z-index: 1000;
display: flex !important;
flex-direction: column !important;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
text-align: left; /* Keep text inside aligned left */
}

.menu-item details.dropdown ul.dropdown-menu li.dropdown-item {
display: block !important;
margin: 0;
width: 100%;
border: none;
padding: 0;
}

.menu-item details.dropdown ul.dropdown-menu li.dropdown-item a {
display: block;
padding: 8px 15px;
width: 100%;
color: #868e96;
text-decoration: none;
font-size: 0.88889rem;
font-weight: normal;
}

.menu-item details.dropdown ul.dropdown-menu li.dropdown-item a:hover {
background-color: rgba(255, 255, 255, 0.1);
color: #3588ff;
}