<article class="uk-article tm-article" <?php if ($permalink) echo 'data-permalink="'.$permalink.'"'; ?>>

	<div class="tm-article-wrapper">

		<?php if ($image && $image_alignment == 'none') : ?>
		<div class="tm-article-featured-image">
			<?php if ($url) : ?>
				<a class="uk-overlay uk-overlay-hover" href="<?php echo $url; ?>" title="<?php echo $image_caption; ?>">
					<img class="uk-overlay-scale" src="<?php echo $image; ?>" alt="<?php echo $image_alt; ?>">
					<div class="uk-overlay-panel uk-overlay-background uk-overlay-icon uk-overlay-fade"></div>
				</a>
			<?php else : ?>
				<img src="<?php echo $image; ?>" alt="<?php echo $image_alt; ?>">
			<?php endif; ?>
		</div>
		<?php endif; ?>

		<?php if ($image && $image_alignment != 'none') : ?>
		<div class="tm-article-featured-image">
			<?php if ($url) : ?>
				<a href="<?php echo $url; ?>" title="<?php echo $image_caption; ?>">
				<img class="uk-overlay-scale" src="<?php echo $image; ?>" alt="<?php echo $image_alt; ?>"></a>
			<?php else : ?>
				<img src="<?php echo $image; ?>" alt="<?php echo $image_alt; ?>">
			<?php endif; ?>
		</div>
		<?php endif; ?>

		<?php if ($title) : ?>
		<h2 class="uk-article-title">
			<?php if ($url && $title_link) : ?>
				<a href="<?php echo $url; ?>" title="<?php echo strip_tags($title); ?>"><?php echo $title; ?></a>
			<?php else : ?>
				<?php echo $title; ?>
			<?php endif; ?>
		</h2>
		<?php endif; ?>

		<?php if ($edit) : ?>
		<p class="tm-article-icons"><?php echo $edit; ?></p>
		<?php endif; ?>

		<?php echo $hook_aftertitle; ?>

		<?php if ($author || $category || $date || $modify_date || $publish_date || $hits) : ?>
		<p class="uk-article-meta">

		<?php

			$author   		  = ($author && $author_url) ? '<a href="'.$author_url.'">'.$author.'</a>' : $author;
			$date     		  = ($date) ? ($datetime ? '<time datetime="'.$datetime.'">'.JHtml::_('date', $date, JText::_('DATE_FORMAT_LC3')).'</time>' : JHtml::_('date', $date, JText::_('DATE_FORMAT_LC3'))) : '';
			$publish_date     = ($publish_date) ? ($datetime ? '<time datetime="'.$datetime.'">'.JHtml::_('date', $publish_date, JText::_('DATE_FORMAT_LC3')).'</time>' : JHtml::_('date', $date, JText::_('DATE_FORMAT_LC3'))) : '';
    		$modify_date      = ($modify_date) ? ($datetime ? '<time datetime="'.$datetime.'">'.JHtml::_('date', $modify_date, JText::_('DATE_FORMAT_LC3')).'</time>' : JHtml::_('date', $date, JText::_('DATE_FORMAT_LC3'))) : '';
			$category 		  = ($category && $category_url) ? '<a href="'.$category_url.'">'.$category.'</a>' : $category;

			if($author && $date) {
				printf(JText::_('TPL_WARP_META_AUTHOR_DATE'), $author, $date);
			} elseif ($author) {
				printf(JText::_('TPL_WARP_META_AUTHOR'), $author);
			} elseif ($date) {
				printf(JText::_('TPL_WARP_META_DATE'), $date);
			}

		    if ($publish_date) {  
		        echo ' ';  
		        printf(JText::_('TPL_WARP_META_DATE_PUBLISHED'), $publish_date);  
		    }

		    if ($modify_date) {  
		        echo ' ';  
		        printf(JText::_('TPL_WARP_META_DATE_MODIFIED'), $modify_date);  
		    }

			if ($hits) {
				echo ' ';
				printf(JText::_('COM_CONTENT_ARTICLE_HITS'), $hits);
			}

			if ($category) {
				echo ' ';
				printf(JText::_('TPL_WARP_META_CATEGORY'), $category);
				echo '. ';
			}

		?>
		</p>

		<?php endif; ?>

		<?php echo $hook_beforearticle; ?>
		<div class="tm-article-content uk-margin-top-remove">

			<?php if ($article) : ?>
			<div class="tm-article">
				<?php echo $article; ?>
			</div>
			<?php endif; ?>

			<?php if ($more) : ?>
			<p><a class="uk-button uk-button-primary uk-button-large uk-margin-top" href="<?php echo $url; ?>" title="<?php echo $title; ?>"><?php echo $more; ?></a></p>
			<?php endif; ?>
		</div>

	</div>

	<?php if ($previous || $next) : ?>
	<ul class="uk-pagination">
		<?php if ($previous) : ?>
		<li class="uk-pagination-previous">
			<?php echo $previous; ?>
			<i class="uk-icon-double-angle-left"></i>
		</li>
		<?php endif; ?>

		<?php if ($next) : ?>
		<li class="uk-pagination-next">
			<?php echo $next; ?>
			<i class="uk-icon-double-angle-right"></i>
		</li>
		<?php endif; ?>
	</ul>
	<?php endif; ?>

	<?php echo $hook_afterarticle; ?>

	<?php if ($tags) : ?>
	<p class="tm-tags-list"><?php echo $tags; ?></p>
	<?php endif; ?>

</article>