gremmie@1
|
1 {% extends 'base.html' %}
|
gremmie@1
|
2 {% load comment_tags %}
|
gremmie@1
|
3 {% block title %}Photo Of The Day{% endblock %}
|
gremmie@1
|
4 {% block custom_css %}
|
gremmie@1
|
5 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/potd.css" />
|
gremmie@1
|
6 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/comments.css" />
|
gremmie@1
|
7 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}js/markitup/skins/markitup/style.css" />
|
gremmie@1
|
8 <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}js/markitup/sets/markdown/style.css" />
|
gremmie@1
|
9 {% endblock %}
|
gremmie@1
|
10 {% block custom_js %}
|
gremmie@1
|
11 <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.2.6.min.js"></script>
|
gremmie@1
|
12 <script type="text/javascript" src="{{ MEDIA_URL }}js/comments.js"></script>
|
gremmie@1
|
13 <script type="text/javascript" src="{{ MEDIA_URL }}js/markitup/jquery.markitup.pack.js"></script>
|
gremmie@1
|
14 <script type="text/javascript" src="{{ MEDIA_URL }}js/markitup/sets/markdown/set.js"></script>
|
gremmie@1
|
15 {% endblock %}
|
gremmie@1
|
16 {% block content %}
|
gremmie@1
|
17 <h2>Photo Of The Day</h2>
|
gremmie@1
|
18 <h3>{% now "l, F d, Y" %}</h3>
|
gremmie@1
|
19 <div class="potd-details">
|
gremmie@1
|
20 {% if potd %}
|
gremmie@1
|
21 <img src="{{ potd.photo.url }}" alt="{{ potd.caption }}" title="{{ potd.caption }}" />
|
gremmie@1
|
22 <p class="caption">{{ potd.caption }}</p>
|
gremmie@1
|
23 <p class="details">
|
gremmie@1
|
24 Submitted by
|
gremmie@1
|
25 <a href="{% url bio-view_profile username=potd.user.username %}">{{ potd.user.username }}</a>
|
gremmie@1
|
26 on {{ potd.date_added|date:"d F Y" }}.<br />
|
gremmie@1
|
27 This photo has been Photo of the Day {{ potd.potd_count }} time{{ potd.potd_count|pluralize }}.
|
gremmie@1
|
28 </p>
|
gremmie@1
|
29 <p class="description">{{ potd.description }}</p>
|
gremmie@1
|
30 <p class="details">
|
gremmie@1
|
31 If you would like us to feature your photo, send it along with your username, a title, and
|
gremmie@1
|
32 short description to <a href="mailto:admin@surfguitar101.com">admin@surfguitar101.com</a>.
|
gremmie@1
|
33 </p>
|
gremmie@1
|
34 {% get_comment_count for potd as comment_count %}
|
gremmie@1
|
35 <p>This photo has <span id="comment-count">{{ comment_count }}</span> comment{{ comment_count|pluralize }}.</p>
|
gremmie@1
|
36 <hr />
|
gremmie@1
|
37 </div>
|
gremmie@1
|
38 {% render_comment_list potd %}
|
gremmie@1
|
39 {% if potd.can_comment_on %}
|
gremmie@1
|
40 <p>Leave a comment?</p>
|
gremmie@1
|
41 {% render_comment_form for potd %}
|
gremmie@1
|
42 {% else %}
|
gremmie@1
|
43 <p>Comments are allowed only on today's photo of the day. If you'd like to share your thoughts on this photo
|
gremmie@1
|
44 with the site staff, you can <a href="{% url contact-form %}">contact us directly</a>.</p>
|
gremmie@1
|
45 {% endif %}
|
gremmie@1
|
46 {% else %}
|
gremmie@1
|
47 <p>We're sorry, there doesn't seem to be a photo of the day right now.</p>
|
gremmie@1
|
48 {% endif %}
|
gremmie@1
|
49 {% endblock %}
|