Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Yet another fix for exercise images in workouts

Roland Geidera496f20b7a61
diff --git a/wger/manager/templates/mobile/tags/render_day.html b/wger/manager/templates/mobile/tags/render_day.html
index 57dd18898..267a36d2a 100644
--- a/wger/manager/templates/mobile/tags/render_day.html
+++ b/wger/manager/templates/mobile/tags/render_day.html
@@ -145,17 +145,19 @@
<div class="media">
<div class="media-left">
+ <div style="width: 64px; height: 64px;">
{% if exercise.obj.main_image %}
<img class="img-responsive"
src="{{ exercise.obj.main_image.image|thumbnail_url:'small' }}"
alt="{{exercise.obj}}"
- style="width:64px; max-height:64px;">
+ style="max-width: 100%; max-height: 100%;">
{% else %}
<img class="img-responsive"
src="{% static 'images/icons/image-placeholder.svg' %}"
alt="{% trans 'Placeholder image for exercise' %}"
- style="opacity: 0.4; width:60px; max-height:60px;">
+ style="opacity: 0.4;">
{% endif %}
+ </div>
</div>
<div class="media-body" style="position: relative; top: 10px; left: 100px;">
diff --git a/wger/manager/templates/tags/render_day.html b/wger/manager/templates/tags/render_day.html
index 04605a751..ce0fd9048 100644
--- a/wger/manager/templates/tags/render_day.html
+++ b/wger/manager/templates/tags/render_day.html
@@ -91,17 +91,19 @@ $(document).ready(function() {
<div class="media-left">
<a href="{{exercise.obj.get_absolute_url}}" >
+ <div style="width: 64px; height: 64px;">
{% if exercise.obj.main_image %}
<img class="img-responsive"
src="{{ exercise.obj.main_image.image|thumbnail_url:'small' }}"
alt="{{exercise.obj}}"
- style="width:64px; max-height:64px;">
+ style="max-width: 100%; max-height: 100%;">
{% else %}
<img class="img-responsive"
src="{% static 'images/icons/image-placeholder.svg' %}"
alt="{% trans 'Placeholder image for exercise' %}"
- style="opacity: 0.4; width:60px; max-height:60px;">
+ style="opacity: 0.4;">
{% endif %}
+ </div>
</a>
</div>