Login

Share button

Author:
carlosvin
Posted:
January 14, 2011
Language:
HTML/template
Version:
1.2
Score:
4 (after 4 ratings)

This template can be included by other template passing the vars page_url and title: {% with content.get_url as page_url %} {% with content.title as title %} {% include 'share.html' %} {% endwith %} {% endwith %}

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{% autoescape on %}

{% with "http://carlosvin.alwaysdate.net" as host %}
{% with "Share in" as share_txt %}

{% with "twitter" as service %}
<a href="http://twitter.com/share?url={{ host }}{{ page_url }}&amp;text={{ title }}" target="_blank" title="{{ share_txt }} {{ service }}">
    <img src="http://carlosvin.alwaysdate.net/templates/img/tw.png" alt="{{ share_txt }} {{ service }}"/>
</a>
{% endwith%}

{% with "facebook" as service %}
<a href="http://www.facebook.com/share.php?u={{ host }}{{ page_url }}&amp;t={{ title }}" target="_blank" title="{{ share_txt }} {{ service }}">
    <img src="http://carlosvin.alwaysdate.net/templates/img/fb.png" alt="{{ share_txt }} {{ service }}"/>
</a>
{% endwith %}

{% with "linkedin" as service %}
<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url={{ host }}{{ page_url }}&amp;title={{ title }}&amp;ro=false&amp;summary=&amp;source=" target="_blank" title="{{ share_txt }} {{ service }}">
    <img src="http://carlosvin.alwaysdate.net/templates/img/ln.png" alt="{{ share_txt }} {{ service }}"/>
</a>
{% endwith %}

{% with "reader" as service %}
<a href="http://www.google.com/reader/link?title={{ title }}&amp;url={{ host }}{{ page_url }}" target="_blank" title="{{ share_txt }} {{ service }}">
    <img src="http://carlosvin.alwaysdate.net/templates/img/rd.png" alt="{{ share_txt }} {{ service }}"/>
</a>
{% endwith %}

{% with "buzz" as service %}
<a href="http://www.google.com/buzz/post?message={{ title }}&amp;url={{ host }}{{ page_url }}" target="_blank" title="{{ share_txt }} {{ service }}">
    <img src="http://carlosvin.alwaysdate.net/templates/img/bz.png" alt="{{ share_txt }} {{ service }}"/>
</a>
{% endwith %}

{% endwith %}
{% endwith %}

{% endautoescape %}

More like this

  1. Bootstrap Accordian by Netplay4 7 years, 9 months ago
  2. Bootstrap theme for django-endless-pagination? by se210 10 years, 9 months ago
  3. Bootstrap theme for django-endless-pagination? by se210 10 years, 9 months ago
  4. Reusable form template with generic view by roldandvg 10 years, 10 months ago
  5. Pagination Django with Boostrap by guilegarcia 11 years ago

Comments

carlosvin (on January 14, 2011):

I have pasted the source of my own website images, but you can use whatever image source.

#

Please login first before commenting.