Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ <h3 class="widget-title">Job Board Sponsors</h3>

{% for package, placement_info in sponsorships_by_package.items %}
{% if placement_info.sponsorships %}
<div title="{{ package }} Sponsors" align="center">
<div title="{{ package }} Sponsors" align="center" style="margin-bottom: 3em;">
{% with dimension=placement_info.logo_dimension %}

<h1 style="font-size: {% if forloop.first %}350%{% else %}300%{% endif %}">{{ placement_info.label }} Sponsors</h1>

<div style="display: grid; grid-gap: 2em; grid-template-columns: repeat(auto-fit, minmax({{ dimension }}px, 0fr)); grid-template-rows: repeat(1, minmax({{ dimension }}px, 0fr)); align-items: center; justify-content: center;">
<div style="display: grid; grid-gap: 2em; grid-template-columns: repeat(auto-fit, minmax({{ dimension }}px, 1fr)); align-items: center; justify-content: center;">
{% for sponsorship in placement_info.sponsorships %}
<div id="{{ sponsorship.sponsor.slug }}" data-internal-year={{ sponsorship.year }}>
<div
Expand Down
2 changes: 1 addition & 1 deletion apps/sponsors/templatetags/sponsors.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def ideal_size(image, ideal_dimension):
ideal_dimension = int(ideal_dimension)
try:
w, h = image.width, image.height
except FileNotFoundError:
except (FileNotFoundError, ValueError):
# local dev doesn't have all images if DB is a copy from prod environment
# this is just a fallback to return ideal_dimension instead
w, h = ideal_dimension, ideal_dimension
Expand Down
Loading