Private
Public Access
1
0

Merge branch 'feature/frontpage3' into develop

This commit is contained in:
Sander Roosendaal
2018-10-18 15:38:21 +02:00
9 changed files with 115 additions and 213 deletions

View File

@@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
@@ -6,43 +6,47 @@
{% block content %}
<h1>Available on C2 Logbook</h1>
{% if data %}
<table width="70%" class="listtable">
<thead>
<tr>
<th> Distance </th>
<th> Duration </th>
<th> Date</th>
<th> Type</th>
<th> Import</th>
</tr>
</thead>
<tbody>
{% for workout in data %}
<tr>
{% for key,value in workout.items %}
{% if key == "date" %}
<td>{{ value }}</td>
{% endif %}
{% if key == "type" %}
<td>{{ value }}</td>
{% endif %}
{% if key == "distance" %}
<td>{{ value }}m</td>
{% endif %}
{% if key == "time_formatted" %}
<td>{{ value }}</td>
{% endif %}
{% if key == "id" %}
<td><a href="/rowers/workout/c2import/{{ value }}/">Import</a></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p> No workouts found </p>
{% endif %}
{% if data %}
<table width="70%" class="listtable">
<thead>
<tr>
<th> Distance </th>
<th> Duration </th>
<th> Date</th>
<th> Type</th>
<th> Import</th>
</tr>
</thead>
<tbody>
{% for workout in data %}
<tr>
{% for key,value in workout.items %}
{% if key == "date" %}
<td>{{ value }}</td>
{% endif %}
{% if key == "type" %}
<td>{{ value }}</td>
{% endif %}
{% if key == "distance" %}
<td>{{ value }}m</td>
{% endif %}
{% if key == "time_formatted" %}
<td>{{ value }}</td>
{% endif %}
{% if key == "id" %}
<td><a href="/rowers/workout/c2import/{{ value }}/">Import</a></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p> No workouts found </p>
{% endif %}
{% endblock %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}

View File

@@ -1,54 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}View Workout {% endblock %}
{% block content %}
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
<script async="true" type="text/javascript">
Bokeh.set_log_level("info");
</script>
{{ interactiveplot |safe }}
<script>
// Set things up to resize the plot on a window resize. You can play with
// the arguments of resize_width_height() to change the plot's behavior.
var plot_resize_setup = function () {
var plotid = Object.keys(Bokeh.index)[0]; // assume we have just one plot
var plot = Bokeh.index[plotid];
var plotresizer = function() {
// arguments: use width, use height, maintain aspect ratio
plot.resize_width_height(true, false, false);
};
window.addEventListener('resize', plotresizer);
plotresizer();
};
window.addEventListener('load', plot_resize_setup);
</script>
<style>
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
html, body {height: 100%; margin:5px;}
</style>
<div id="workouts" class="grid_12 alpha">
<h1>Indoor Rower Power Histogram</h1>
<p>Summary of the past 12 months for {{ theuser.first_name }} {{ theuser.last_name }}</p>
<p>Direct link for other Pro users:
<a href="/rowers/{{ id }}/histo-all">https://rowsandall.com/rowers/{{ id }}/histo-all</a>
</p>
<div class="grid_12 alpha">
{{ the_div|safe }}
</div>
</div>
{% endblock %}

View File

@@ -1,27 +0,0 @@
{% extends "base.html" %}
{% block title %}Teams {% endblock %}
{% block content %}
<div class="grid_12 alpha">
<div class="grid_6 alpha">
<p>
<h2>Invitations</h2>
Future invitations page
</p>
</div>
<div class="grid_6 omega">
<p>
<h2>Manual with Code</h2>
</p>
</div>
</div>
{% endblock %}

View File

@@ -1,12 +1,11 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% block title %}About us{% endblock title %}
{% block content %}
{% block main %}
<div class="grid_6 alpha">
<h2>Are you interested in partnering with Rowsandall.com?</h2>
<h2>Are you interested in partnering with Rowsandall.com?</h2>
<p>The founding principle for rowsandall.com was, and still is, free data
<p>The founding principle for rowsandall.com was, and still is, free data
and analysis for rowers. Fulfilling that mission means that we try to test
and support as many widely used rowing related hardware and software
products as possible. Since these products typically have rapid update
@@ -58,11 +57,7 @@
at info@rowsandall.com with
information about your product/service including any important
links or images prior to sending the product.</p>
</div>
<div class="grid_6 omega">
<h2>Examples of possible partnerships</h2>
<p>
We currently envision a couple of ways in which we can partner with
@@ -99,6 +94,9 @@
</lo>
</p>
</div>
{% endblock content %}
{% endblock main %}
{% block sidebar %}
{% include 'menu_help.html' %}
{% endblock %}

