Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Make the muscle list on the overview prettier

Roland Geider567bc5faaef5
diff --git a/exercises/templates/muscle_overview.html b/exercises/templates/muscle_overview.html
index 797a1f568..e43aee200 100644
--- a/exercises/templates/muscle_overview.html
+++ b/exercises/templates/muscle_overview.html
@@ -18,13 +18,13 @@ $(document).ready(function() {
var muscle_id = div_id.match(/\d+/);
// Reset all other highlighted muscles
- $('.muscle').css('background-color', 'transparent');
- $('.muscle').css('font-weight', 'normal');
-
+ $('.muscle').removeClass('muscle-active');
+ $('.muscle').addClass('muscle-inactive');
+
// Hightligh the current one
- $(this).css('font-weight', 'bold');
- $(this).css('background-color', '#eeeeec');
-
+ $(this).removeClass('muscle-inactive');
+ $(this).addClass('muscle-active');
+
// Set the corresponding background
$('#muscle-system').css('background-image',
@@ -72,7 +72,6 @@ $(document).ready(function() {
<ul class="muscle-list">
{% for muscle in group.list %}
<li class="muscle"
- style="line-height:2em;"
data-target="muscle-{{muscle.id}}"
data-is-front="{{muscle.is_front}}">{{muscle.name}}</li>
{% endfor %}
diff --git a/manager/static/css/workout-manager.css b/manager/static/css/workout-manager.css
index 28caad014..c443f32eb 100644
--- a/manager/static/css/workout-manager.css
+++ b/manager/static/css/workout-manager.css
@@ -435,3 +435,34 @@ ul.pagination a:hover
border: 1px solid #2e3436;
box-shadow: 0 0 4px #3465a4 inset;
}
+
+
+/**************************************************************
+ * Muscle overview
+ **************************************************************/
+.muscle-list{
+ list-style-type: none;
+ margin-left: 0px;
+}
+
+.muscle{
+ line-height:2em;
+ margin-left: 0px;
+ padding-left: 0.3em;
+}
+
+.muscle-inactive{
+ background-color: transparent;
+ font-weight: normal;
+ border: 1px solid transparent;
+ box-shadow: none;
+ border-radius: 0px;
+}
+
+.muscle-active{
+ font-weight: bold;
+ background-color: #eeeeec;
+ border: 1px solid #babdb6;
+ box-shadow: inset 0 0 4px #d3d7cf;
+ border-radius: 3px;
+}