added FB and Twitter share buttons
This commit is contained in:
@@ -13,7 +13,22 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<h1>{{ workout.name }}</h1>
|
||||
<div class="grid_12">
|
||||
<div class="grid_1 alpha">
|
||||
<div class="fb-share-button" data-href="https://rowsandall.com/rower/graph/{{ graph.id }}" 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/graph/{{ graph.id }}&src=sdkpreparse">Share</a></div>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<a class="twitter-share-button"
|
||||
href="https://twitter.com/intent/tweet"
|
||||
data-url="https://rowsandall.com/rowers/graph/{{ graph.id }}"
|
||||
data-text="@rowsandall">Tweet</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
<div class="grid_12">
|
||||
<div class="grid_2 alpha">
|
||||
{% if user.is_authenticated and user == rower.user %}
|
||||
<p>
|
||||
@@ -34,7 +49,7 @@
|
||||
<p> </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="grid_12">
|
||||
<p>
|
||||
<a href="/{{ graph.filename }}" download="myimage">
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
{% load staticfiles %}
|
||||
{% load rowerfilters %}
|
||||
{% load tz %}
|
||||
|
||||
|
||||
{% get_current_timezone as TIME_ZONE %}
|
||||
|
||||
{% block title %}{{ workout.name }}{% endblock %}
|
||||
@@ -67,6 +69,20 @@
|
||||
<td>
|
||||
<a href="/rowers/workout/{{ workout.id }}">https://rowsandall.com/rowers/workout/{{ workout.id }}</a>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Share to</th>
|
||||
<td>
|
||||
<div class="grid_1 alpha">
|
||||
<div class="fb-share-button" data-href="https://rowsandall.com/rowers/workout/{{ workout.id }}" 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/workout/{{ workout.id }}&src=sdkpreparse">Share</a></div>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<a class="twitter-share-button"
|
||||
href="https://twitter.com/intent/tweet"
|
||||
data-url="https://rowsandall.com/rowers/workout/{{ workout.id }}"
|
||||
data-text="@rowsandall">Tweet</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Comments</th>
|
||||
<td>
|
||||
|
||||
@@ -28,6 +28,17 @@
|
||||
|
||||
|
||||
<h1>{{ workout.name }}</h1>
|
||||
<div class="grid_1 alpha">
|
||||
<div class="fb-share-button" data-href="https://rowsandall.com/rowers/workout/{{ workout.id }}" 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/workout/{{ workout.id }}&src=sdkpreparse">Share</a></div>
|
||||
</div>
|
||||
<div class="grid_1">
|
||||
<a class="twitter-share-button"
|
||||
href="https://twitter.com/intent/tweet"
|
||||
data-url="https://rowsandall.com/rowers/workout/{{ workout.id }}"
|
||||
data-text="@rowsandall">Tweet</a>
|
||||
</div>
|
||||
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<th>Rower:</th><td>{{ first_name }} {{ last_name }}</td>
|
||||
|
||||
@@ -64,6 +64,7 @@ INSTALLED_APPS = [
|
||||
'cookielaw',
|
||||
'django_extensions',
|
||||
'tz_detect',
|
||||
'django_social_share',
|
||||
]
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
{% load rowerfilters %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block teams %}
|
||||
{% if user.is_authenticated and user|has_teams %}
|
||||
<div class="grid_1 alpha dropdown">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% load leaflet_tags %}
|
||||
{% load cookielaw_tags %}
|
||||
|
||||
{% load tz_detect %}
|
||||
{% tz_detect %}
|
||||
{% load analytical %}
|
||||
@@ -42,8 +43,34 @@
|
||||
{% block meta %} {% endblock %}
|
||||
{% leaflet_js %}
|
||||
{% leaflet_css %}
|
||||
<div id="fb-root"></div>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.async=true;
|
||||
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10&appId=694685920739849";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
<link rel="stylesheet" href="https://webapiv2.navionics.com/dist/webapi/webapi.min.css" >
|
||||
<script type="text/javascript" src="https://webapiv2.navionics.com/dist/webapi/webapi.min.no-dep.js"></script>
|
||||
<script>window.twttr = (function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0],
|
||||
t = window.twttr || {};
|
||||
if (d.getElementById(id)) return t;
|
||||
js = d.createElement(s);
|
||||
js.id = id;
|
||||
js.async=true;
|
||||
js.src = "https://platform.twitter.com/widgets.js";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
|
||||
t._e = [];
|
||||
t.ready = function(f) {
|
||||
t._e.push(f);
|
||||
};
|
||||
|
||||
return t;
|
||||
}(document, "script", "twitter-wjs"));</script>
|
||||
{% analytical_head_bottom %}
|
||||
</head>
|
||||
<body data-root="http://webapiv2.navionics.com/dist/webapi/images">
|
||||
|
||||
Reference in New Issue
Block a user