Skip to content

Commit

Permalink
Merge pull request #705 from drnlm/feature/more_sponsor_template_cust…
Browse files Browse the repository at this point in the history
…omisation

Feature/more sponsor template customisation
  • Loading branch information
drnlm authored Mar 7, 2024
2 parents 780d7bc + e4451f8 commit 9d3f5cf
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 60 deletions.
60 changes: 34 additions & 26 deletions wafer/sponsors/templates/wafer.sponsors/packages.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,39 @@
{% load i18n %}
{% block content %}
<section class="wafer wafer-sponsorship-packages">
{% block page_title %}
<h1>{% trans 'Sponsorship Packages' %}</h1>
<div class="wafer list">
{% for package in sponsorshippackage_list %}
<section class="wafer wafer-sponsorship-package
wafer-sponsor-{{ package.name.lower }}">
<div class="card">
<div class="card-body">
<h2 class="card-title">
{% if package.symbol %}
{{ package.symbol }}
{% endif %}
{{ package.name }} ({{ package.currency }} {{ package.price|floatformat:0 }})
</h2>
{% if package.number_available %}
<p>{% trans 'Total number available:' %} {{ package.number_available }}</p>
{% endif %}
<p>{% trans 'Packages claimed:' %} {{ package.number_claimed }}</p>
<p>{{ package.short_description }}</p>
{{ package.description }}
</div>
</div>
</section>
{% empty %}
<p>{% trans 'No sponsorship packages available yet.' %}</p>
{% endfor %}
</div>
{% endblock %}
{% block pre_package_list %}{% endblock %}
{% block package_list %}
<div class="wafer list">
{% for package in sponsorshippackage_list %}
{% block package_display %}
<section class="wafer wafer-sponsorship-package
wafer-sponsor-{{ package.name.lower }}">
<div class="card">
<div class="card-body">
<h2 class="card-title">
{% if package.symbol %}
{{ package.symbol }}
{% endif %}
{{ package.name }} ({{ package.currency }} {{ package.price|floatformat:0 }})
</h2>
{% if package.number_available %}
<p>{% trans 'Total number available:' %} {{ package.number_available }}</p>
{% endif %}
<p>{% trans 'Packages claimed:' %} {{ package.number_claimed }}</p>
<p>{{ package.short_description }}</p>
{{ package.description }}
</div>
</div>
</section>
{% endblock package_display %}
{% empty %}
<p>{% trans 'No sponsorship packages available yet.' %}</p>
{% endfor %}
</div>
{% endblock package_list %}
{% block post_package_list %}{% endblock %}
</section>
{% endblock %}
{% endblock content %}
76 changes: 42 additions & 34 deletions wafer/sponsors/templates/wafer.sponsors/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,48 @@
{% block title %}{% trans "Sponsors" %} - {{ WAFER_CONFERENCE_NAME }}{% endblock %}
{% block content %}
<section class="wafer wafer-sponsors">
{% block page_title %}
<h1>{% trans 'Sponsors' %}</h1>
<div class="wafer list">
{% for sponsor in sponsor_list %}
<section class="wafer wafer-sponsor
wafer-sponsor-{{ sponsor.packages.first.name.lower }}">
<div class="card">
<div class="card-body">
<h2 class="card-title">
{% if sponsor.symbol %}
{{ sponsor.symbol }}
{% endif %}
{% if sponsor.url %}
<a href="{{ sponsor.url }}">{{ sponsor.name }}</a>
{% else %}
{{ sponsor.name }}
{% endif %}
<small class="text-right">{{ sponsor.packages.first.name }}</small>
</h2>
{% sponsor_tagged_image sponsor "main_logo" as logo_url %}
{% if logo_url != '' %}
<div style="float: right; margin-left:5px;">
<a href="{{ sponsor.url }}">
<img style="background: white; max-width:400px; max-height:200px;" src="{{ logo_url }}">
</a>
{% endblock %}
{% block pre_sponsor_list %}{% endblock %}
{% block sponsor_list %}
<div class="wafer list">
{% for sponsor in sponsor_list %}
{% block sponsor_details %}
<section class="wafer wafer-sponsor
wafer-sponsor-{{ sponsor.packages.first.name.lower }}">
<div class="card">
<div class="card-body">
<h2 class="card-title">
{% if sponsor.symbol %}
{{ sponsor.symbol }}
{% endif %}
{% if sponsor.url %}
<a href="{{ sponsor.url }}">{{ sponsor.name }}</a>
{% else %}
{{ sponsor.name }}
{% endif %}
<small class="text-right">{{ sponsor.packages.first.name }}</small>
</h2>
{% sponsor_tagged_image sponsor "main_logo" as logo_url %}
{% if logo_url != '' %}
<div style="float: right; margin-left:5px;">
<a href="{{ sponsor.url }}">
<img style="background: white; max-width:400px; max-height:200px;" src="{{ logo_url }}">
</a>
</div>
{% endif %}
{{ sponsor.description }}
</div>
{% endif %}
{{ sponsor.description }}
</div>
</div>
<hr>
</section>
{% empty %}
<p>{% trans 'No sponsors yet.' %}</p>
{% endfor %}
</div>
</div>
<hr>
</section>
{% endblock sponsor_details %}
{% empty %}
<p>{% trans 'No sponsors yet.' %}</p>
{% endfor %}
</div>
{% endblock sponsor_list %}
{% block post_sponsor_list %}{% endblock %}
</section>
{% endblock %}
{% endblock content %}

0 comments on commit 9d3f5cf

Please sign in to comment.