{% extends "base.html" %}

{% block title %}Photo archive{%endblock %}
{% block rel-img %}{{object.get_display_url}}{% endblock %}
{% block description %}{{object.description}}{% endblock %}

{% block content %}
<td align="center" valign="top" bgcolor="white" width="565" colspan="2">
  <table width="444" border="0" cellspacing="8" cellpadding="0">
<td colspan="2" valign="top" bgcolor="white" width="565">
  <div style="padding-left:12px; padding-right:12px; padding-top:12px; background:white; ">
    <img src="http://www.penobscotbaypress.com/images/headers/newsfeature542.gif" alt="News Feature" height="32" width="542" border="0"><br>
    <h2 align=center ><a class="return" style="align:center;" href="{% url dr-index %}">Return to  Archives &amp; Multimedia</a></h2>
    <h2>Photos</h2>
  </div>
    {% for photo in latest%}
  <div class="gallery" style="padding-left:12px">
    <span class="paper"><em>{{photo.published_on|date:"M j, Y"}}</em></span><br />
    <h3><a href="{{photo.get_absolute_url}}" alt="{{photo}}" >{{photo}}</a><br></h3>
    <h4>{% if photo.photographer %}Photos by {{photo.photographer}}{% endif %}</h4><br/>
    {% load markup typogrify humanize  %}
    <p>
    <img style="padding-right:10px; float:left" src="{{photo.get_thumbnail_url}}" alt="{{photo}}" />
    {{photo.description|typogrify|markdown|truncatewords:30}}
    </p>
    {% if photo.story_set.all %}
    <p> 
       {% for s in photo.story_set.all %}
       <a href="{{s.get_absolute_url}}" alt="{{s}}">Related story</a><br />
       {% endfor %}
    </p>
    {% endif %}
  </div>
  <br />
  {% endfor %}
</td>
  </table>				  
</td>
{% endblock %}
