Merge branch 'develop' into feature/tp
This commit is contained in:
@@ -28,6 +28,7 @@ from rowingdata import (
|
||||
)
|
||||
|
||||
from rowers.models import Team
|
||||
from rowers.metrics import axes
|
||||
|
||||
import os
|
||||
import zipfile
|
||||
@@ -363,7 +364,7 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
|
||||
velo = 500./pace
|
||||
|
||||
f = row.df['TimeStamp (sec)'].diff().mean()
|
||||
if f !=0:
|
||||
if f !=0 and not np.isnan(f):
|
||||
windowsize = 2*(int(10./(f)))+1
|
||||
else:
|
||||
windowsize = 1
|
||||
@@ -899,6 +900,13 @@ def prepmultipledata(ids,verbose=False):
|
||||
# Read a set of columns for a set of workout ids, returns data as a
|
||||
# pandas dataframe
|
||||
def read_cols_df_sql(ids,columns):
|
||||
# drop columns that are not in offical list
|
||||
axx = [ax[0] for ax in axes]
|
||||
for c in columns:
|
||||
if not c in axx:
|
||||
columns.remove(c)
|
||||
print c,'aap'
|
||||
|
||||
columns = list(columns)+['distance','spm']
|
||||
columns = [x for x in columns if x != 'None']
|
||||
columns = list(set(columns))
|
||||
|
||||
@@ -82,6 +82,7 @@ def interactive_forcecurve(theworkouts,workstrokesonly=False):
|
||||
'workoutstate','driveenergy']
|
||||
|
||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=ids)
|
||||
|
||||
rowdata.dropna(axis=1,how='all',inplace=True)
|
||||
rowdata.dropna(axis=0,how='any',inplace=True)
|
||||
|
||||
@@ -369,6 +370,8 @@ def interactive_histoall(theworkouts):
|
||||
ids = [int(w.id) for w in theworkouts]
|
||||
|
||||
rowdata = dataprep.getsmallrowdata_db(['power'],ids=ids,doclean=True)
|
||||
|
||||
|
||||
rowdata.dropna(axis=0,how='any',inplace=True)
|
||||
|
||||
if rowdata.empty:
|
||||
@@ -802,6 +805,7 @@ def interactive_chart(id=0,promember=0):
|
||||
|
||||
columns = ['time','pace','hr','fpace','ftime']
|
||||
datadf = dataprep.getsmallrowdata_db(columns,ids=[id])
|
||||
|
||||
datadf.dropna(axis=0,how='any',inplace=True)
|
||||
row = Workout.objects.get(id=id)
|
||||
if datadf.empty:
|
||||
@@ -883,6 +887,17 @@ def interactive_cum_flex_chart2(theworkouts,promember=0,
|
||||
columns = [xparam,yparam1,yparam2,'spm','driveenergy','distance']
|
||||
datadf = dataprep.getsmallrowdata_db(columns,ids=ids,doclean=False)
|
||||
|
||||
try:
|
||||
tests = rowdata[yparam2]
|
||||
except KeyError:
|
||||
yparam2 = 'None'
|
||||
|
||||
try:
|
||||
tests = rowdata[yparam1]
|
||||
except KeyError:
|
||||
yparam1 = 'None'
|
||||
|
||||
|
||||
yparamname1 = axlabels[yparam1]
|
||||
if yparam2 != 'None':
|
||||
yparamname2 = axlabels[yparam2]
|
||||
@@ -1167,6 +1182,16 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True,
|
||||
workstrokesonly=workstrokesonly)
|
||||
|
||||
try:
|
||||
tests = rowdata[yparam2]
|
||||
except KeyError:
|
||||
yparam2 = 'None'
|
||||
|
||||
try:
|
||||
tests = rowdata[yparam1]
|
||||
except KeyError:
|
||||
yparam1 = 'None'
|
||||
|
||||
rowdata.dropna(axis=1,how='all',inplace=True)
|
||||
rowdata.dropna(axis=0,how='any',inplace=True)
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import time
|
||||
import math
|
||||
from math import sin,cos,atan2,sqrt
|
||||
import os,sys
|
||||
import gzip
|
||||
|
||||
# Django
|
||||
from django.shortcuts import render_to_response
|
||||
@@ -230,6 +231,13 @@ def createstravaworkoutdata(w):
|
||||
row = rowingdata(filename)
|
||||
tcxfilename = filename[:-4]+'.tcx'
|
||||
row.exporttotcx(tcxfilename,notes=w.notes)
|
||||
gzfilename = tcxfilename+'.gz'
|
||||
with file(tcxfilename,'rb') as inF:
|
||||
s = inF.read()
|
||||
with gzip.GzipFile(gzfilename,'wb') as outF:
|
||||
outF.write(s)
|
||||
os.remove(tcxfilename)
|
||||
return gzfilename
|
||||
except:
|
||||
tcxfilename = 0
|
||||
|
||||
@@ -241,7 +249,7 @@ def handle_stravaexport(f2,workoutname,stravatoken,description=''):
|
||||
# w = Workout.objects.get(id=workoutid)
|
||||
client = stravalib.Client(access_token=stravatoken)
|
||||
|
||||
act = client.upload_activity(f2,'tcx',name=workoutname)
|
||||
act = client.upload_activity(f2,'tcx.gz',name=workoutname)
|
||||
try:
|
||||
res = act.wait(poll_interval=5.0,timeout=30)
|
||||
message = 'Workout successfully synchronized to Strava'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
|
||||
@@ -1,149 +1,9 @@
|
||||
{% load cookielaw_tags %}
|
||||
{% load analytical %}
|
||||
{% load rowerfilters %}
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||
{% analytical_head_top %}
|
||||
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
|
||||
{% include "ga.html" %}
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="/static/css/bokeh-0.12.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/bokeh-widgets-0.12.3.min.css" type="text/css" />
|
||||
{% extends "basebase.html" %}
|
||||
{% block filters %}
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" sizes="32x32" href="/static/img/favicon-32x32.png" type="image/png"/>
|
||||
<link rel="icon" sizes="64x64" href="/static/img/favicon-64x64.png" type="image/png"/>
|
||||
<link rel="icon" sizes="192x192" href="/static/img/favicon-192x192.png" type="image/png"/>
|
||||
<link rel="icon" sizes="16x16" href="/static/img/favicon-16x16.png" type="image/png"/>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="initial-scale=0.67">
|
||||
<title>Rowsandall</title>
|
||||
<link rel="stylesheet" href="/static/css/reset.css" />
|
||||
<link rel="stylesheet" href="/static/css/text.css" />
|
||||
<link rel="stylesheet" href="/static/css/960_12_col.css" />
|
||||
<link rel="stylesheet" href="/static/css/rowsandall.css" />
|
||||
{% block meta %} {% endblock %}
|
||||
{% analytical_head_bottom %}
|
||||
</head>
|
||||
<body>
|
||||
{% analytical_body_top %}
|
||||
<div class="container_12">
|
||||
<div class="grid_12">
|
||||
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="logo" class="grid_6 alpha">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% else %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_6 omega">
|
||||
<div class="grid_4 alpha">
|
||||
<div class="grid_1 alpha">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/videos">Videos</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/email">Contact</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_4 alpha">
|
||||
<p>Free Data and Analysis. For Rowers. By Rowers.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_1">
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/me/edit">{{ user.first_name }}</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Edit user account, e.g. heart rate zones, power zones, email, teams</span>
|
||||
|
||||
{% else %}
|
||||
<p><a class="button gray small" href="{% url 'login' %}">login</a> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="{% url 'logout' %}">logout</a></p>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<h6 class="graytext">Pro Member</h6>
|
||||
{% else %}
|
||||
<div class="grid_1"><a class="button green small" href="/rowers/promembership">Upgrade to Pro</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid_12">
|
||||
<div class="grid_1 alpha tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="/rowers/workout/upload/">Upload</a></p>
|
||||
<span class="tooltiptext">Upload CSV, TCX, FIT data files to rowsandall.com</span>
|
||||
{% else %}
|
||||
<p><a class="button green small" href="/rowers/register">Register (free)</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/imports/">Import</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Import workouts from Strava, SportTracks, and C2 logbook</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-workouts/">Workouts</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your list of workouts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-graphs/">Graphs</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your most recent charts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/analysis">Analysis</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Analysis of workouts over a period of time</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user|has_teams %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
@@ -175,71 +35,8 @@
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
{% block message %}
|
||||
{% if message %}
|
||||
<p class="message">
|
||||
{{ message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if successmessage %}
|
||||
<p class="successmessage">
|
||||
{{ successmessage }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
{% load tz %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="grid_12 omega" >
|
||||
{% block footer %}
|
||||
<p id="footer">{{ versionstring }}</p>
|
||||
<div class="grid_2 alpha">
|
||||
<p id="footer"><a href="/rowers/email/">© Sander Roosendaal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/about">About</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="/rowers/developers">Developers</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/legal">Legal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/partners">Partners</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/physics">Physics</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<p id="footer">
|
||||
<a href="https://www.facebook.com/groups/rowsandall/">Facebook group</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% cookielaw_banner %}
|
||||
</div>
|
||||
<!-- end container -->
|
||||
{% analytical_body_bottom %}
|
||||
</body>
|
||||
</html>
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
219
rowers/templates/basebase.html
Normal file
219
rowers/templates/basebase.html
Normal file
@@ -0,0 +1,219 @@
|
||||
{% load cookielaw_tags %}
|
||||
{% load analytical %}
|
||||
{% block filters %}
|
||||
{% endblock %}
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||
{% analytical_head_top %}
|
||||
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
|
||||
{% include "ga.html" %}
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="/static/css/bokeh-0.12.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/bokeh-widgets-0.12.3.min.css" type="text/css" />
|
||||
|
||||
<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" sizes="32x32" href="/static/img/favicon-32x32.png" type="image/png"/>
|
||||
<link rel="icon" sizes="64x64" href="/static/img/favicon-64x64.png" type="image/png"/>
|
||||
<link rel="icon" sizes="192x192" href="/static/img/favicon-192x192.png" type="image/png"/>
|
||||
<link rel="icon" sizes="16x16" href="/static/img/favicon-16x16.png" type="image/png"/>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="initial-scale=0.67">
|
||||
<title>Rowsandall</title>
|
||||
<link rel="stylesheet" href="/static/css/reset.css" />
|
||||
<link rel="stylesheet" href="/static/css/text.css" />
|
||||
<link rel="stylesheet" href="/static/css/960_12_col.css" />
|
||||
<link rel="stylesheet" href="/static/css/rowsandall.css" />
|
||||
{% block meta %} {% endblock %}
|
||||
{% analytical_head_bottom %}
|
||||
</head>
|
||||
<body>
|
||||
{% analytical_body_top %}
|
||||
{% block body_top %}{% endblock %}
|
||||
<div class="container_12">
|
||||
<div class="grid_12">
|
||||
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="logo" class="grid_6 alpha">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% else %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_6 omega">
|
||||
<div class="grid_4 alpha">
|
||||
<div class="grid_1 alpha">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/videos">Videos</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/email">Contact</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_4 alpha">
|
||||
<p>Free Data and Analysis. For Rowers. By Rowers.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_1">
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/me/edit">{{ user.first_name }}</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Edit user account, e.g. heart rate zones, power zones, email, teams</span>
|
||||
|
||||
{% else %}
|
||||
<p><a class="button gray small" href="{% url 'login' %}">login</a> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="{% url 'logout' %}">logout</a></p>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<h6 class="graytext">Pro Member</h6>
|
||||
{% else %}
|
||||
<div class="grid_1"><a class="button green small" href="/rowers/promembership">Upgrade to Pro</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid_12">
|
||||
<div class="grid_1 alpha tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="/rowers/workout/upload/">Upload</a></p>
|
||||
<span class="tooltiptext">Upload CSV, TCX, FIT data files to rowsandall.com</span>
|
||||
{% else %}
|
||||
<p><a class="button green small" href="/rowers/register">Register (free)</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/imports/">Import</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Import workouts from Strava, SportTracks, and C2 logbook</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-workouts/">Workouts</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your list of workouts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-graphs/">Graphs</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your most recent charts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/analysis">Analysis</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Analysis of workouts over a period of time</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% block teams %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
{% block message %}
|
||||
{% if message %}
|
||||
<p class="message">
|
||||
{{ message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if successmessage %}
|
||||
<p class="successmessage">
|
||||
{{ successmessage }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
{% load tz %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="grid_12 omega" >
|
||||
{% block footer %}
|
||||
<p id="footer">{{ versionstring }}</p>
|
||||
<div class="grid_2 alpha">
|
||||
<p id="footer"><a href="/rowers/email/">© Sander Roosendaal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/about">About</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="/rowers/developers">Developers</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/legal">Legal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/partners">Partners</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/physics">Physics</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<p id="footer">
|
||||
<a href="https://www.facebook.com/groups/rowsandall/">Facebook group</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% cookielaw_banner %}
|
||||
</div>
|
||||
<!-- end container -->
|
||||
{% analytical_body_bottom %}
|
||||
{% block body_bottom %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,34 +1,12 @@
|
||||
{% load cookielaw_tags %}
|
||||
{% load analytical %}
|
||||
{% load rowerfilters %}
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||
{% analytical_head_top %}
|
||||
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
|
||||
{% include "ga.html" %}
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="/static/css/bokeh-0.12.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/bokeh-widgets-0.12.3.min.css" type="text/css" />
|
||||
|
||||
<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" sizes="32x32" href="/static/img/favicon-32x32.png" type="image/png"/>
|
||||
<link rel="icon" sizes="64x64" href="/static/img/favicon-64x64.png" type="image/png"/>
|
||||
<link rel="icon" sizes="192x192" href="/static/img/favicon-192x192.png" type="image/png"/>
|
||||
<link rel="icon" sizes="16x16" href="/static/img/favicon-16x16.png" type="image/png"/>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="initial-scale=0.67">
|
||||
<title>Rowsandall</title>
|
||||
<link rel="stylesheet" href="/static/css/reset.css" />
|
||||
<link rel="stylesheet" href="/static/css/text.css" />
|
||||
<link rel="stylesheet" href="/static/css/960_12_col.css" />
|
||||
<link rel="stylesheet" href="/static/css/rowsandall.css" />
|
||||
{% block meta %} {% endblock %}
|
||||
{% analytical_head_bottom %}
|
||||
</head>
|
||||
<body>
|
||||
{% extends "basebase.html" %}
|
||||
{% block filters %}
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
{% block meta %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_top %}
|
||||
<style>
|
||||
.splash {
|
||||
background-color: transparent;
|
||||
@@ -44,129 +22,17 @@
|
||||
.container_12 {background-color: rgba(255,255,255,0.0);}
|
||||
.container_top {background-color: rgba(255,255,255,0.7);}
|
||||
</style>
|
||||
|
||||
<div id="bgpic" class="splash">
|
||||
{% analytical_body_top %}
|
||||
<div class="container_top">
|
||||
<div class="container_12">
|
||||
<div class="grid_12">
|
||||
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="logo" class="grid_6 alpha">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% else %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_6 omega">
|
||||
<div class="grid_4 alpha">
|
||||
<div class="grid_1 alpha">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/videos">Videos</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/email">Contact</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_4 alpha">
|
||||
<p>Free Data and Analysis. For Rowers. By Rowers.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_1">
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/me/edit">{{ user.first_name }}</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Edit user account, e.g. heart rate zones, power zones, email, teams</span>
|
||||
|
||||
{% else %}
|
||||
<p><a class="button gray small" href="{% url 'login' %}">login</a> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="{% url 'logout' %}">logout</a></p>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<h6 class="graytext">Pro Member</h6>
|
||||
{% else %}
|
||||
<div class="grid_1"><a class="button green small" href="/rowers/promembership">Upgrade to Pro</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid_12">
|
||||
<div class="grid_1 alpha tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="/rowers/workout/upload/">Upload</a></p>
|
||||
<span class="tooltiptext">Upload CSV, TCX, FIT data files to rowsandall.com</span>
|
||||
{% else %}
|
||||
<p><a class="button green small" href="/rowers/register">Register (free)</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/imports/">Import</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Import workouts from Strava, SportTracks, and C2 logbook</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-workouts/">Workouts</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your list of workouts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-graphs/">Graphs</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your most recent charts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/analysis">Analysis</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Analysis of workouts over a period of time</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated and user|user_teams %}
|
||||
<div id="bgpic" class="splash">
|
||||
|
||||
<div class="container_top">
|
||||
{% endblock %}
|
||||
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user|has_teams %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button gray small" href="/rowers/me/teams/">Manage Teams</a>
|
||||
@@ -194,73 +60,11 @@
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
{% block message %}
|
||||
{% if message %}
|
||||
<p class="message">
|
||||
{{ message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if successmessage %}
|
||||
<p class="successmessage">
|
||||
{{ successmessage }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_bottom %}
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
{% load tz %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="grid_12 omega" >
|
||||
{% block footer %}
|
||||
<p id="footer">{{ versionstring }}</p>
|
||||
<div class="grid_2 alpha">
|
||||
<p id="footer"><a href="/rowers/email/">© Sander Roosendaal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/about">About</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="/rowers/developers">Developers</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/legal">Legal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/partners">Partners</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/physics">Physics</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<p id="footer">
|
||||
<a href="https://www.facebook.com/groups/rowsandall/">Facebook group</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% cookielaw_banner %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- end container -->
|
||||
{% analytical_body_bottom %}
|
||||
<script type="text/javascript">
|
||||
var num = (Math.floor(Math.random()*4));
|
||||
|
||||
@@ -272,5 +76,5 @@
|
||||
elem.classList.add(array[num]);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
26
rowers/templates/basenofilters.html
Normal file
26
rowers/templates/basenofilters.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "basebase.html" %}
|
||||
{% block filters %}
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user.rower.team.all %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{% for t in user.rower.team.all %}
|
||||
<a class="button gray small" href="/rowers/list-workouts/team/{{ t.id }}/">{{ t.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="tooltiptext">See recent workouts for your team</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -110,6 +110,7 @@ urlpatterns = [
|
||||
url(r'^api-docs$', views.schema_view),
|
||||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
url(r'^api/workouts/(?P<id>\d+)/strokedata$',views.strokedatajson),
|
||||
url(r'^500v/$',views.error500_view),
|
||||
url(r'^500/$', TemplateView.as_view(template_name='500.html'),name='500'),
|
||||
url(r'^404/$', TemplateView.as_view(template_name='404.html'),name='404'),
|
||||
url(r'^400/$', TemplateView.as_view(template_name='400.html'),name='400'),
|
||||
|
||||
@@ -4342,7 +4342,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
workstrokesonly = False
|
||||
|
||||
if request.method == 'POST' and 'savefavorite' in request.POST:
|
||||
if not user.is_anonymous():
|
||||
if not request.user.is_anonymous():
|
||||
workstrokesonly = request.POST['workstrokesonlysave']
|
||||
reststrokes = not workstrokesonly
|
||||
r = Rower.objects.get(user=request.user)
|
||||
|
||||
@@ -45,8 +45,9 @@ CELERY_SEND_TASK_SENT_EVENT = True
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
ALLOWED_HOSTS = ['localhost']
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -21,6 +21,16 @@ from rowsandall_app.views import rootview
|
||||
from django.contrib.auth import views as auth_views
|
||||
from rowers import views as rowersviews
|
||||
|
||||
from django.conf.urls import (
|
||||
handler400, handler403, handler404, handler500
|
||||
)
|
||||
|
||||
handler400 = 'rowers.views.error400_view'
|
||||
handler403 = 'rowers.views.error403_view'
|
||||
handler404 = 'rowers.views.error404_view'
|
||||
handler500 = 'rowers.views.error500_view'
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^password_change_done/$',auth_views.password_change_done,name='password_change_done'),
|
||||
url(r'^password_change/$',auth_views.password_change),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from django.shortcuts import render, redirect, render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.conf import settings
|
||||
|
||||
from rowingdata import main as rmain
|
||||
|
||||
16
templates/400.html
Normal file
16
templates/400.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid_12">
|
||||
<h1>Bad Request</h1>
|
||||
<p>
|
||||
HTTP Error 400 Bad Request.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
17
templates/403.html
Normal file
17
templates/403.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid_12">
|
||||
<h1>Forbidden</h1>
|
||||
<p>
|
||||
Access forbidden. You probably tried to access functionality on a workout
|
||||
or chart that is not owned by you.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
15
templates/404.html
Normal file
15
templates/404.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid_12">
|
||||
<h1>Error 404 Page not found</h1>
|
||||
<p>
|
||||
We could not find the page on our server.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
21
templates/500.html
Normal file
21
templates/500.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends "basenofilters.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="grid_12">
|
||||
<h1>Error 500 Internal Server Error</h1>
|
||||
<p>
|
||||
The site reported an internal server error. The site developer has been
|
||||
notified automatically with a full error report. You can help the developer
|
||||
by reporting an issue on Bitbucket using the button below.
|
||||
</p>
|
||||
|
||||
<div class="grid_2 alpha">
|
||||
<a class="button red small" href="https://bitbucket.org/sanderroosendaal/rowsandall/issues/new">Report an issue</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
42
templates/base.html
Normal file
42
templates/base.html
Normal file
@@ -0,0 +1,42 @@
|
||||
{% extends "basebase.html" %}
|
||||
{% block filters %}
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user|has_teams %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button gray small" href="/rowers/me/teams/">Manage Teams</a>
|
||||
{% if user|is_manager %}
|
||||
<a class="button gray small" href="/rowers/workout/upload/team/">Upload Team Member Workout</a>
|
||||
{% endif %}
|
||||
{% for t in user|user_teams %}
|
||||
<a class="button gray small" href="/rowers/list-workouts/team/{{ t.id }}/">{{ t.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="tooltiptext">See recent workouts for your team</span>
|
||||
{% elif user.is_authenticated and user.rower.team.all %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{% for t in user.rower.team.all %}
|
||||
<a class="button gray small" href="/rowers/list-workouts/team/{{ t.id }}/">{{ t.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="tooltiptext">See recent workouts for your team</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
219
templates/basebase.html
Normal file
219
templates/basebase.html
Normal file
@@ -0,0 +1,219 @@
|
||||
{% load cookielaw_tags %}
|
||||
{% load analytical %}
|
||||
{% block filters %}
|
||||
{% endblock %}
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="/static/cookielaw/js/cookielaw.js"></script>
|
||||
{% analytical_head_top %}
|
||||
{% if GOOGLE_ANALYTICS_PROPERTY_ID %}
|
||||
{% include "ga.html" %}
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="/static/css/bokeh-0.12.3.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="/static/css/bokeh-widgets-0.12.3.min.css" type="text/css" />
|
||||
|
||||
<link rel="shortcut icon" href="/static/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="icon" sizes="32x32" href="/static/img/favicon-32x32.png" type="image/png"/>
|
||||
<link rel="icon" sizes="64x64" href="/static/img/favicon-64x64.png" type="image/png"/>
|
||||
<link rel="icon" sizes="192x192" href="/static/img/favicon-192x192.png" type="image/png"/>
|
||||
<link rel="icon" sizes="16x16" href="/static/img/favicon-16x16.png" type="image/png"/>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="initial-scale=0.67">
|
||||
<title>Rowsandall</title>
|
||||
<link rel="stylesheet" href="/static/css/reset.css" />
|
||||
<link rel="stylesheet" href="/static/css/text.css" />
|
||||
<link rel="stylesheet" href="/static/css/960_12_col.css" />
|
||||
<link rel="stylesheet" href="/static/css/rowsandall.css" />
|
||||
{% block meta %} {% endblock %}
|
||||
{% analytical_head_bottom %}
|
||||
</head>
|
||||
<body>
|
||||
{% analytical_body_top %}
|
||||
{% block body_top %}{% endblock %}
|
||||
<div class="container_12">
|
||||
<div class="grid_12">
|
||||
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<div id="logo" class="grid_6 alpha">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% else %}
|
||||
<p><a href="/"><img src="/static/img/logo7.png"
|
||||
alt="Rowsandall logo" height="80"></a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_6 omega">
|
||||
<div class="grid_4 alpha">
|
||||
<div class="grid_1 alpha">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/videos">Videos</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
<p id="header">
|
||||
<a class="button gray small" href="/rowers/email">Contact</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_4 alpha">
|
||||
<p>Free Data and Analysis. For Rowers. By Rowers.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid_1">
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/me/edit">{{ user.first_name }}</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Edit user account, e.g. heart rate zones, power zones, email, teams</span>
|
||||
|
||||
{% else %}
|
||||
<p><a class="button gray small" href="{% url 'login' %}">login</a> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="{% url 'logout' %}">logout</a></p>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_1 omega">
|
||||
{% if user.rower.rowerplan == 'pro' or user.rower.rowerplan == 'coach' %}
|
||||
<h6 class="graytext">Pro Member</h6>
|
||||
{% else %}
|
||||
<div class="grid_1"><a class="button green small" href="/rowers/promembership">Upgrade to Pro</a></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="grid_12">
|
||||
<div class="grid_1 alpha tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p><a class="button gray small" href="/rowers/workout/upload/">Upload</a></p>
|
||||
<span class="tooltiptext">Upload CSV, TCX, FIT data files to rowsandall.com</span>
|
||||
{% else %}
|
||||
<p><a class="button green small" href="/rowers/register">Register (free)</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/imports/">Import</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Import workouts from Strava, SportTracks, and C2 logbook</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-workouts/">Workouts</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your list of workouts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/list-graphs/">Graphs</a>
|
||||
</p>
|
||||
<span class="tooltiptext">See your most recent charts</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_2 tooltip">
|
||||
{% if user.is_authenticated %}
|
||||
<p>
|
||||
<a class="button gray small" href="/rowers/analysis">Analysis</a>
|
||||
</p>
|
||||
<span class="tooltiptext">Analysis of workouts over a period of time</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid_1 tooltip">
|
||||
{% block teams %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clear"></div>
|
||||
<div class="grid_12">
|
||||
{% block message %}
|
||||
{% if message %}
|
||||
<p class="message">
|
||||
{{ message }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if successmessage %}
|
||||
<p class="successmessage">
|
||||
{{ successmessage }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
{% load tz %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="grid_12 omega" >
|
||||
{% block footer %}
|
||||
<p id="footer">{{ versionstring }}</p>
|
||||
<div class="grid_2 alpha">
|
||||
<p id="footer"><a href="/rowers/email/">© Sander Roosendaal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/about">About</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="/rowers/developers">Developers</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/legal">Legal</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/partners">Partners</a></p>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<p id="footer">
|
||||
<a href="/rowers/physics">Physics</a></p>
|
||||
</div>
|
||||
<div class="grid_2">
|
||||
<p id="footer">
|
||||
<a href="http://analytics.rowsandall.com/">Rowing Analytics BLOG</a></p>
|
||||
</div>
|
||||
<div class="grid_2 omega">
|
||||
<p id="footer">
|
||||
<a href="https://www.facebook.com/groups/rowsandall/">Facebook group</a></p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% cookielaw_banner %}
|
||||
</div>
|
||||
<!-- end container -->
|
||||
{% analytical_body_bottom %}
|
||||
{% block body_bottom %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
80
templates/basefront.html
Normal file
80
templates/basefront.html
Normal file
@@ -0,0 +1,80 @@
|
||||
{% extends "basebase.html" %}
|
||||
{% block filters %}
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
{% block meta %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body_top %}
|
||||
<style>
|
||||
.splash {
|
||||
background-color: transparent;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
min-height: 759px;
|
||||
min-width: 1024px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.container_12 {background-color: rgba(255,255,255,0.0);}
|
||||
.container_top {background-color: rgba(255,255,255,0.7);}
|
||||
</style>
|
||||
|
||||
<div id="bgpic" class="splash">
|
||||
|
||||
<div class="container_top">
|
||||
{% endblock %}
|
||||
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user|has_teams %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button gray small" href="/rowers/me/teams/">Manage Teams</a>
|
||||
{% if user|is_manager %}
|
||||
<a class="button gray small" href="/rowers/workout/upload/team/">Upload Team Member Workout</a>
|
||||
{% endif %}
|
||||
{% for t in user|user_teams %}
|
||||
<a class="button gray small" href="/rowers/list-workouts/team/{{ t.id }}/">{{ t.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="tooltiptext">See recent workouts for your team</span>
|
||||
{% elif user.is_authenticated and user.rower.team.all %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{% for t in user.rower.team.all %}
|
||||
<a class="button gray small" href="/rowers/list-workouts/team/{{ t.id }}/">{{ t.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="tooltiptext">See recent workouts for your team</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block body_bottom %}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var num = (Math.floor(Math.random()*4));
|
||||
|
||||
var array = ['one', 'two', 'three', 'four'];
|
||||
|
||||
|
||||
var elem = document.getElementById('bgpic');
|
||||
console.log(elem);
|
||||
elem.classList.add(array[num]);
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
26
templates/basenofilters.html
Normal file
26
templates/basenofilters.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "basebase.html" %}
|
||||
{% block filters %}
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user.rower.team.all %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
<button class="grid_1 alpha button gray small dropbtn">
|
||||
Teams
|
||||
</button>
|
||||
<div class="dropdown-content">
|
||||
{% for t in user.rower.team.all %}
|
||||
<a class="button gray small" href="/rowers/list-workouts/team/{{ t.id }}/">{{ t.name }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<span class="tooltiptext">See recent workouts for your team</span>
|
||||
{% else %}
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user