View File

@@ -1,48 +0,0 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Planned Sessions{% endblock %}
{% block content %}
<div class="grid_12 alpha">
{% include "planningbuttons.html" %}
</div>
<div class="grid_6 alpha">
<h1>Plan for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
</div>
<div id="timeperiod" class="grid_2 dropdown">
<button class="grid_2 alpha button gray small dropbtn">Time Period</button>
<div class="dropdown-content">
<a class="button gray small alpha"
href="/rowers/sessions/today/rower/{{ rower.id }}">
Today
</a>
<a class="button gray small alpha"
href="/rowers/sessions/thisweek/rower/{{ rower.id }}">
This Week
</a>
<a class="button gray small alpha"
href="/rowers/sessions/thismonth/rower/{{ rower.id }}">
This Month
</a>
<a class="button gray small alpha"
href="/rowers/sessions/lastweek/rower/{{ rower.id }}">
Last Week
</a>
<a class="button gray small alpha"
href="/rowers/sessions/lastmonth/rower/{{ rower.id }}">
Last Month
</a>
</div>
</div>
<div class="grid_12 alpha">
<p>
Click on session name to view
</p>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,21 @@
{% extends "newbasefront.html" %}
{% block main %}
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}
<ul class="main-content">
<li class="frontitem">
<p>Thanks for spending some quality time on rowsandall.com today.</p>
</li>
</ul>
<p class="midden"><a class="twitter-follow-button"
href="https://twitter.com/rowsandall">
Follow @rowsandall</a>
</p>
{% endblock %}

View File

@@ -1,37 +1,41 @@
{% extends "base.html" %}
{% extends "newbase.html" %}
{% load staticfiles %}
{% load rowerfilters %}
{% block title %}Workouts{% endblock %}
{% block content %}
{% block main %}
<h1>Available on MapMyFitness (UnderArmour)</h1>
{% if workouts %}
<table width="70%" class="listtable">
<thead>
<tr>
<th> Import </th>
<th> Date/Time </th>
<th> Duration </th>
<th> Total Distance</th>
<th> Type</th>
</tr>
</thead>
<tbody>
{% for workout in workouts %}
<tr>
<td>
<a href="/rowers/workout/underarmourimport/{{ workout|ualookup:'id' }}/">Import</a></td>
<td>{{ workout|ualookup:'starttime' }}</td>
<td>{{ workout|ualookup:'duration' }} </td>
<td>{{ workout|ualookup:'distance' }} m</td>
<td>{{ workout|ualookup:'type' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p> No workouts found. We only list workouts with time data series. </p>
{% endif %}
{% if workouts %}
<table width="70%" class="listtable">
<thead>
<tr>
<th> Import </th>
<th> Date/Time </th>
<th> Duration </th>
<th> Total Distance</th>
<th> Type</th>
</tr>
</thead>
<tbody>
{% for workout in workouts %}
<tr>
<td>
<a href="/rowers/workout/underarmourimport/{{ workout|ualookup:'id' }}/">Import</a></td>
<td>{{ workout|ualookup:'starttime' }}</td>
<td>{{ workout|ualookup:'duration' }} </td>
<td>{{ workout|ualookup:'distance' }} m</td>
<td>{{ workout|ualookup:'type' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p> No workouts found. We only list workouts with time data series. </p>
{% endif %}
{% endblock %}
{% block sidebar %}
{% include 'menu_workouts.html' %}
{% endblock %}

View File

@@ -211,7 +211,7 @@ def getrequestrower(request,rowerid=0,userid=0,notpermanent=False):
userid = int(userid)
rowerid = int(rowerid)
if notpermanent == False:
if rowerid == 0 and 'rowerid' in request.session:
rowerid = request.session['rowerid']
@@ -1025,6 +1025,7 @@ def rower_register_view(request):
{'form':form,})
# Shows analysis page
@login_required()
def analysis_view(request,userid=0):
r = getrequestrower(request,userid=userid)
return render(request,
@@ -1036,6 +1037,7 @@ def analysis_view(request,userid=0):
)
# Shows laboratory page
@login_required()
def laboratory_view(request,userid=0):
r = getrequestrower(request,userid=userid)
return render(request,

View File

@@ -352,6 +352,7 @@
.main-head {
grid-area: header;
background-color: rgba(0,0,0,0.6);
padding: 15px;
}
@@ -359,6 +360,7 @@
.main-user {
grid-area: user;
background-color: rgba(0,0,0,0.6);
padding: 15px;
}
.content {
@@ -590,10 +592,10 @@
}
.main-content li.grid_4 {
grid-column-end: span 3;
grid-column-end: span 4;
}
.main-content li.grid_5 {
grid-column-end: span 3;
grid-column-end: span 5;
}
}