{% extends "newsroom/base.html" %}
{% block flag_update_stamp %}Last updated {{edition.published_on|date:"F j, Y"}}{% endblock %}

{% block content %}
{% load typogrify convert_tags markup %}

<td colspan="3" valign="top" bgcolor="white" cellpadding="0" cellspacing="0" > 
                    
<div style="padding-left:10px; padding-top:5px; padding-right:0px; padding-bottom:10px">
        
        <div style="float:right; width:260px; padding:0px; margin-left:15px; margin-right:0px; margin-top:0px; margin-bottom:5px">
			<!-- AddThis Follow BEGIN -->
			<div style="padding:2px">
			<div style="float:left">
				<p class="followus_text">Follow us</p>
			</div>
			<div class="addthis_toolbox addthis_32x32_style addthis_default_style" style="float:left; padding:3px">
				<a class="addthis_button_facebook_follow" addthis:userid="penobscotbaypress"></a>
				<a class="addthis_button_youtube_follow" addthis:userid="penobscotbaypress"></a>
				<a class="addthis_button_rss_follow" addthis:userid="https://penobscotbaypress.com/news/feed.xml"></a>
			</div>
			</div>
				<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-5107e6726693e514"></script>
			<!-- AddThis Follow END -->
			
			<!-- Webcams BEGIN -->
			<div style="clear:both">
				<p style="margin:0; padding:0; display:block" class="sectionheader_blue">WEBCAMS</p>
				{% for cam in webcams %}
				<div style="float:left; width:120px; padding:4px; margin:0">
					<span class="webcamteaser" style="width:120px; text-align:center"><a href="{{cam.get_absolute_url}}">{{cam.title}}</a></span>
					<a href="{{cam.get_absolute_url}}">
					<img src="{{cam.thumb_file}}" alt="{{cam}}" name="myCam" width="120" border="0"></a>
					</a>
				</div>
				{% endfor %}
			</div>
			<!-- Webcams END -->
			
			<!-- Block Ad BEGIN -->
        	<div style="clear:both; padding:1px">
				{% load adzone_tags %} 
				<p>{% random_zone_ad '' 'cn-block' %}</p>
    		</div>
			<!-- Block Ad END -->

        </div>
        
		<div align="left" style="width:450px">
			{% if edition.featured_photo %}
			<h4 style="margin-top:0; text-align:left">
			<a href="{% if edition.featured_photo.story_set.all %}{% for s in edition.featured_photo.story_set.all %}
			{% if forloop.first %}{{s.get_absolute_url}}{%endif%}{%endfor%}{%else%}{{edition.featured_photo.get_absolute_url}}{%endif%}">
			<img src="{{edition.featured_photo.get_lead_large_url}}" alt="{{edition.featured_photo.title}}" border=0/></a>
			<br>
			{% load typogrify %}
			<a href="{% if edition.featured_photo.story_set.all %}{% for s in edition.featured_photo.story_set.all %}
			{% if forloop.first %}{{s.get_absolute_url}}{%endif%}{%endfor%}{%else%}
			{{edition.featured_photo.get_absolute_url}}{%endif%}">{{edition.featured_photo.title|typogrify }}...</a>
			{% if edition.featured_photo.photographer%}<br>Photo by {{edition.featured_photo.photographer }}{% endif %}
			{% if edition.featured_photo.courtesy %}<br>Photo courtesy of {{edition.featured_photo.courtesy }}{% endif %}
			</h4>
			{% else %}
			<p style="text-align:left">Sorry, we are experiencing technical difficulties. Please check back soon.</p>
			{% endif %}
    	</div>
    	
    	<div style="width:545px; padding:8px; clear:both" align="left">
				<h2 class="sectionhead">News Features</h2>
				{% for edition in latest_editions %}
					<h2 class="datehead_new">{{edition.published_on|date:"l, F j, Y"}}</h2>
					{% load markup typogrify humanize  %}
					{% if edition.stories.published %}  
					{% for story in edition.stories.published|dictsortreversed:"weight" %}
	
					{% ifequal story.weight 100 %}
					<p style="text-align:left"><span class="reddata">BREAKING NEWS</span><br>
					<span class="teaser">{{story.dateline}}</span><br>
					{% if story.kicker %}<span class="kicker">{{story.kicker|typogrify}}</span><br />{% endif %}
					<span class="headline"><a href="{{story.get_absolute_url}}">{{story.web_hed|typogrify}}</a></span>
					</p>
					{% else %}
					<p style="text-align:left"><span class="teaser">{{story.dateline}}</span><br>
					   {% if story.kicker %}<span class="kicker">{{story.kicker|typogrify}}</span><br />{% endif %}
						 <span class="headline"><a href="{{story.get_absolute_url}}">{{story.web_hed|typogrify}}</a></span>
					  </p>
					{% endifequal %}	
					{% endfor %}	
					{% endif %}
 
					{% if edition.movies.all %}  
					{% for movie in edition.movies.all|dictsortreversed:"weight" %}
					<p style="text-align:left"><span class="teaser-alt">Movie</span><br>
						 <span class="headline"><a href="{{movie.get_absolute_url}}">{{movie.title|typogrify}}</a></span>
					  </p>
					{% endfor %}	
					{% endif %}

					{% if edition.slideshows.all %}  
					{% for slideshow in edition.slideshows.all %}
					<p style="text-align:left"><span class="teaser-alt">Slideshow</span><br>
						 <span class="headline"><a href="{{slideshow.get_absolute_url}}">{{slideshow.title|typogrify}}</a></span>
					  </p>
					{% endfor %}	
					{% endif %}

					{% if edition.pdfdocuments.all %}
					{% for doc in edition.pdfdocuments.all %}
					<p style="text-align:left"><span class="teaser-alt">PDF Document</span><br>
						 <span class="headline"><a href="{{doc.get_absolute_url}}">{{doc.title|typogrify}}</a></span>
					  </p>
					{% endfor %}
					{% endif %}

					{% if edition.galleries.published %}  
					{% for gallery in edition.galleries.published %}
					<p style="text-align:left"><span class="teaser-alt">Gallery</span><br>
						 <span class="headline"><a href="{{gallery.get_absolute_url}}">{{gallery.title|typogrify}}</a></span>
					  </p>
					{% endfor %}	
					{% endif %}

					{% if edition.photos.published %}
					{% for photo in edition.photos.published %}
						<p style="text-align:left"><span class="teaser-alt">Photo</span><br>
					   {% if photo.kicker %}<span class="kicker">{{photo.kicker|typogrify}}</span><br />{% endif %}
						 <span class="headline"><a href="{{photo.get_absolute_url}}">{{photo.title|typogrify}}</a></span>
					  </p>
					{% endfor %}
					{% endif %}
				{% endfor %}
		</div>

		<div style="width:545px; padding:8px">
				<h2 class="sectionhead">Local Headlines</h2>
					{% if latest_other_editions %}
					{% for edition in latest_other_editions %}
					<p style="text-align:left"><span class="teaser">{{edition.featured_story.dateline}}</span><br>
					   <span class="paper"><em>{{edition.paper}}</em>, {{edition.published_on|date:"M j, Y"}}</span><br>
					   {% if edition.featured_story.kicker %}<span class="kicker">{{edition.featured_story.kicker|typogrify}}</span><br />{% endif %}
					   <span class="headline"><a href="http://{{edition.site.domain}}/{{edition.featured_story.get_relative_url}}">{{edition.featured_story.web_hed|typogrify}}</a></span>
					</p>
					{% endfor %}
					{% else %}
					<p style="text-align:left">Sorry, we are experiencing technical difficulties. Please check back soon.</p>
					{% endif %}
		</div>  

</div>
</td>
{% endblock %}
