Lire la suite WIP

This commit is contained in:
Fred Tempez 2023-03-23 07:56:45 +01:00
parent 65a12d0e25
commit c85f208837
3 changed files with 18 additions and 2 deletions

View File

@ -100,4 +100,18 @@
#rssFeed p {
display: inline;
vertical-align: top;
}
}
article {
position: relative;
/* Autres styles pour les articles coupés */
}
article
.read-more-btn {
position: absolute;
bottom: 10px;
right: 10px;
z-index: 1;
/* Autres styles pour le bouton */
}

View File

@ -147,7 +147,8 @@
<p class="blogContent">
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) !== 0 ? $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) : 500 ?>
<?php echo helper::subword(strip_tags($article['content'], '<br><p>'), 0, $lenght); ?>...
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>">Lire la suite</a>
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>"><button class="read-more-btn">Lire la suite</button></a>
</p>
</div>
</div>

View File

@ -46,6 +46,7 @@
&& strlen($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'content'])) >= $this->getData(['module', $this->getUrl(0), 'config', 'height'])
): ?>
<?php echo ' ... <a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '"><span class="newsSuite">lire la suite</span></a>'; ?>
<?php endif; ?>
</div>
</div>