ajoute balise <article>

This commit is contained in:
fredtempez 2020-09-02 09:08:27 +02:00
parent 6dd3f034cb
commit 0ffe4f7b40
2 changed files with 111 additions and 107 deletions

View File

@ -1,4 +1,5 @@
<div class="row"> <article>
<div class="row">
<div class="col10"> <div class="col10">
<div class="blogDate"> <div class="blogDate">
<i class="far fa-calendar-alt"></i> <i class="far fa-calendar-alt"></i>
@ -14,18 +15,18 @@
]); ?> ]); ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']); ?> <?php $pictureSize = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']); ?>
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) { <?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picturePosition']) . echo '<img class="blogArticlePicture blogArticlePicture' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picturePosition']) .
' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . ' pict' . $pictureSize . '" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) .
'" alt="' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '">'; '" alt="' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '">';
} ?> } ?>
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?> <?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>
<p class="clearBoth signature"><?php echo $module::$articleSignature;?></p> <p class="clearBoth signature"><?php echo $module::$articleSignature;?></p>
<?php if($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'closeComment'])): ?> <?php if($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'closeComment'])): ?>
<p>Cet article ne reçoit pas de commentaire.</p> <p>Cet article ne reçoit pas de commentaire.</p>
<?php else: ?> <?php else: ?>
<h3 id="comment"> <h3 id="comment">
<?php $commentsNb = count($module::$comments); ?> <?php $commentsNb = count($module::$comments); ?>
<?php $s = $commentsNb === 1 ? '': 's' ?> <?php $s = $commentsNb === 1 ? '': 's' ?>
@ -94,9 +95,9 @@
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>
<?php endif;?> <?php endif;?>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php foreach($module::$comments as $commentId => $comment): ?> <?php foreach($module::$comments as $commentId => $comment): ?>
<div class="block"> <div class="block">
@ -107,5 +108,6 @@
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
</div> </div>
<?php echo $module::$pages; ?> <?php echo $module::$pages; ?>
</article>

View File

@ -21,6 +21,7 @@
</a> </a>
</div> </div>
<div class="col9"> <div class="col9">
<article>
<h1 class="blogTitle"> <h1 class="blogTitle">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>"> <a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">
<?php echo $article['title']; ?> <?php echo $article['title']; ?>
@ -40,6 +41,7 @@
<?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>... <?php echo helper::subword(strip_tags($article['content']), 0, 400); ?>...
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a> <a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
</p> </p>
</article>
</div> </div>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>