Skip to content
Permalink
Browse files

[fix bug 904601] Add social sharing links to event detail pages

  • Loading branch information...
alexgibson committed Aug 15, 2013
1 parent ffe277e commit 34016d32e24b263f1d0d97a78acdc9ac17db2e80
@@ -1476,3 +1476,64 @@ input.datepicker {
background-color: #eee;
border-radius: 10px;
}

/* -----------------------------------------
Social Share
----------------------------------------- */

.social-share {
list-style-type: none;
margin: 20px 0 0 0;
padding: 0;

li {
display: inline-block;
margin-left: 10px;
zoom: 1;
*display: inline;
a {
display: block;
height: 34px;
width: 34px;
overflow: hidden;
text-indent: 100%;
white-space: nowrap;
background-color: transparent;
background-image: url('/media/img/remo/social-icons.png');
background-repeat: no-repeat;
&:hover {
cursor: pointer;
}
&.fb {
background-position: -50px 0px;
}
&.fb:hover,
&.fb:focus {
background-position: -50px -100px;
}
&.tw {
background-position: -100px 0px;
}
&.tw:hover,
&.tw:focus {
background-position: -100px -100px;
}
&.gp {
background-position: 0px 0px;
}
&.gp:hover,
&.gp:focus {
background-position: 0 -100px;
}
}
}
}

@media only screen and (max-width: 767px) {
.social-share {
text-align: center;
li {
margin: 0 5px;
}
}
}
Binary file not shown.
@@ -108,3 +108,11 @@ def get_event_category_link(category):

url = reverse('events_list_events')
return urlparams(url, '/category/%s/' % category.lower())


@register.function
def get_event_link(event):
"""Returns events url."""

return (settings.SITE_URL +
reverse('events_view_event', kwargs={'slug': event.slug}))
@@ -155,6 +155,40 @@ <h4 class="event-single-title">{{ event.name }}</h4>
</p>
</div>
</div>
<div class="row">
<div class="one columns pictogram">
o
</div>
<div class="eleven columns">
{% set event_link = get_event_link(event) %}
<ul class="social-share">
<li>
<a class="fb has-tip tip-bottom"
title="Share on Facebook"
target="_blank"
href="https://www.facebook.com/sharer/sharer.php?{{ event_link }}">
Facebook
</a>
</li>
<li>
<a class="tw has-tip tip-bottom"
title="Share on Twitter"
target="_blank"
href="http://twitter.com/share?url={{ event_link }}&amp;via=mozillareps&amp;text=Mozilla Reps - {{ event.name }}">
Twitter
</a>
</li>
<li>
<a class="gp has-tip tip-bottom"
title="Share on Google+"
target="_blank"
href="https://plus.google.com/share?url={{ event_link }}&amp;hl=en-US">
Google +
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="seven columns">
<div class="row">

0 comments on commit 34016d3

Please sign in to comment.
You can’t perform that action at this time.