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

Various #37

Merged
merged 13 commits into from
Mar 22, 2015
Prev Previous commit
Next Next commit
resized and repositioned the party logo on leaflet pages
  • Loading branch information
richardjpope committed Mar 22, 2015
commit c84b959b6856161ccf4b966a0f857579cf7dff02
76 changes: 42 additions & 34 deletions electionleaflets/templates/leaflets/leaflet.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,21 @@ <h1>
Leaflet #{{object.id}}
{% endif %}
</h1>
<section class="leaflet_information">
<div id="leaflet_description">
{% if object.description %}
{{ object.description|markdown }}
{% endif %}
</div>


{% if object.imprint %}
<div id="leaflet_imprint">
<h4>Promoter and Publisher details</h4>
<p>{{ object.imprint }}</p>
</div>
{% endif %}

{% if object.tags.all %}
<h4>Tags</h4>
<ul>
{% for t in object.tags.all %}
{% if t.slug %}
<li><a href="{% url "tag" t.slug %}">{{t.tag}}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</section>

{% if object.publisher_party %}
<section class="party">
{% if object.publisher_party and object.publisher_party.slug %}
<p>
Published by
<a href="{% url "party-view" object.publisher_party.slug%}">
<img src="http://openelectoralcommission.org.uk/party_images/{{ object.publisher_party.emblems.all.0.emblem_url }}" width="40px">
{{object.publisher_party.party_name}}
</a>
</p>
{% endif %}
</section>
{% endif %}

<section class="leaflet_images" aria-describedby=leaflet_description>
{% for image in object.images.all %}
<figure>
Expand All @@ -107,6 +95,34 @@ <h4>Tags</h4>
{% endfor%}
</section>

<section class="leaflet_information">
<div id="leaflet_description">
{% if object.description %}
{{ object.description|markdown }}
{% endif %}
</div>


{% if object.imprint %}
<div id="leaflet_imprint">
<h4>Promoter and Publisher details</h4>
<p>{{ object.imprint }}</p>
</div>
{% endif %}

{% if object.tags.all %}
<h4>Tags</h4>
<ul>
{% for t in object.tags.all %}
{% if t.slug %}
<li><a href="{% url "tag" t.slug %}">{{t.tag}}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</section>


<section class="leaflet_map">
<p>This leaflet was spotted by a volunteer
{% if object.constituency %}
Expand All @@ -133,14 +149,6 @@ <h3>Something interesting, dodgy or funny? Shout about it!</h3>

</section>

{% if object.publisher_party %}
<section class="party">
<img src="http://openelectoralcommission.org.uk/party_images/{{ object.publisher_party.emblems.all.0.emblem_url }}">
{% if object.publisher_party and object.publisher_party.slug %}
<p>Published by <a href="{% url "party-view" object.publisher_party.slug%}">{{object.publisher_party.party_name}}</a></p>
{% endif %}
</section>
{% endif %}
<section id="ReportAbuse">
<h3>Something wrong with this page?</h3>
<p>
Expand Down