Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Cleanup unneeded yaml CSS classes and files

Roland Geiderad386987babb
diff --git a/wger/core/static/css/custom-yaml.css b/wger/core/static/css/custom-yaml.css
deleted file mode 100644
index 822655a86..000000000
--- a/wger/core/static/css/custom-yaml.css
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- This file is part of Workout Manager
-
- Workout Manager is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Workout Manager is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with Workout Manager. If not, see <http:/www.gnu.org/licenses/>.
-*/
-
-
-/**************************************************************
- *
- * This file contains slight modifications to the YAML theme
- * or other YAML elements
- *
- **************************************************************/
-
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-family: "Open Sans Light", Arial, Helvetica, sans-serif;
- font-weight: 300;
-}
-
-body {
- font-family: "Open Sans Light", Arial, Helvetica, sans-serif;
- color: black; /* Open Sans Light is very thin, black looks better here */
-}
-
-table {
- color: black;
-}
-
-nav {
- font-family: "Open Sans", Arial, Helvetica, sans-serif;
-}
-
-
-
-
-/*
- * Use colour from the Tango palette for links
- */
-
-a {
- color: #3465a4;
-}
-/*
- * Use colours from the Tango palette for the info, warning and error boxes
- */
-
-.info {
- background: #eeeeec;
-}
-
-.warning {
- background: #fcaf3e
-}
-
-.success {
- background: #8ae234;
-}
-
-.error {
- background: #ef2929;
-}
-
-/*
- * Set the width of form elements to 100%
- *
- * Most forms will be edited on a JQuery dialog window and this makes it more readable
- */
-.ym-form input, .ym-form input, .ym-form textarea, .ym-form select {
- width: 100%;
-}
-
-
-
-header
-{
- background-color: transparent;
-}
-
-header h1
-{
- margin: 0px;
-}
-
-/*
- * ********************************************
- * Set some style for the site's design
- * ********************************************
- */
-
-/*
- * Set a minimum height for the page
- */
-#main-sidebar{
- min-height: 35em;
-}
-
-/*
- * Set background colours for the main elements
- */
-body{
- background-color: #204A87;
-}
-
-#main{
- background-color: #FFFFFF;
-}
-
-footer{
- border-bottom: 1px solid black;
-}
-
-/*
- * Use similar formatting for input elements in the AJAX edit
- * set forms on the workout page
- */
-.ajax-form-element {
- border: 1px solid #DDDDDD;
- font-family:Arial, Helvetica, sans-serif;
- -webkit-box-shadow: inset 0 0 4px #eee;
- -moz-box-shadow: inset 0 0 4px #eee;
- box-shadow: inset 0 0 4px #eee;
-
-}
-
-
-code{
- white-space: pre;
- color: rgb(70, 0, 0);
-}
-
-.ym-form input[type="submit"]
-{
- font-family: "Open Sans", Arial, Helvetica, sans-serif;
-}
diff --git a/wger/core/static/css/workout-manager.css b/wger/core/static/css/workout-manager.css
index 3f6e37f02..19e77b525 100644
--- a/wger/core/static/css/workout-manager.css
+++ b/wger/core/static/css/workout-manager.css
@@ -49,16 +49,6 @@ a img{
display: none;
}
-.ym-g10
-{
- width: 10%;
-}
-
-.ym-g15
-{
- width: 15%;
-}
-
.align-right
{
text-align: right;
@@ -157,32 +147,9 @@ div.muscle-background
}
-
/**************************************************************
- * Classes Error form
+ * Workout log
**************************************************************/
-
-/*
- * 'form-error' is inserted by the JQuery form validator and the styling
- * is copied from the yaml ones, for consistency
- */
-.ym-form a {
- color:black;
-}
-.ym-form .form-error {
- color: #880000;
-}
-.ym-form label.form-error {
- font-weight: bold;
-}
-
-.ym-form input.form-error {
- box-shadow: none;
- background-color: #880000;
- color: black;
-}
-
-
/*
* Workout log entry page needs the horizontal space
*/
@@ -310,17 +277,11 @@ div.info a, div.info a:hover, div.info a:active{
float: right;
margin-right: 1em;
}
-#formset .ym-fbox-text{
- /*float: none;*/
-}
+
/**************************************************************
* Carousel on the feature page
**************************************************************/
-#feature-carousel .carousel-caption {
- background-color: red;
-}
-
#feature-carousel .carousel-caption
{
background-color: rgba(0, 0, 0, 0.75);
diff --git a/wger/manager/templates/set/formset.html b/wger/manager/templates/set/formset.html
index fb79aacbe..5a0802ef5 100644
--- a/wger/manager/templates/set/formset.html
+++ b/wger/manager/templates/set/formset.html
@@ -5,7 +5,7 @@
{{ formset.management_form }}
{% for field in formset %}
- <div class="ym-fbox-text {% if field.errors %}ym-error{% endif %}" style="display:table-cell;width: 5em;padding-right:0px;">
+ <div style="display:table-cell;width: 5em;padding-right:0px;">
{% for i in field %}
{{i|form_field_add_css:'form-control'}}
{% endfor %}
diff --git a/wger/manager/templates/tags/render_day.html b/wger/manager/templates/tags/render_day.html
index 90b347bd4..92e978983 100644
--- a/wger/manager/templates/tags/render_day.html
+++ b/wger/manager/templates/tags/render_day.html
@@ -52,7 +52,7 @@ $(document).ready(function() {
<tbody>
{% for set in day.set_list %}
<tr id="set-{{ set.obj.id }}">
- <td class="ym-g10">{{ forloop.counter }}
+ <td>{{ forloop.counter }}
<span class="editoptions">
{% if day.set_list|length > 1 %}
<img src="{% static 'images/icons/move.svg' %}"
diff --git a/wger/nutrition/templates/ingredient/view.html b/wger/nutrition/templates/ingredient/view.html
index fce5a26d0..c342c7847 100644
--- a/wger/nutrition/templates/ingredient/view.html
+++ b/wger/nutrition/templates/ingredient/view.html
@@ -68,7 +68,7 @@ the search.{% endblocktrans %}
id="nutritional-values-form"
style="background-color: transparent; border-width: 0px; box-shadow: 0px 0px 0px 0px transparent;">
{% csrf_token %}
- <div id="calculator-errors" class="ym-error"></div>
+ <div id="calculator-errors"></div>
<input type="hidden" value="{{ingredient.id}}" name="ingredient">
<div class="row">
@@ -77,11 +77,11 @@ the search.{% endblocktrans %}
</div>
<div class="col-md-4">
- <div class="ym-fbox-text {% if form.amount.errors %}ym-error{% endif %}">{{form.amount|form_field_add_css:'form-control'}}</div>
+ <div>{{form.amount|form_field_add_css:'form-control'}}</div>
</div>
<div class="col-md-4">
- <div class="ym-fbox-select {% if form.unit.errors %}ym-error{% endif %}">{{form.unit|form_field_add_css:'form-control'}}</div>
+ <div>{{form.unit|form_field_add_css:'form-control'}}</div>
</div>
</div>
</form>
diff --git a/wger/nutrition/templates/meal_item/edit.html b/wger/nutrition/templates/meal_item/edit.html
index 2e182193b..e1decb275 100644
--- a/wger/nutrition/templates/meal_item/edit.html
+++ b/wger/nutrition/templates/meal_item/edit.html
@@ -38,7 +38,7 @@ $(document).ready(function() {
name="ingredient_searchfield"
value="{{ingredient_searchfield}}"
class="form-control">
- <div id="exercise_name" class="ym-fbox-text"></div>
+ <div id="exercise_name"></div>
</div>
</div>
{% render_form_field form.amount %}
diff --git a/wger/nutrition/templates/rate/form.html b/wger/nutrition/templates/rate/form.html
index 4e2d89fbe..9c1d5f274 100644
--- a/wger/nutrition/templates/rate/form.html
+++ b/wger/nutrition/templates/rate/form.html
@@ -28,23 +28,14 @@ at rest. This is the minimum energy needed for the body to function, without any
additional physical activity.{% endblocktrans %}</p>
<form action="{% url 'calories-calculate-bmr' %}"
method="post"
- class="calories-autoform"
+ class="calories-autoform form-horizontal"
id="bmr-form">
-{% csrf_token %}
-
-{% if form.non_field_errors %}
-<div class="ym-fbox-text ym-error">
- {% for error in form.non_field_errors %}
- <p class="ym-message">{% trans error %}</p>
- {% endfor %}
-</div>
-{% endif %}
+ {% csrf_token %}
+ {% render_form_errors form %}
-<table>
{% for current_field in form %}
{% render_form_field current_field %}
{% endfor %}
-</table>
</form>
<div id="bmr-result-container" style="display:hidden;">
@@ -64,35 +55,24 @@ the additional physical activity and is used to calculate the total energy
required per day.{% endblocktrans %}</p>
<form action="{% url 'calories-calculate-activities' %}"
method="post"
- class="ym-form calories-autoform"
+ class="form-horizontal calories-autoform"
id="activities-form">
-{% csrf_token %}
-
-{% if form.non_field_errors %}
-<div class="ym-fbox-text ym-error">
- {% for error in form_activities.non_field_errors %}
- <p class="ym-message">{% trans error %}</p>
- {% endfor %}
-</div>
-{% endif %}
-
-
-
+ {% csrf_token %}
+ {% render_form_errors form_activities %}
{% render_form_field form_activities.sleep_hours %}
-<div class="row">
- <div class="col-md-6">
- {% render_form_field form_activities.work_hours %}
- {% render_form_field form_activities.sport_hours %}
- {% render_form_field form_activities.freetime_hours %}
- </div>
- <div class="col-md-6">
- {% render_form_field form_activities.work_intensity %}
- {% render_form_field form_activities.sport_intensity %}
- {% render_form_field form_activities.freetime_intensity %}
+ <div class="row">
+ <div class="col-md-6">
+ {% render_form_field form_activities.work_hours %}
+ {% render_form_field form_activities.sport_hours %}
+ {% render_form_field form_activities.freetime_hours %}
+ </div>
+ <div class="col-md-6">
+ {% render_form_field form_activities.work_intensity %}
+ {% render_form_field form_activities.sport_intensity %}
+ {% render_form_field form_activities.freetime_intensity %}
+ </div>
</div>
-</div>
-
</form>
<div id="activities-result-container" style="display:hidden;">
@@ -108,20 +88,20 @@ required per day.{% endblocktrans %}</p>
needs based on your level of physical activity.{% endblocktrans %}</p>
<form action=""
method="post"
- class="ym-form calories-autoform"
+ class="form-horizontal calories-autoform"
id="base-calories-form">
-{% csrf_token %}
-<table class="table">
- <tr>
- <td>{% trans "Basic caloric intake" %}</td>
- <td><span id="id_base_calories"></span></td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="submit" class="btn btn-default btn-block" value="{% trans 'Calculate basic caloric intake' %}" id="form-calculate-daily-calories">
- </td>
- </tr>
-</table>
+ {% csrf_token %}
+ <table class="table">
+ <tr>
+ <td>{% trans "Basic caloric intake" %}</td>
+ <td><span id="id_base_calories"></span></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <input type="submit" class="btn btn-default btn-block" value="{% trans 'Calculate basic caloric intake' %}" id="form-calculate-daily-calories">
+ </td>
+ </tr>
+ </table>
</form>
@@ -131,24 +111,24 @@ you might just enter yourself the amount of calories if you know the value.{% en
</p>
<form action="{% url 'calories-calculate-total' %}"
method="post"
- class=""
+ class="form-horizontal"
id="total-calories-form">
<div class="row">
{% csrf_token %}
{% render_form_field form_calories.additional_calories %}
{% render_form_field form_calories.calories %}
- <div class="col-md-12">
+ <p>
<input type="submit" class="btn btn-default btn-block" value="{% trans 'Transfer basic intake to total daily calories' %}" id="form-transfer-calories">
- </div>
+ </p>
- <div class="col-md-12">
+ <p>
<input type="submit" class="btn btn-default btn-block" value="{% trans 'Add additional calories to total daily calories' %}" id="add-calories-total">
- </div>
+ </p>
- <div class="col-md-12">
+ <p>
<input type="submit" class="btn btn-default btn-block" value="{% trans 'Save total calories to profile' %}" id="form-update-calories">
- </div>
+ </p>
</div>
</form>