Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/more sponsor template customisation #705

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
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 %}
Loading