<?php
if ($blog->entries)
{
	while ($data = $blog->entries())
	{
		$entry_init = entry_show_init($data['entryContent'], $data['entrySlug']);
		echo "<article".($data['entryPinned'] ? ' class="pinned"' : '').(strlen(strip_tags($entry_init)) <= 210 ? ' class="tweet"' : '')." title='".show_date($data['entryPublished'])."'>
				<header>
					<h2><a href='".get_entry_link($data['entrySlug'])."'>".htmlspecialchars($data['entryTitle'])."</a></h2>
					<p class='meta'><time class='date' title='{locale:published_on}'>".show_date($data['entryPublished'])."</time><a href='".get_profile_link($data['userName'])."' class='by' title='{locale:entry_by}'>$data[publicName]</a></p>
				</header>
				<div class='content'>".$entry_init."</div>
			</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[entry_not_found_title]</h1>"
		."<p>$_locale[entry_not_found]</p>\n";