Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Actually start making the templates mobile friendly

Roland Geider8eef6990347f
diff --git a/wger/core/templates/base.html b/wger/core/templates/base.html
index d63f3f89f..f5be77b72 100644
--- a/wger/core/templates/base.html
+++ b/wger/core/templates/base.html
@@ -21,12 +21,12 @@ browsing the site as the user "{{current_user}}", all actions are performed on h
<div class="row">
- <div class="col-sm-8">
+ <div class="col-8">
<h2 id="page-title" class="page-header">
{% block title %}{% endblock %}
</h2>
</div>
- <div class="col-sm-4" style="padding-top: 15px; padding-bottom: 15px;">
+ <div class="col-md-4 pt-4">
<div class="btn-group">
{% block options %}
@@ -48,7 +48,7 @@ browsing the site as the user "{{current_user}}", all actions are performed on h
<div class="row">
- <div class="col-sm-8" id="main-content">
+ <div class="col-md-8" id="main-content">
{% if messages and not no_messages %}
{% for message in messages %}
<div class="alert {% if message.tags == 'warning'%}alert-error{% elif message.tags == 'info' %}alert-info{% elif message.tags == 'success' %}alert-success{% endif %}">
@@ -64,7 +64,7 @@ browsing the site as the user "{{current_user}}", all actions are performed on h
{% block content %}{% endblock %}
</div>
</div>
- <div class="col-sm-4" id="main-sidebar">
+ <div class="col-md-4" id="main-sidebar">
{% block sidebar %}
{% endblock %}
</div>
diff --git a/wger/core/templates/index.html b/wger/core/templates/index.html
index 774a41f85..30a63fb12 100644
--- a/wger/core/templates/index.html
+++ b/wger/core/templates/index.html
@@ -38,7 +38,7 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str
{% endif %}
<div class="row">
- <div class="col-sm-4">
+ <div class="col-md">
<h4>{% trans "Workout"%}</h4>
{% if current_workout %}
<p>
@@ -70,7 +70,7 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str
{% endfor %}
</table>
</div>
- <div class="col-sm-4">
+ <div class="col-md">
<h4>{% trans "Nutrition plan"%}</h4>
{% if plan %}
@@ -108,7 +108,7 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str
</tr>
</table>
</div>
- <div class="col-sm-4">
+ <div class="col-md">
<h4>{% trans "Weight"%}</h4>
<p>
<a href="{% url 'weight:overview' user.username %}">{% trans "Overview" %}</a>
@@ -147,7 +147,7 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str
<div class="row">
- <div class="col-sm-4">
+ <div class="col-md">
{% if schedule %}
<p>
→ {% trans "This workout is part of a schedule:" %}
@@ -157,17 +157,17 @@ day in your current workout:{% endblocktrans %} <strong>{{current_workout}}</str
<p><em>{% blocktrans %}The current workout is selected from your active schedule
or, if you don't have one, simply by date.{% endblocktrans %}</em></p>
</div>
- <div class="col-sm-4">
+ <div class="col-md">
<div id="nutrition_diary_chart"></div>
</div>
- <div class="col-sm-4">
+ <div class="col-md">
<div id="current-username" data-current-username="{{ owner_user.username }}"></div>
<div id="weight_diagram"></div>
</div>
</div>
<div class="row">
- <div class="col-sm-4">
+ <div class="col-md">
{% if current_workout %}
{% if current_workout.day_set.all %}
<a href="#" id="logging-popup-link" data-toggle="modal" data-target="#calendar-day-select-popup" class="btn btn-success btn-sm">
@@ -180,11 +180,11 @@ or, if you don't have one, simply by date.{% endblocktrans %}</em></p>
</a>
{% endif %}
</div>
- <div class="col-sm-4">
+ <div class="col-md">
{% if not plan %}
- <a href="{% url 'nutrition:plan:add' %}" class="btn btn-sm btn-success">
- {% trans "No nutrition plans." %} {% trans "Add one now." %}
- </a>
+ <a href="{% url 'nutrition:plan:add' %}" class="btn btn-sm btn-success">
+ {% trans "No nutrition plans." %} {% trans "Add one now." %}
+ </a>
{% endif %}
<p>
<!--
@@ -194,20 +194,10 @@ or, if you don't have one, simply by date.{% endblocktrans %}</em></p>
-->
</p>
</div>
- <div class="col-sm-4">
+ <div class="col-md">
<a href="{% url 'weight:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
{% trans "Add weight entry" %}
</a>
</div>
</div>
{% endblock %}
-
-
-
-{% block sidebar %}
-<h4>{% trans "Info" %}</h4>
-<p>{% blocktrans %}The current workout is selected from your active schedule
-or, if you don't have one, simply by date.{% endblocktrans %}</p>
-
-<p>{% trans "After adding a workout or a nutritional plan, you can edit them to set a goal." %}</p>
-{% endblock %}
diff --git a/wger/core/templates/navigation.html b/wger/core/templates/navigation.html
index 9852fe68e..03442ce38 100644
--- a/wger/core/templates/navigation.html
+++ b/wger/core/templates/navigation.html
@@ -1,7 +1,7 @@
{% load i18n cache wger_extras %}
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
- <span class="navbar-brand" href="#">wger</span>
+ <a class="navbar-brand" href="{% url 'core:index' %}">wger</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar-navigation" aria-controls="main-navbar-navigation" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
diff --git a/wger/core/templates/template.html b/wger/core/templates/template.html
index 3a755fa31..c5cc26068 100644
--- a/wger/core/templates/template.html
+++ b/wger/core/templates/template.html
@@ -100,8 +100,6 @@
<div class="container">
<div class="row">
<div class="col-md-3">
- <a href="{% url 'core:contact' %}">{% trans "Get in touch" %}</a>
- |
{# #}
{# Render the links to the other languages #}
@@ -146,7 +144,7 @@
{# Main content #}
{# #}
<div id="main">
- <div class="container" style="padding-bottom: 1em;">
+ <div class="container pb-4">
<div class="modal fade" id="wger-ajax-info" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.html
index dc30dce93..fd68e3e3f 100644
--- a/wger/exercises/templates/exercise/view.html
+++ b/wger/exercises/templates/exercise/view.html
@@ -71,7 +71,7 @@ $(document).ready(function() {
<div class="row mt-4">
- <div class="col-3">
+ <div class="col-md-3">
<strong>{% trans "Category" %}:</strong>
</div>
<div class="col-9">
@@ -81,7 +81,7 @@ $(document).ready(function() {
{% if exercise.equipment.all %}
<div class="row mt-4">
- <div class="col-3">
+ <div class="col-md-3">
<strong>{% trans "Equipment" %}:</strong>
</div>
<div class="col-9">
@@ -95,10 +95,10 @@ $(document).ready(function() {
<div class="row mt-4">
- <div class="col-3">
+ <div class="col-md-3">
<strong>{% trans "Description" %}:</strong>
</div>
- <div class="col-9">
+ <div class="col-md-9">
{{ exercise.description|safe }}
</div>
</div>
@@ -109,17 +109,10 @@ $(document).ready(function() {
{% with images=exercise.exerciseimage_set.accepted %}
{% if images or perms.exercises.change_exerciseimage %}
<div class="row mt-4">
- <div class="col-3">
- {% if perms.exercises.change_exerciseimage %}
- <p>
- <a href="{% url 'exercise:image:add' exercise.id %}" class="btn btn-success btn-sm">
- {% trans "Add new image" %}
- </a>
- </p>
- {% endif %}
-{# <strong>{% trans "Images" %}:</strong>#}
+ <div class="col-md-3">
+ <strong>{% trans "Images" %}:</strong>
</div>
- <div class="col-9">
+ <div class="col-md-9">
<div class="card-deck">
{% with other_images=images %}
{% for image in other_images %}
@@ -156,6 +149,14 @@ $(document).ready(function() {
{% endfor %}
{% endwith %}
</div>
+
+ {% if perms.exercises.change_exerciseimage %}
+ <p>
+ <a href="{% url 'exercise:image:add' exercise.id %}" class="btn btn-success btn-sm">
+ {% trans "Add new image" %}
+ </a>
+ </p>
+ {% endif %}
</div>
</div>
{% endif %}
@@ -187,10 +188,10 @@ $(document).ready(function() {
{% with comments=exercise.exercisecomment_set.all %}
{% if comments or perms.exercises.change_exercisecomment %}
<div class="row mt-4">
- <div class="col-3">
+ <div class="col-md-3">
<strong>{% trans "Comments for this exercise" %}:</strong>
</div>
- <div class="col-9">
+ <div class="col-md-9">
<ul>
{% for comment in comments %}
<li>
@@ -209,18 +210,19 @@ $(document).ready(function() {
</li>
{% endfor %}
</ul>
+ {% if perms.exercises.change_exercisecomment %}
+ <p>
+ <a href="{% url 'exercise:comment:add' exercise.id %}" class="btn btn-success btn-sm wger-modal-dialog">
+ {% trans "Add new comment" %}
+ </a>
+ </p>
+ {% endif %}
</div>
</div>
{% endif %}
{% endwith %}
-{% if perms.exercises.change_exercisecomment %}
-<p>
- <a href="{% url 'exercise:comment:add' exercise.id %}" class="btn btn-success btn-sm wger-modal-dialog">
- {% trans "Add new comment" %}
- </a>
-</p>
-{% endif %}
+
@@ -230,25 +232,26 @@ $(document).ready(function() {
{% if muscles %}
<div class="row mt-4">
- <div class="col-3">
+ <div class="col-md-3">
<strong>{% trans "Muscles" %}:</strong>
</div>
- <div class="col-9">
+ <div class="col-md-9">
<p>
{% trans "The diagram shows the most used muscles on this exercise" %}
</p>
- <div>
- <div style="width:1em;height:1em;background-color:#cc0000;float:left;margin-right:0.5em;"></div>
- {% trans "Main muscles" %}
- </div>
-
- <div>
- <div style="width:1em;height:1em;background-color:#f57900;float:left;margin-right:0.5em;"></div>
- {% trans "Secondary muscles" %}
- </div>
<div class="row">
- <div class="col">
- <div id="muscle-front" class="muscle-background center-block" style="background-image: {% for background in muscle_backgrounds_front %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
+ <div class="col-md">
+ <div style="width:1em;height:1em;background-color:#cc0000;float:left;margin-right:0.5em;"></div>
+ {% trans "Main muscles" %}
+ </div>
+ <div class="col-md">
+ <div style="width:1em;height:1em;background-color:#f57900;float:left;margin-right:0.5em;"></div>
+ {% trans "Secondary muscles" %}
+ </div>
+ </div>
+ <div class="row ">
+ <div class="col-md ">
+ <div id="muscle-front" class="muscle-background mx-auto" style="background-image: {% for background in muscle_backgrounds_front %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
</div>
<ul>
{% for muscle in muscles %}
@@ -264,8 +267,8 @@ $(document).ready(function() {
{% endfor %}
</ul>
</div>
- <div class="col">
- <div id="muscle-back" class="muscle-background center-block" style="background-image: {% for background in muscle_backgrounds_back %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
+ <div class="col-md">
+ <div id="muscle-back" class="muscle-background mx-auto" style="background-image: {% for background in muscle_backgrounds_back %}url({% static background %}){% if not forloop.last %},{% endif %}{% endfor %};">
</div>
<ul>
{% for muscle in muscles %}