Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Small improvements to template

Roland Geiderc2e511aaba40
diff --git a/manager/static/images/icons/star.svg b/manager/static/images/icons/star.svg
new file mode 100644
index 000000000..6c24d5845
--- /dev/null
+++ b/manager/static/images/icons/star.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) --><svg height="48px" id="svg7189" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.46" sodipodi:docname="emblem-special.svg" sodipodi:version="0.32" width="48px" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <metadata>
+ <rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <cc:Work rdf:about="">
+ <dc:title></dc:title>
+ <dc:description></dc:description>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>unsorted</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ <dc:publisher>
+ <cc:Agent rdf:about="http://www.openclipart.org/">
+ <dc:title>Open Clip Art Library, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors, Source: GNOME-Colors</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title></dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title></dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:date></dc:date>
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/"/>
+ <dc:language>en</dc:language>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs id="defs7191">
+ <linearGradient id="linearGradient7950" inkscape:collect="always">
+ <stop id="stop7952" offset="0" style="stop-color:#ffffff;stop-opacity:1;"/>
+ <stop id="stop7954" offset="1" style="stop-color:#ffffff;stop-opacity:0;"/>
+ </linearGradient>
+ <linearGradient gradientUnits="userSpaceOnUse" id="linearGradient7956" inkscape:collect="always" x1="11" x2="11" xlink:href="#linearGradient7950" y1="-7.0623527" y2="20.587196"/>
+ <linearGradient id="linearGradient7948" inkscape:collect="always">
+ <stop id="stop7950" offset="0" style="stop-color:#c4a000;stop-opacity:1;"/>
+ <stop id="stop7953" offset="1" style="stop-color:#ce5c00;stop-opacity:1"/>
+ </linearGradient>
+ <linearGradient gradientUnits="userSpaceOnUse" id="linearGradient7955" inkscape:collect="always" x1="11.000734" x2="11.000734" xlink:href="#linearGradient7948" y1="-7.5773058" y2="21.047073"/>
+ <linearGradient id="linearGradient2760">
+ <stop id="stop2762" offset="0" style="stop-color:#fff6aa;stop-opacity:1"/>
+ <stop id="stop1884" offset="0.56428707" style="stop-color:#fce94f;stop-opacity:1"/>
+ <stop id="stop2764" offset="1" style="stop-color:#fcaf3e;stop-opacity:1"/>
+ </linearGradient>
+ <radialGradient cx="6.484127" cy="-3.1232908" fx="6.484127" fy="-3.1232908" gradientTransform="matrix(-0.9906918,0.9838734,-0.9873672,-0.9911854,14.34067,-13.780844)" gradientUnits="userSpaceOnUse" id="radialGradient2766" inkscape:collect="always" r="15.17675" xlink:href="#linearGradient2760"/>
+ <linearGradient id="linearGradient3383" inkscape:collect="always">
+ <stop id="stop3385" offset="0" style="stop-color:#000000;stop-opacity:1;"/>
+ <stop id="stop3387" offset="1" style="stop-color:#000000;stop-opacity:0;"/>
+ </linearGradient>
+ <radialGradient cx="11.026446" cy="15.746525" fx="11.026446" fy="15.746525" gradientTransform="matrix(1,0,0,0.4889336,0,8.0475196)" gradientUnits="userSpaceOnUse" id="radialGradient8567" inkscape:collect="always" r="10.982252" xlink:href="#linearGradient3383"/>
+ </defs>
+ <sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="2.3571429" inkscape:cy="24" inkscape:document-units="px" inkscape:grid-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1000" inkscape:window-width="1680" inkscape:window-x="0" inkscape:window-y="25" inkscape:zoom="7" pagecolor="#ffffff" showgrid="true"/>
+ <g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
+ <path d="M 22.008698,15.746525 A 10.982252,5.3695922 0 1 1 0.044194221,15.746525 A 10.982252,5.3695922 0 1 1 22.008698,15.746525 z" id="path3428" sodipodi:cx="11.026446" sodipodi:cy="15.746525" sodipodi:rx="10.982252" sodipodi:ry="5.3695922" sodipodi:type="arc" style="opacity:0.2;fill:url(#radialGradient8567);fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" transform="matrix(1.9121761,0,0,1.8623388,2.9154929,8.674636)"/>
+ <path d="M 11,-7.2520323 C 12.772557,-7.2603808 14.778116,-0.16232338 16.21216,0.87957124 C 17.657835,1.9299171 25.06423,1.6763614 25.624427,3.3732361 C 26.180117,5.0564575 20.049215,9.1572782 19.501458,10.843098 C 18.949258,12.542592 21.479106,19.508138 20.038392,20.565281 C 18.609271,21.613917 12.814606,17.050306 11.04203,17.050306 C 9.2550764,17.050305 3.4122139,21.608805 1.9616069,20.56528 C 0.52267162,19.530152 3.0722734,12.608865 2.5245181,10.923044 C 1.9723197,9.2235499 -4.1686154,5.0753115 -3.6244266,3.3732353 C -3.0846165,1.6848543 4.2857892,1.9708743 5.7198337,0.92898096 C 7.1655103,-0.12136361 9.2130662,-7.2436161 11,-7.2520323 z" id="path1869" inkscape:flatsided="false" inkscape:randomized="0" inkscape:rounded="0.18352206" sodipodi:arg1="-1.5707963" sodipodi:arg2="-0.94718689" sodipodi:cx="11" sodipodi:cy="8.125" sodipodi:r1="15.377032" sodipodi:r2="8.9254045" sodipodi:sides="5" sodipodi:type="star" style="opacity:1;fill:url(#radialGradient2766);fill-opacity:1;stroke:url(#linearGradient7955);stroke-width:0.65102839;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" transform="matrix(1.5348722,0,0,1.5372119,7.1163768,12.647913)"/>
+ <path d="M 11,-6.09375 C 10.884957,-5.988318 10.718187,-5.8098367 10.53125,-5.53125 C 10.134891,-4.9405696 9.6629041,-4.0373537 9.21875,-3.09375 C 8.7745959,-2.1501463 8.3448542,-1.1389059 7.90625,-0.28125 C 7.4676458,0.57640587 7.1401874,1.2792634 6.40625,1.8125 C 5.6722678,2.3457692 4.8892811,2.4412409 3.9375,2.59375 C 2.9857189,2.7462591 1.9105283,2.837398 0.875,2.96875 C -0.1605283,3.100102 -1.1587412,3.2739182 -1.84375,3.46875 C -2.1733403,3.5624928 -2.397236,3.6725925 -2.53125,3.75 C -2.4640794,3.8932548 -2.3252465,4.1188778 -2.125,4.375 C -1.6871619,4.9350099 -0.97667447,5.6289777 -0.21875,6.34375 C 0.53917447,7.0585223 1.3529479,7.7860176 2.03125,8.46875 C 2.7095521,9.1514824 3.2827502,9.6702687 3.5625,10.53125 C 3.8419788,11.391397 3.6777444,12.173938 3.53125,13.125 C 3.3847556,14.076062 3.1606027,15.132349 2.96875,16.15625 C 2.7768973,17.180151 2.6180293,18.164383 2.59375,18.875 C 2.5820928,19.216186 2.6237262,19.473342 2.65625,19.625 C 2.8131119,19.605535 3.0694939,19.548645 3.375,19.4375 C 4.0424589,19.194675 4.9302768,18.749191 5.84375,18.25 C 6.7572232,17.750809 7.7039582,17.21479 8.5625,16.78125 C 9.4210418,16.34771 10.095319,15.96875 11,15.96875 C 11.904681,15.96875 12.578958,16.347711 13.4375,16.78125 C 14.296042,17.214789 15.242777,17.750809 16.15625,18.25 C 17.069723,18.749191 17.957541,19.194675 18.625,19.4375 C 18.930506,19.548645 19.186888,19.605535 19.34375,19.625 C 19.376274,19.473342 19.417907,19.216186 19.40625,18.875 C 19.381971,18.164383 19.223103,17.180151 19.03125,16.15625 C 18.839397,15.132349 18.615244,14.076062 18.46875,13.125 C 18.322256,12.173938 18.158021,11.391397 18.4375,10.53125 C 18.71725,9.670269 19.290448,9.1514824 19.96875,8.46875 C 20.647052,7.7860176 21.460826,7.0585223 22.21875,6.34375 C 22.976674,5.6289777 23.687162,4.9350099 24.125,4.375 C 24.325247,4.1188778 24.464079,3.8932549 24.53125,3.75 C 24.397236,3.6725925 24.17334,3.5624928 23.84375,3.46875 C 23.158741,3.2739182 22.160528,3.100102 21.125,2.96875 C 20.089472,2.837398 19.014281,2.7462591 18.0625,2.59375 C 17.110719,2.4412409 16.327732,2.3457692 15.59375,1.8125 C 14.859813,1.2792634 14.532354,0.57640587 14.09375,-0.28125 C 13.655146,-1.1389059 13.225404,-2.1501463 12.78125,-3.09375 C 12.337096,-4.0373537 11.865109,-4.9405696 11.46875,-5.53125 C 11.281813,-5.8098367 11.115043,-5.988318 11,-6.09375 z" id="path2758" inkscape:original="M 11 -7.25 C 9.2185557 -7.25 7.222469 -0.10960666 5.78125 0.9375 C 4.3400313 1.9846066 -3.0745035 1.6807459 -3.625 3.375 C -4.1754966 5.0692543 1.9807534 9.1807461 2.53125 10.875 C 3.0817465 12.569254 0.52753133 19.515393 1.96875 20.5625 C 3.4099688 21.609607 9.2185557 17.03125 11 17.03125 C 12.781444 17.03125 18.590031 21.609606 20.03125 20.5625 C 21.472469 19.515393 18.918253 12.569255 19.46875 10.875 C 20.019247 9.1807459 26.175496 5.0692541 25.625 3.375 C 25.074503 1.6807458 17.659969 1.9846068 16.21875 0.9375 C 14.777531 -0.1096067 12.781445 -7.25 11 -7.25 z " inkscape:radius="-1.0723317" sodipodi:type="inkscape:offset" style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient7956);stroke-width:0.62848389;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" transform="matrix(1.5889053,0,0,1.5941579,6.5220128,12.214526)"/>
+ </g>
+</svg>
diff --git a/manager/templates/template.html b/manager/templates/template.html
index a6c023828..53848a278 100644
--- a/manager/templates/template.html
+++ b/manager/templates/template.html
@@ -84,17 +84,16 @@
<div class="nav-collapse collapse">
<ul class="nav">
<li {% if active_tab == 'user' %}class="active"{% endif %}>
- {% if not user.username %}
+ {% if not user.is_authenticated %}
<a href="{% url login %}">{% trans "Login" %}</a>
{% else %}
<a href="{% url index %}">{% trans "Dashboard" %}</a>
{% endif %}
</li>
-
+ {% if user.is_authenticated %}
<li {% if active_tab == 'workout' %}class="active"{% endif %}><a href="{% url manager.views.overview %}">{% trans "Workouts" %}</a></li>
-
-
+ {% endif %}
<li class="dropdown {% if active_tab == 'exercises' %}active{% endif %}">
<a href="{% url exercises.views.exercise_overview %}"
@@ -106,6 +105,7 @@
</ul>
</li>
+ {% if user.is_authenticated %}
<li class="dropdown{% if active_tab == 'weight' %} active{% endif %}">
<a href="{% url weight.views.overview %}"
@@ -116,14 +116,16 @@
<li><a href="{% url weight-add %}">{% trans "Add weight entry" %}</a></li>
</ul>
</li>
-
+ {% endif %}
<li class="dropdown {% if active_tab == 'nutrition' %}active{% endif %}">
<a href="{% url nutrition.views.overview %}"
class="dropdown-toggle"
data-toggle="dropdown">{% trans "Nutrition" %} <b class="caret"></b></a>
<ul class="dropdown-menu">
+ {% if user.is_authenticated %}
<li><a href="{% url nutrition.views.overview %}">{% trans "Nutrition plans" %} </a></li>
+ {% endif %}
<li><a href="{% url nutrition.views.ingredient_overview %}">{% trans "Ingredient overview" %}</a></li>
</ul>
</li>
@@ -159,7 +161,7 @@
<section class="ym-grid linearize-level-1">
<div id="current-url" data-current-url="{{request.get_full_path}}"></div>
{% if user.get_profile.is_temporary %}
- <div class="box info" style="padding:0.6em; margin: 0em;">
+ <div class="box info" style="padding:0.6em; margin: 0em 0em 1em 0em;">
{% trans "You are using a temporary account, this user will be deleted after some time."%}
</div>
{% endif %}
diff --git a/manager/templates/user/login.html b/manager/templates/user/login.html
index 9ba54cbff..6b5cf52c3 100644
--- a/manager/templates/user/login.html
+++ b/manager/templates/user/login.html
@@ -75,11 +75,11 @@
<p>
<a href="{% url demo-account %}">
- <img src="{% static 'images/icons/register.svg' %}"
+ <img src="{% static 'images/icons/star.svg' %}"
width="48"
height="48"
- alt="{% trans 'Demo access' %}">
- {% trans "Demo access" %}</a>
+ alt="{% trans 'Try the demo' %}">
+ {% trans "Try the demo" %}</a>
</p>
<h3>{% trans "Forgot password?" %}</h3>