SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 4eabca45 authored by George Katsikas's avatar George Katsikas :goat:
Browse files

change hx_sponsors to use organization.logo

parent ea1b3112
No related branches found
No related tags found
No related merge requests found
......@@ -3,17 +3,15 @@
<div id="sponsor-logos"
class="d-flex sp-swap"
style="max-height: 250px;"
hx-get="{% url 'scipost:_hx_sponsors' %}?dt={{ request.GET.dt|increment_dt }}"
hx-push-url="false"
hx-trigger="every {{ request.GET.dt|increment_dt }}s"
hx-swap="outerHTML swap:1s">
{% for source in sponsor.logos.all %}
<picture class="mx-auto d-flex flex-column">
<source type="{{ source.mimetype }}"
srcset="{{ source.image.url }} {{ source.width }}" />
<img class="rounded"
{% if sponsor.logo %}
<picture class="mx-auto d-flex flex-column w-100">
<img class="p-2 {{ sponsor.css_class }}"
style="max-height: 100%;
max-width: 100%;
object-fit: contain"
......@@ -24,10 +22,10 @@
<a href="{{ sponsor.get_absolute_url }}" target="_blank">{{ sponsor.name }}</a>
</caption>
</picture>
{% empty %}
{% else %}
<h2 class="mt-2">
<a href="{{ sponsor.get_absolute_url }}" target="_blank">{{ sponsor.name }}</a>
</h2>
{% endfor %}
{% endif %}
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment