aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/templates/wiki
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2019-04-17 15:13:46 +0100
committerGravatar Gareth Coles <[email protected]>2019-04-17 15:13:46 +0100
commitca8dd3a4e1bfd05fe65db88a0c5fc153103eea7c (patch)
tree530c50f711a3187832459e766838291d6006e81d /pydis_site/templates/wiki
parentImage sidebar is finally complete (diff)
Correct image rendering in wiki articles
Diffstat (limited to 'pydis_site/templates/wiki')
-rw-r--r--pydis_site/templates/wiki/plugins/images/render.html29
1 files changed, 16 insertions, 13 deletions
diff --git a/pydis_site/templates/wiki/plugins/images/render.html b/pydis_site/templates/wiki/plugins/images/render.html
index d4470d98..ced3f917 100644
--- a/pydis_site/templates/wiki/plugins/images/render.html
+++ b/pydis_site/templates/wiki/plugins/images/render.html
@@ -3,20 +3,23 @@
NB! Watch out for line breaks, markdown might add <br />s and <p>s.
{% endcomment %}{% with image.current_revision.imagerevision as revision %}{% spaceless %}
-<figure class="thumbnail{% if align %} pull-{{ align }}{% endif %}" {% if width %} style="width: {{ width }}px;" {% endif %}>
+<figure
+ class="image{% if align %} is-pulled-{{ align }}{% endif %}" {% if width %}
+ style="width: {{ width }}px;" {% endif %}
+>
<a href="{{ revision.image.url }}">
-{% if size %}
- {% thumbnail revision.image size upscale=False as thumb %}
- <img src="{{ thumb.url }}" alt="{{ revision.get_filename }}" />
- {% empty %}
- <div class="caption">
- <em>{% trans "Image not found" %}</em>
- </div>
- {% endthumbnail %}
-{% else %}
- <img src="{{ revision.image.url }}" alt="{{ revision.get_filename }}" />
-{% endif %}
+ {% if size %}
+ {% thumbnail revision.image size upscale=False as thumb %}
+ <img src="{{ thumb.url }}" alt="{{ revision.get_filename }}" />
+ {% empty %}
+ <figcaption>
+ <em>"Image not found"</em>
+ </figcaption>
+ {% endthumbnail %}
+ {% else %}
+ <img src="{{ revision.image.url }}" alt="{{ revision.get_filename }}" />
+ {% endif %}
</a>
- <figcaption class="caption">{{ caption|safe }}</figcaption>
+ <figcaption>{{ caption|safe }}</figcaption>
</figure>
{% endspaceless %}{% endwith %}