Merge branch 'feature/issue_#2/hyperlinks_in_titles' of https://github.com/sergiotarxz/micro

This commit is contained in:
sergiotarxz 2020-07-28 18:54:49 +02:00
commit 0b38b3c791
1 changed files with 13 additions and 4 deletions

View File

@ -2,12 +2,17 @@
<section class="content">
<?php foreach ($content as $page): ?>
<article class="page">
<?php if($page->title()): ?>
<header>
<h2><?php echo $page->title() ?></h2>
<?php if ( $page->title() ): ?>
<h2>
<a href="<?php echo htmlentities($page->permalink(), ENT_QUOTES | ENT_HTML401)?>">
<?php
echo htmlentities( $page->title() );
?>
</a>
</h2>
<?php endif; ?>
</header>
<?php endif ?>
<?php if ($page->coverImage()): ?>
<img src="<?php echo $page->coverImage() ?>" alt="<?php echo $page->slug() ?>">
<?php endif ?>
@ -15,6 +20,10 @@
<?php echo $page->content() ?>
<footer>
<a href="<?php echo htmlentities($page->permalink(), ENT_QUOTES | ENT_HTML401)?>">
<?php echo htmlentities( $L->get('Read this article.') ); ?>
</a>
<br/>
<?php echo $page->date() ?>
</footer>
</article>