Skip to content

Commit

Permalink
Add sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaureir committed Nov 1, 2023
1 parent 2f4ddc6 commit ca6436c
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
16 changes: 16 additions & 0 deletions generate_site/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,28 @@
reader = csv.DictReader(f)
keynotes = list(reader)

with open("sponsors.csv") as f:
reader = csv.DictReader(f)
_sponsors = list(reader)

sponsors = {}
for s in _sponsors:
_type = s["type"]
if _type not in sponsors:
sponsors[_type] = []
sponsors[_type].append({
"name": s["name"],
"image": s["image"],
"url": s["url"],
})

# TODO: Download images? 'Headshot image' is the column name

##### Template configuration
conf = {
"ORG": df_org,
"KEYNOTES": keynotes[:2], # only two keynotes
"SPONSORS": sponsors,
}

templates = {
Expand Down
3 changes: 3 additions & 0 deletions generate_site/sponsors.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name,type,image,url
"IndyPy","Community","community_indypy.png","https://indypy.org/"
"PyTexas","Community","community_pytexas.png","https://www.pytexas.org/"
33 changes: 30 additions & 3 deletions generate_site/templates/index-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h3 class="display-6 special-font pink">Join us!</h2>
</p>
<div class="row row-cols-1 row-cols-md-3 mb-3 text-center">

<div class="col d-flex alignn-items-stretch">
<div class="col d-flex align-items-stretch">
<div class="card mb-4 rounded-3 shadow-sm bg-dark text-white">
<div class="card-body">
<h5 class="card-title special-font">Be a Volunteer</h5>
Expand All @@ -132,7 +132,7 @@ <h5 class="card-title special-font">Be a Volunteer</h5>
</div>
</div>

<div class="col d-flex alignn-items-stretch">
<div class="col d-flex align-items-stretch">
<div class="card mb-4 rounded-3 shadow-sm bg-dark text-white">
<div class="card-body">
<h5 class="card-title special-font">Make a difference!</h5>
Expand All @@ -143,7 +143,7 @@ <h5 class="card-title special-font">Make a difference!</h5>
</div>
</div>

<div class="col d-flex alignn-items-stretch">
<div class="col d-flex align-items-stretch">
<div class="card mb-4 rounded-3 shadow-sm bg-dark text-white">
<div class="card-body">
<h5 class="card-title special-font">Meet PyLadies from all over the world</h5>
Expand All @@ -160,6 +160,33 @@ <h5 class="card-title special-font">Meet PyLadies from all over the world</h5>
</div>
</div>

<!-- sponsors section -->
<div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3">
<div class="bg-light me-md-3 py-3 px-3 py-md-5 px-md-5 overflow-hidden">
<div class="my-3 py-3 px-5">
<img class="icon-section" src="img/details-icon.png"/>
<h3 class="display-6 special-font pink">Sponsors</h3>
<p class="lead">
Know the sponsors of our conference.
</p>
<!-- TODO: Add the other levels -->
{% if SPONSORS['Community'] %}
<h4 class="special-font pink">Community</h4>
<div class="row row-cols-6 text-center align-items-center">
{% for sponsor in SPONSORS['Community'] %}
<div class="col d-flex align-items-center">
<a href="{{ sponsor['url'] }}">
<img class="w-50" src="img/sponsors/{{ sponsor['image']}}" alt="{{ sponsor['name'] }} logo" />
</a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
</div>

<!-- contact -->
<div class="d-md-flex flex-md-equal w-100 my-md-3 ps-md-3" id="contact">
<div class="bg-pink me-md-3 py-3 px-3 py-md-5 px-md-5 text-white overflow-hidden">
Expand Down
Binary file added img/sponsors/community_indypy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/sponsors/community_pytexas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ca6436c

Please sign in to comment.