added sharing buttons
This commit is contained in:
@@ -7,6 +7,24 @@
|
||||
|
||||
|
||||
{% 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 %}
|
||||
{% leaflet_js %}
|
||||
@@ -22,6 +40,18 @@
|
||||
});
|
||||
});
|
||||
</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 %}
|
||||
|
||||
{% block main %}
|
||||
@@ -80,16 +110,38 @@
|
||||
controls
|
||||
to move around in the video and play it.</p>
|
||||
<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>
|
||||
<p>Once you are happy with the alignment, you can save the analysis, and share with other people.</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>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="grid_2">
|
||||
<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>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="main-content">
|
||||
{% if analysis %}
|
||||
<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="background:none;border:0;"><i class="fas fa-copy"></i></button>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="main-content">
|
||||
<li class="grid_2">
|
||||
<div id="theplot" class="flexplot mapdiv">
|
||||
{{ mapdiv | safe}}
|
||||
@@ -602,6 +654,8 @@ document.getElementById("dataplay").appendChild(dataplay);
|
||||
// datastop.value = "Stop";
|
||||
// document.getElementById("datastop").appendChild(datastop)
|
||||
|
||||
|
||||
|
||||
dataplay.onclick = function() {
|
||||
if (lock.checked) {
|
||||
dataplaying = false;
|
||||
|
||||
Reference in New Issue
Block a user