Private
Public Access
1
0

Merge branch 'release/v10.69'

This commit is contained in:
Sander Roosendaal
2019-12-14 10:43:02 +01:00
4 changed files with 69 additions and 17 deletions

View File

@@ -7,6 +7,24 @@
{% block title %}Workout Video{% endblock %} {% block title %}Workout Video{% endblock %}
{% block og_title %}{{ analysis.name }}{% endblock %}
{% block description %}Rowing Video Analysis:{{ analysis.name }}{% endblock %}
{% block og_description %}Rowing Video Analysis:{{ analysis.name }}{% endblock %}
{% block og_image %}
{% if analysis %}
<meta property="og:image" content="https://img.youtube.com/vi/{{ analysis.video_id }}/hqdefault.jpg" />
<meta property="og:image:secure_url" content="https://img.youtube.com/vi/{{ analysis.video_id }}/hqdefault.jpg" />
{% else %}
<meta property="og:image" content="http://rowsandall.com/static/img/logo_r.png" />
<meta property="og:image:secure_url" content="https://rowsandall.com/static/img/logo_r.png" />
{% endif %}
{% endblock %}
{% if analysis %}
{% block image_src %}
<link rel="image_src" href="https://img.youtube.com/vi/{{ analysis.video_id }}/hqdefault.jpg" />
{% endblock %}
{% endif %}
{% block meta %} {% block meta %}
{% leaflet_js %} {% leaflet_js %}
@@ -22,6 +40,18 @@
}); });
}); });
</script> </script>
<script>
function copyText() {
var tempInput = document.createElement("input");
tempInput.style = "position: absolute; left: -1000px; top: -1000px";
tempInput.value = "https://rowsandall.com/rowers/video/{{ analysis.id|encode }}/";
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand("copy");
alert("Copied to clipboard: " + tempInput.value);
document.body.removeChild(tempInput);
}
</script>
{% endblock %} {% endblock %}
{% block main %} {% block main %}
@@ -80,16 +110,39 @@
controls controls
to move around in the video and play it.</p> to move around in the video and play it.</p>
<p>You can make manual adjustments to the delay to fine tune the alignment. <p>You can make manual adjustments to the delay to fine tune the alignment.
Once you are finished, check "Lock Video and Data" to lock the video and the data.</p> Once you are finished, check "Lock Video and Data" to lock the video and the data.</p>
<p>Once you are happy with the alignment, you can save the analysis, and share with other people.</p> <p>Once you are happy with the alignment, you can save the analysis, and
share with other people.</p>
</li> </li>
{% else %} {% else %}
<li class="grid_2"> <li class="grid_2">
<p>Playing the video will advance the data in synchronization. Use the regular <p>Playing the video will advance the data in synchronization. Use the regular
YouTube controls to move around in the video and play it.</p> YouTube controls to move around in the video and play it.</p>
</li>
{% endif %} {% endif %}
</ul> {% if analysis %}
<ul class="main-content"> <li class="grid_2">
<span class="fb-share-button" style="height:20px; vertical-align: top;"
data-href="https://rowsandall.com/rowers/video/{{ analysis.id|encode }}"
data-layout="button" data-size="small" data-mobile-iframe="false">
<a class="fb-xfbml-parse-ignore" target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https://rowsandall.com/rowers/video/{{ analysis.id|encode }}/">
Share</a>
</span>
<span>
<a class="twitter-share-button"
href="https://twitter.com/intent/tweet"
data-url="https://rowsandall.com/rowers/video/{{ analysis.id|encode }}/"
data-text="@rowsandall #rowingdata">Tweet</a>
</span>
<span>
<button title="Copy Shareable Link" onclick="copyText()"
style="color:#1c75bc;background:none;border:0;"><i class="fas fa-copy"></i></button>
</span>
</li>
{% endif %}
</ul>
<ul class="main-content">
<li class="grid_2"> <li class="grid_2">
<div id="theplot" class="flexplot mapdiv"> <div id="theplot" class="flexplot mapdiv">
{{ mapdiv | safe}} {{ mapdiv | safe}}
@@ -602,6 +655,8 @@ document.getElementById("dataplay").appendChild(dataplay);
// datastop.value = "Stop"; // datastop.value = "Stop";
// document.getElementById("datastop").appendChild(datastop) // document.getElementById("datastop").appendChild(datastop)
dataplay.onclick = function() { dataplay.onclick = function() {
if (lock.checked) { if (lock.checked) {
dataplaying = false; dataplaying = false;
@@ -637,8 +692,6 @@ dataplay.onclick = function() {
}); });
</script> </script>
<script type="text/javascript" src="https://bernii.github.io/gauge.js/dist/gauge.js"></script>
<script type="text/javascript" src="{% static 'js/videogauges.js' %}"></script>
{% endlanguage %} {% endlanguage %}
{% endblock %} {% endblock %}

View File

@@ -19,7 +19,7 @@
{% block og_description %}{{ workout.name }} {% block og_description %}{{ workout.name }}
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %} {{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
{% for graph in graphs %}
{% block og_image %} {% block og_image %}
{% if graphs %} {% if graphs %}
{% for graph in graphs %} {% for graph in graphs %}
@@ -39,7 +39,6 @@
{% endfor %} {% endfor %}
{% endblock %} {% endblock %}
{% endfor %}
{% block main %} {% block main %}
<h1>{{ workout.name }}</h1> <h1>{{ workout.name }}</h1>
@@ -63,10 +62,10 @@
{% endif %} {% endif %}
<p> <p>
<div class="fb-share-button" <div class="fb-share-button"
data-href="https://rowsandall.com/rowers/workout/{{ workout.id|encode }}" data-href="https://rowsandall.com/rowers/workout/{{ workout.id|encode }}/"
data-layout="button" data-size="small" data-mobile-iframe="false"> data-layout="button" data-size="small" data-mobile-iframe="false">
<a class="fb-xfbml-parse-ignore" target="_blank" <a class="fb-xfbml-parse-ignore" target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https://rowsandall.com/rowers/workout/{{ workout.id|encode }}"> href="https://www.facebook.com/sharer/sharer.php?u=https://rowsandall.com/rowers/workout/{{ workout.id|encode }}/">
Share Share
</a> </a>
</div> </div>
@@ -74,7 +73,7 @@
<p> <p>
<a class="twitter-share-button" <a class="twitter-share-button"
href="https://twitter.com/intent/tweet" href="https://twitter.com/intent/tweet"
data-url="https://rowsandall.com/rowers/workout/{{ workout.id|encode }}" data-url="https://rowsandall.com/rowers/workout/{{ workout.id|encode }}/"
data-text="@rowsandall #rowingdata">Tweet</a> data-text="@rowsandall #rowingdata">Tweet</a>
</p> </p>
<table width=100%> <table width=100%>

View File

@@ -84,7 +84,7 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.middleware.common.BrokenLinkEmailsMiddleware', 'django.middleware.common.BrokenLinkEmailsMiddleware',
'django.middleware.gzip.GZipMiddleware', 'django.middleware.gzip.GZipMiddleware',
'htmlmin.middleware.HtmlMinifyMiddleware', # 'htmlmin.middleware.HtmlMinifyMiddleware',
# 'htmlmin.middleware.MarkRequestMiddleware', # 'htmlmin.middleware.MarkRequestMiddleware',
'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',

View File

@@ -41,8 +41,8 @@ var opts = {
staticZones: [ staticZones: [
{strokeStyle: "#00FF00", min: 0, max: 2}, // Greem {strokeStyle: "#00FF00", min: 0, max: 2}, // Greem
{strokeStyle: "#0000FF", min: 2, max: 3}, // Blue` {strokeStyle: "#0000FF", min: 2, max: 3}, // Blue`
{strokeStyle: "#00FFFF", min: 3, max: 4}, // Yellow {strokeStyle: "#00FFFF", min: 3, max: 4}, // Cyan
{strokeStyle: "#FFDD00", min: 4, max: 5}, // Purple {strokeStyle: "#FFDD00", min: 4, max: 5}, // Orange
{strokeStyle: "#FF0000", min: 5, max: 6} // Red {strokeStyle: "#FF0000", min: 5, max: 6} // Red
], ],