Mercurial > public > sg101
comparison gpp/templates/potd/view.html @ 491:7dbdbb08e68c
For #233; add social media sharing buttons to the photo of the day app.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 20 Oct 2011 01:00:19 +0000 |
parents | 88b2b9cb8c1f |
children | 3c48a555298d |
comparison
equal
deleted
inserted
replaced
490:f0f3966ea44f | 491:7dbdbb08e68c |
---|---|
1 {% extends 'base.html' %} | 1 {% extends 'base.html' %} |
2 {% load url from future %} | 2 {% load url from future %} |
3 {% load core_tags %} | |
3 {% load comment_tags %} | 4 {% load comment_tags %} |
4 {% load script_tags %} | 5 {% load script_tags %} |
5 {% block title %}Photo Of The Day{% endblock %} | 6 {% block title %}Photo Of The Day{% endblock %} |
7 {% block custom_meta %} | |
8 {% open_graph_meta_tags potd %} | |
9 {% endblock %} | |
6 {% block custom_css %} | 10 {% block custom_css %} |
7 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/potd.css" /> | 11 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/potd.css" /> |
8 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/comments.css" /> | 12 <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/comments.css" /> |
9 {% endblock %} | 13 {% endblock %} |
10 {% block custom_js %} | 14 {% block custom_js %} |
11 {% script_tags "markitup jquery-ui" %} | 15 {% script_tags "markitup jquery-ui" %} |
12 <script type="text/javascript" src="{{ STATIC_URL }}js/comments.js"></script> | 16 <script type="text/javascript" src="{{ STATIC_URL }}js/comments.js"></script> |
13 {% endblock %} | 17 {% endblock %} |
18 {% block begin_body %}{% include 'core/social_sharing_begin.html' %}{% endblock %} | |
14 {% block content %} | 19 {% block content %} |
15 {% if is_current %} | 20 {% if is_current %} |
16 <h2>Photo Of The Day</h2> | 21 <h2>Photo Of The Day</h2> |
17 <h3>{% now "l, F d, Y" %}</h3> | 22 <h3>{% now "l, F d, Y" %}</h3> |
18 {% else %} | 23 {% else %} |
26 Submitted by | 31 Submitted by |
27 <a href="{% url 'bio-view_profile' username=potd.user.username %}">{{ potd.user.username }}</a> | 32 <a href="{% url 'bio-view_profile' username=potd.user.username %}">{{ potd.user.username }}</a> |
28 on {{ potd.date_added|date:"d F Y" }}.<br /> | 33 on {{ potd.date_added|date:"d F Y" }}.<br /> |
29 This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}. | 34 This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}. |
30 </p> | 35 </p> |
31 <p class="description">{{ potd.description|safe }}</p> | 36 <div class="description">{{ potd.description|safe }}</div> |
32 <p class="details"> | 37 <p class="details"> |
33 If you would like us to feature your photo, send it along with your username, a title, and | 38 If you would like us to feature your photo, send it along with your username, a title, and |
34 short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>. | 39 short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>. |
35 </p> | 40 </p> |
41 {% social_sharing potd.caption potd.get_absolute_url %} | |
36 {% get_comment_count for potd as comment_count %} | 42 {% get_comment_count for potd as comment_count %} |
37 <p>This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p> | 43 <p>This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p> |
38 <hr /> | 44 <hr /> |
39 </div> | 45 </div> |
40 {% render_comment_list potd %} | 46 {% render_comment_list potd %} |
48 {% endif %} | 54 {% endif %} |
49 {% else %} | 55 {% else %} |
50 <p>We're sorry, there doesn't seem to be a photo of the day right now.</p> | 56 <p>We're sorry, there doesn't seem to be a photo of the day right now.</p> |
51 {% endif %} | 57 {% endif %} |
52 {% endblock %} | 58 {% endblock %} |
59 {% block end_body %}{% include 'core/social_sharing_end.html' %}{% endblock %} |