<?php
if ($blog->entries)
{
	while ($data = $blog->entries())
	{
		$entry_init = entry_show_init($data['entryContent'], $data['entrySlug']);
		echo "<article".($data['entryPinned'] ? ' class="pinned"' : null).(strlen(strip_tags($entry_init)) <= 210 ? ' class="tweet"' : null)." title='".show_date($data['entryPublished'])."' itemscope itemtype='http://schema.org/Article'>
				<a href='".get_entry_link($data['entrySlug'])."'><header".($data['entryHeader'] ? " style='background-image:url($data[entryHeader])'" : null).">
					<div>
						<h2 itemprop='name'>".htmlspecialchars($data['entryTitle'])."</h2>
					</div>
				</header></a>
				<div class='content' itemprop='articleBody'>".$entry_init."</div>
				<p class='meta'>
					<a href='".get_entry_link($data['entrySlug'])."' class='date' title='{locale:published_on}' itemprop='datePublished' content='".date('Y-m-d', $data['entryPublished'])."'>".show_date($data['entryPublished'])."</a>
					<span itemprop='author' itemscope itemtype='http://schema.org/Person'>
						<a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}' itemprop='url'><span itemprop='name'>$data[publicName]</span></a>
					</span>
				</p>
			</article>\n";
		unset($entry_init);
	}
	echo "<p class='paginator'>".(isset($seo[1]) && isnum($seo[1]) ? "<a href='/p/".($seo[1]-1)."' class='prev'>{locale:prev_page}</a><a href='/p/".($seo[1]+1)."' class='next'>{locale:next_page}</a>" : "<a href='/p/2' class='next'>{locale:next_page}</a>")."</p>";
} else
	echo "<h1>{locale:no_more_title}</h1>"
		."<p>{locale:no_more}</p>\n";