Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Improve the presentation of exercise images

Roland Geider67dbe72fc562
diff --git a/wger/exercises/templates/mobile/overview.html b/wger/exercises/templates/mobile/overview.html
index aed7f8ff1..ab75a32b2 100644
--- a/wger/exercises/templates/mobile/overview.html
+++ b/wger/exercises/templates/mobile/overview.html
@@ -25,7 +25,7 @@
<li>
<a href="{{ exercise.get_absolute_url }}" data-ajax="false">
{% if exercise.main_image.image %}
- <img src="{{ exercise.main_image.image|thumbnail_url:'thumbnail_cropped' }}">
+ <img src="{{ exercise.main_image.image|thumbnail_url:'small' }}">
{% endif %}
{{ exercise.name }}</a>
</li>
@@ -56,7 +56,7 @@
<li>
<a href="{{ exercise.get_absolute_url }}" data-ajax="false">
{% if exercise.main_image.image %}
- <img src="{{ exercise.main_image.image|thumbnail_url:'thumbnail_cropped' }}">
+ <img src="{{ exercise.main_image.image|thumbnail_url:'small' }}">
{% endif %}
{{ exercise.name }}</a>
</li>
diff --git a/wger/exercises/templates/mobile/view.html b/wger/exercises/templates/mobile/view.html
index 2eac2db54..49c85af5f 100644
--- a/wger/exercises/templates/mobile/view.html
+++ b/wger/exercises/templates/mobile/view.html
@@ -172,7 +172,7 @@ included in the database.{% endblocktrans %}
<a href="#image-popup-{{image.pk}}"
data-rel="popup"
data-position-to="window">
- <img src="{{ image.image|thumbnail_url:'medium_cropped' }}"
+ <img src="{{ image.image|thumbnail_url:'medium' }}"
alt=""
class="gallery-image">
</a>
diff --git a/wger/exercises/templates/overview.html b/wger/exercises/templates/overview.html
index 126b24cc0..f6c1be134 100644
--- a/wger/exercises/templates/overview.html
+++ b/wger/exercises/templates/overview.html
@@ -75,14 +75,15 @@ $(document).ready(function() {
{% for exercise in category|get_active_exercises:active_languages %}
<tr>
<td style="padding-left:0px;">
- <a href="{{ exercise.get_absolute_url }}">
{% if exercise.main_image %}
- <img src="{{ exercise.main_image.image|thumbnail_url:'thumbnail_cropped' }}"
+ <div style="width:60px;height:60px;text-align:center;float:left;">
+ <img src="{{ exercise.main_image.image|thumbnail_url:'thumbnail' }}"
alt=""
- width="50"
- height="50"
- style="vertical-align:middle;">
+ style="vertical-align:middle;max-width:100%; max-height:100%;">
+ </div>
{% endif %}
+
+ <a href="{{ exercise.get_absolute_url }}">
{{ exercise.name }}</a>
</td>
</tr>
diff --git a/wger/exercises/templates/view.html b/wger/exercises/templates/view.html
index 3a3cf17e1..555aaad8d 100644
--- a/wger/exercises/templates/view.html
+++ b/wger/exercises/templates/view.html
@@ -150,7 +150,7 @@ included in the database.{% endblocktrans %}
<div class="image-gallery" style="width:450px;margin-left:auto;margin-right:auto;">
<div class="image-box" style="width:400px;padding-bottom:340px;">
<div class="boxInner">
- <img src="{{ main_image.image|thumbnail_url:'medium_cropped' }}"
+ <img src="{{ main_image.image|thumbnail_url:'medium' }}"
alt=""
class="gallery-image">
@@ -181,7 +181,7 @@ included in the database.{% endblocktrans %}
{% for image in other_images %}
<div class="image-box">
<div class="boxInner">
- <img src="{{ image.image|thumbnail_url:'small_cropped' }}"
+ <img src="{{ image.image|thumbnail_url:'small' }}"
alt=""
class="gallery-image">
diff --git a/wger/manager/static/css/workout-manager-common.css b/wger/manager/static/css/workout-manager-common.css
index 921a925bd..f4253cedc 100644
--- a/wger/manager/static/css/workout-manager-common.css
+++ b/wger/manager/static/css/workout-manager-common.css
@@ -233,9 +233,11 @@ circle.color-17becf:hover
top: 10px;
bottom: 10px;
overflow: hidden;
+ text-align: center;
}
.boxInner img.gallery-image {
- width: 100%;
+ max-height:100%;
+ max-width:100%;
}
.boxInner .titleBox {
position: absolute;
@@ -296,4 +298,4 @@ body .boxInner:hover .titleBox, body.touch .boxInner.touchFocus .titleBox {
width: 33.3%;
padding-bottom: 33.3%;
}
-}
\ No newline at end of file
+}