diff --git a/rowers/templates/analysis.html b/rowers/templates/analysis.html index a4454ad7..121e38ef 100644 --- a/rowers/templates/analysis.html +++ b/rowers/templates/analysis.html @@ -131,7 +131,7 @@
  • Power Progress

    {% if user|is_planmember %} - + {% else %} {% endif %} diff --git a/rowers/templates/frontpage.html b/rowers/templates/frontpage.html index 7ecd5fdc..f12f6778 100644 --- a/rowers/templates/frontpage.html +++ b/rowers/templates/frontpage.html @@ -1,37 +1,164 @@ -{% extends "basefront.html" %} +{% extends "newbasefront.html" %} {% load staticfiles %} {% load rowerfilters %} {% block title %}Rowsandall Rowing Data{% endblock %} -{% block content %} +{% block main %} {% load tz %} -
    -

    - Local Time: {% now "jS F Y H:i" %} -

    -

    - -

    + +

    - Compatible with: - Strava icon - SportTracks icon - C2 icon - NK icon - CrewNerd icon - RiM icon - RowPro icon - ErgStick icon - BoatCoach icon - PainSled icon - CoxMate icon - RitmoTime icon + Local Time: {% now "jS F Y H:i" %}

    -
    + + + +

    + Compatible with: + Strava icon + SportTracks icon + C2 icon + NK icon + CrewNerd icon + RiM icon + RowPro icon + ErgStick icon + BoatCoach icon + PainSled icon + CoxMate icon + RitmoTime icon +

    {% endblock %} diff --git a/rowers/templates/menu_analytics.html b/rowers/templates/menu_analytics.html index d8dcadb1..cfcfa152 100644 --- a/rowers/templates/menu_analytics.html +++ b/rowers/templates/menu_analytics.html @@ -23,7 +23,7 @@
  • - +  Power Progress
  • diff --git a/rowers/templates/plannedsessionview.html b/rowers/templates/plannedsessionview.html index fb967acd..fdb42941 100644 --- a/rowers/templates/plannedsessionview.html +++ b/rowers/templates/plannedsessionview.html @@ -81,7 +81,7 @@ {{ workout.date|date:"Y-m-d" }}
    - + {{ workout.name }} {{ workout.notes }} diff --git a/rowers/views.py b/rowers/views.py index 0e758f81..0b761670 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -13868,7 +13868,6 @@ def plannedsession_create_view(request, url = reverse(plannedsession_create_view, kwargs = { 'userid':r.user.id, - 'timeperiod':timeperiod, }) return HttpResponseRedirect(url) else: @@ -14057,7 +14056,7 @@ def plannedsession_multicreate_view(request, # Manager creates sessions for entire team @user_passes_test(iscoachmember,login_url="/rowers/planmembership/", redirect_field_name=None) -def plannedsession_teamcreate_view(request,timeperiod='thisweek', +def plannedsession_teamcreate_view(request, teamid=0,userid=0): therower = getrequestrower(request,userid=userid) @@ -14139,10 +14138,10 @@ def plannedsession_teamcreate_view(request,timeperiod='thisweek', add_rower_session(r,ps) - url = reverse(plannedsession_teamcreate_view, - kwargs = { - 'timeperiod':timeperiod, - }) + url = reverse(plannedsession_teamcreate_view) + if when: + url += '?when='+when + return HttpResponseRedirect(url) else: initial = { @@ -14843,6 +14842,7 @@ def plannedsession_view(request,id=0,userid=0): coursediv = '' m = ps.manager + mm = Rower.objects.get(user=m) if ps.manager != request.user: if r.rowerplan == 'coach': @@ -14967,7 +14967,6 @@ def plannedsession_view(request,id=0,userid=0): } ] - return render(request,'plannedsessionview.html', { 'psdict': psdict, @@ -14980,7 +14979,7 @@ def plannedsession_view(request,id=0,userid=0): 'workouts': ws, 'active':'nav-plan', 'breadcrumbs':breadcrumbs, - 'manager':m, + 'manager':mm, 'rower':r, 'ratio':ratio, 'plan':trainingplan, diff --git a/rowsandall_app/views.py b/rowsandall_app/views.py index 4bcc1b91..d7276175 100644 --- a/rowsandall_app/views.py +++ b/rowsandall_app/views.py @@ -1,12 +1,19 @@ from django.shortcuts import render, redirect, render_to_response from django.template import RequestContext from django.conf import settings +from rowers.forms import LoginForm from rowingdata import main as rmain def rootview(request): magicsentence = rmain() - return render(request, 'frontpage.html', {'versionstring': magicsentence}) + loginform = LoginForm() + return render(request, + 'frontpage.html', + { + 'versionstring': magicsentence, + 'form':loginform, + }) diff --git a/static/css/frontstyles.css b/static/css/frontstyles.css new file mode 100644 index 00000000..f41aaf4c --- /dev/null +++ b/static/css/frontstyles.css @@ -0,0 +1,655 @@ +* {box-sizing: border-box;} + + .wrapper { + max-width: 1400px; + width: 100%; + color: white; + font: 1.2em Helvetica, arial, sans-serif; + } + + + .wrapper > * { + /* border: 2px solid #f08c00; */ + border 0; + padding: 5px; + } + + .wrapper nav { + padding: 0; + } + + a { + text-decoration: none; + color: white; + } + + nav ul { + list-style: none; + margin: 0; + display: flex; + justify-content: space-between; + } + + + + footer ul { + list-style: none; + display: flex; + justify-content: space-between; + /* justify-content: flex-start; */ + flex-direction: row; + } + + footer ul ul { + flex-direction: column; + padding-top: 0; + padding-bottom: 0; + padding-left: 0; + padding-right: 2em; + } + + footer li { + margin: 0; + padding-bottom: 0.4em; + } + + footer h1 { + font-weight: bold; + text-align: left; + font-size: 1.0em; + } + + header ul { + list-style: none; + margin: 0; + padding: 0; + } + + aside ul { + margin-bottom: 0; + margin-top: 15px; + margin-bottom: 15px; + left: 15px; + } + + aside h1 { + font-weight: bold; + text-align: left; + font-size: 1.4em; + color: #dddddd; + padding: 15px; + } + + aside ul label, + aside ul a { + padding-left: 15px; + } + + aside ul ul label, + aside ul ul a { + padding-left: 30px; + } + + aside ul ul ul label, + aside ul ul ul a { + padding-left: 45px; + } + + aside ul ul ul ul label, + aside ul ul ul ul a { + padding-left: 60px; + } + + aside li, + aside a, + aside ul label, + aside ul li, + aside ul a, + aside ul ul label, + aside ul ul li, + aside ul ul a, + aside ul ul ul label, + aside ul ul ul li, + aside ul ul ul a { + list-style: none; + margin: 0; + background: #35383d; + } + + + aside ul label:hover, + aside ul a:hover, + aside ul ul label:hover, + aside ul ul a:hover, + aside ul ul ul label:hover, + aside ul ul ul a:hover { + background: #4d5158; + } + + + aside a { + color: #a0f6aa; + text-decoration: none; + padding: 0.2em 0em 0.2em 0em; + } + + + + + aside .cd-accordion-menu { + width: 100%; + max-width: 600px; + background: #35383d; + } + + aside .cd-accordion-menu ul { + /* by default hide all sub menus */ + display: none; + } + + aside .cd-accordion-menu li { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + aside .cd-accordion-menu input[type=checkbox] { + /* hide native checkbox */ + position: absolute; + opacity: 0; + } + + aside .cd-accordion-menu label, + aside .cd-accordion-menu a { + position: relative; + display: block; + color: #dddddd; + font-size: 1.0em; + } + + aside i { + font-size: 1.0em; + } + + aside a::before { + content: '\00a0'; + width: 16px; + height: 16px; + display: inline-block; + font-size: inherit; + text-rendering: auto; + } + + + aside .cd-accordion-menu label::before + { + /* icons */ + font: normal normal normal 1.0em/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + content: '\f0da'; + display: inline-block; + width: 16px; + height: 16px; + + -webkit-transform: translateY(0%); + -moz-transform: translateY(0%); + -ms-transform: translateY(0%); + -o-transform: translateY(0%); + transform: translateY(0%); + } + + aside .cd-accordion-menu label { + cursor: pointer; + } + + + aside .cd-accordion-menu input[type=checkbox]:checked + label::before { + /* rotate arrow */ + -webkit-transform: translateY(20%) rotate(90deg); + -moz-transform: translateY(20%) rotate(90deg); + -ms-transform: translateY(20%) rotate(90deg); + -o-transform: translateY(20%) rotate(90deg); + transform: translateY(20%) rotate(90deg); + + } + + + aside .cd-accordion-menu input[type=checkbox]:checked + label + ul, + aside .cd-accordion-menu input[type=checkbox]:checked + label:nth-of-type(n) + ul { + /* use label:nth-of-type(n) to fix a bug on safari (<= 8.0.8) with multiple adjacent-sibling selectors*/ + /* show children when item is checked */ + display: block; + } + + + main .cd-accordion-menu { + width: 100%; + max-width: 600px; + } + + main .cd-accordion-menu ul { + /* by default hide all sub menus */ + display: none; + } + + main .cd-accordion-menu li { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + + main .cd-accordion-menu input[type=checkbox] { + /* hide native checkbox */ + position: absolute; + opacity: 0; + } + + main .cd-accordion-menu label { + position: relative; + display: block; + font-size: 1.0em; + } + + + + main .cd-accordion-menu ul, + main .cd-accordion-menu li { + list-style: none; + } + + main .cd-accordion-menu label::before + { + /* icons */ + font: normal normal normal 1.0em/1 FontAwesome; + font-size: inherit; + text-rendering: auto; + content: '\f0da'; + display: inline-block; + width: 16px; + height: 16px; + + -webkit-transform: translateY(0%); + -moz-transform: translateY(0%); + -ms-transform: translateY(0%); + -o-transform: translateY(0%); + transform: translateY(0%); + } + + main .cd-accordion-menu label { + cursor: pointer; + } + + + main .cd-accordion-menu input[type=checkbox]:checked + label::before { + /* rotate arrow */ + -webkit-transform: translateY(20%) rotate(90deg); + -moz-transform: translateY(20%) rotate(90deg); + -ms-transform: translateY(20%) rotate(90deg); + -o-transform: translateY(20%) rotate(90deg); + transform: translateY(20%) rotate(90deg); + + } + + + main .cd-accordion-menu input[type=checkbox]:checked + label + ul, + main .cd-accordion-menu input[type=checkbox]:checked + label:nth-of-type(n) + ul { + /* use label:nth-of-type(n) to fix a bug on safari (<= 8.0.8) with multiple adjacent-sibling selectors*/ + /* show children when item is checked */ + display: block; + } + + + + user ul { + list-style: none; + margin: 0; + padding: 0.2em 0.0em 0.2em 0.0em; + display: flex; + justify-content: flex-end; + } + + user a i { + color: #1c75c; + } + + nav li { + margin: 0; + padding: 0.2em; + } + + nav a { + margin: 1em; + } + + nav a, + nav a i { + color: white; + } + + nav li:hover, + nav li:hover a, + nav li:hover a i { + color: #1c75bc; + background: white; + } + + nav li.selected { + color: #1c75bc; + background: white; + } + + .nav-active, + .nav-active a, + .nav-active a i { + color: #1c75bc; + background: white; + } + + + +.main-head { + grid-area: header; + background-color: rgba(0,0,0,0.6); +} + + + +.main-user { + grid-area: user; + background-color: rgba(0,0,0,0.6); +} + +.content { + grid-area: content; + padding: 1.2em 1.2em 1.2em 1.2em; + font-size: 1.3rem; + color: white; + background-color: rgba(0,0,0,0.3) +} + +.content h1 { + font-size 1.3em; + font-weight: normal; +} + +.content label { + color: white; +} + +.content h2 { + font-size 1.2em; + font-weight: normal; +} + +.content h3 { + font-size 1.1em; + font-weight: bold; +} + +.content em { + font-style: italic; +} + + + +.main-nav { + grid-area: nav; + background-color: rgba(28,117,188,0.6); +} + +.side-nav { + grid-area: side-nav; + background-color: rgba(0,0,0,0.6); +} + +.side { + grid-area: sidebar; + background: #35383d; + /* border-top: 1px solid #dddddd; */ + padding: 0; +} + +.sideheader { + grid-area: side-header; + color: #dddddd; + background: #35383d; + padding: 0; +} + +.side h2 { + color: #dddddd; + font-weight: bold; + text-align: left; + font-size: 1.0em; + padding: 5px; + margin: 0; + margin-left: 30px; + padding-bottom: 0; +} + +.sideheader h1 { + font-weight: bold; + text-align: left; + font-size: 1.4em; + color: #dddddd; + padding: 5px; + margin: 0; + margin-left: 30px; + padding-bottom: 0; +} + +.ad { + grid-area: ad; + background: #35383d; + color: #dddddd; + padding: 1em 1em 1em 1em; +} +.main-footer { + grid-area: footer; + background-color: rgba(0,0,0,0.5); + padding: 1.2em 1.2em 1.2em 1.2em; +} + +.wrapper { + display: grid; +/* grid-gap: 2px; */ + grid-template-areas: + "header" + "user" + "nav" + "content" + "footer"; +} + +.main-content { + list-style: none; + margin: 0; +} + + +.main-content li { + margin: 0; + overflow-x: hidden; +} + + + +.main-content li.grid_2 { + grid-column-end: span 1; +} + +.main-content li.grid_3 { + grid-column-end: span 1; +} + +.main-content li.grid_3 { + grid-column-end: span 1; +} + + +.maxheight { + max-height: 300px; + overflow: scroll; +} + +.main-content li.grid_4 { + grid-column-end: span 1; +} +.main-content li.grid_5 { + grid-column-end: span 1; +} + +/** +.main-content li img { + display: block; + width: 100%; + height: auto; + padding: 5px; +} +**/ + + +@media (min-height: 600px) { + .maxheight { + max-height: 450px; + overflow: scroll; + } +} + +@media (min-height: 600px) { + .maxheight { + max-height: 450px; + overflow: scroll; + } +} + +@media (min-height: 800px) { + .maxheight { + max-height: 600px; + overflow: scroll; + } +} + +@media (min-height: 1000px) { + .maxheight { + max-height: 800px; + overflow: scroll; + } +} + + +@media (max-width: 600px) { + nav a { + font-size: 0px; + } + + nav a i { + font-size: 20px; + } +} + +@media (min-width: 450px) { + .wrapper { + grid-template-columns: 1fr 3fr; + grid-template-areas: + "header header header" + "user user user" + "nav nav nav" + "content content content" + "footer footer footer"; + } + + + nav ul { + display: flex; + justify-content: space-between; + } + + header ul { +/* flex-direction: row;*/ + display: flex; + justify-content: space-between; + } + + .main-content { + display: grid; + grid-template-columns: repeat(3,1fr); + grid-gap: 10px; + } + + .main-content li.grid_2 { + grid-column-end: span 2; + } + + .main-content li.grid_3 { + grid-column-end: span 3; + } + + .main-content li.grid_4 { + grid-column-end: span 3; + } + .main-content li.grid_5 { + grid-column-end: span 3; + } + +} + + +@media (min-width: 768px) { + .wrapper { + grid-template-columns: 1fr 4fr 1fr; + grid-template-areas: + "header header header header user" + "nav nav nav nav nav" + "content content content content content" + "footer footer footer footer footer" + } + + nav ul { + flex-direction: row; + } + + header ul { + flex-direction: row; + } + + .main-content { + display: grid; + grid-template-columns: repeat(5,1fr); + grid-gap: 10px; + } + + .main-content li.grid_2 { + grid-column-end: span 2; + } + + .main-content li.grid_3 { + grid-column-end: span 3; + } + + .main-content li.grid_4 { + grid-column-end: span 4; + } + + .main-content li.grid_5 { + grid-column-end: span 5; + } + +} + +@media print { + header, user, nav, aside, footer { + display: none; + } + +aside .cd-accordion-menu.animated label::before { + /* this class is used if you're using jquery to animate the accordion */ + -webkit-transition: -webkit-transform 0.3s; + -moz-transition: -moz-transform 0.3s; + transition: transform 0.3s; +} + + diff --git a/static/css/rowsandall2.css b/static/css/rowsandall2.css index 0a324392..358440c6 100644 --- a/static/css/rowsandall2.css +++ b/static/css/rowsandall2.css @@ -276,6 +276,18 @@ th.rotate > div > span { margin: 2px; } +.whiteborder { + border: solid 1px white; +} + +.frontitem { + background-color: rgba(255,255,255,0.5); + border: solid 1px wite; + padding: 5px; + margin: 5px; + color: black; +} + .vignet { border-radius: 50%; display: block; @@ -701,6 +713,7 @@ th.rotate > div > span { -webkit-border-radius: 2em; -moz-border-radius: 2em; border-radius: 2em; + border: solid 1px white; } .medium { font-size: 1.2em; diff --git a/static/img/analyze.png b/static/img/analyze.png new file mode 100644 index 00000000..8aec50ab Binary files /dev/null and b/static/img/analyze.png differ diff --git a/static/img/compare.png b/static/img/compare.png new file mode 100644 index 00000000..154a7fec Binary files /dev/null and b/static/img/compare.png differ diff --git a/static/img/horizontal_line.png b/static/img/horizontal_line.png new file mode 100644 index 00000000..3c1dc549 Binary files /dev/null and b/static/img/horizontal_line.png differ diff --git a/static/img/log.png b/static/img/log.png new file mode 100644 index 00000000..71251c17 Binary files /dev/null and b/static/img/log.png differ diff --git a/templates/newbase.html b/templates/newbase.html index 0967858d..0fc1b485 100644 --- a/templates/newbase.html +++ b/templates/newbase.html @@ -218,6 +218,13 @@