Skip to content

Commit ea483a4

Browse files
committed
tweaks for sponsor logo placements
1 parent 05640b3 commit ea483a4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

sponsors/templatetags/sponsors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def full_sponsorship(sponsorship, display_fee=False):
2323
def list_sponsors(logo_place, publisher=PublisherChoices.FOUNDATION.value):
2424
sponsorships = Sponsorship.objects.enabled().with_logo_placement(
2525
logo_place=logo_place, publisher=publisher
26-
).select_related('sponsor')
26+
).order_by('package').select_related('sponsor')
2727
packages = SponsorshipPackage.objects.all()
2828

2929
context = {

templates/sponsors/partials/sponsors-list.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44
<h2 class="widget-title">Sponsors</h2>
55
<p>Visionary sponsors help to host Python downloads.</p>
66
{% for sponsorship in sponsorships %}
7-
{% thumbnail sponsorship.sponsor.web_logo "x100" format="PNG" quality=100 as im %}
8-
<img src="{{ im.url }}" alt="{{ sponsorship.sponsor.name }} logo" height="100px">
7+
{% thumbnail sponsorship.sponsor.web_logo "x200" format="PNG" quality=100 as im %}
8+
<img src="{{ im.url }}" alt="{{ sponsorship.sponsor.name }} logo" style="max-height:200px;max-width:200px;height:auto;width:auto;">
99
{% endthumbnail %}
1010
{% endfor %}
1111

1212
{% elif logo_place == "jobs" %}
1313
<h3 class="widget-title">Job Board Sponsors</h3>
14+
<div style="display: grid; grid-gap: 1em; grid-template-columns: repeat(auto-fit, minmax(100px, 0fr)); grid-template-rows: repeat(1, minmax(50px, 0fr)); align-items: center; justify-content: center; margin-top: 1em;">
1415
{% for sponsorship in sponsorships %}
1516
{% thumbnail sponsorship.sponsor.web_logo "x100" format="PNG" quality=100 as im %}
16-
<img src="{{ im.url }}" alt="{{ sponsorship.sponsor.name }} logo" height="100px">
17+
<div>
18+
<img src="{{ im.url }}" alt="{{ sponsorship.sponsor.name }} logo" style="max-height:100px;max-width:100px;height:auto;width:auto;">
19+
</div>
1720
{% endthumbnail %}
1821
{% endfor %}
22+
</div>
1923

2024
{% elif logo_place == "sponsors" %}
2125

0 commit comments

Comments
 (0)