Compare commits

..

2 Commits

Author SHA1 Message Date
rodude123 00851d37b8 Merge pull request 'Fixed small tiny issue with the carousel having less the maximum number of visible items i.e. none in the hidden div' (#57) from older-blog-posts-fix into master
🚀 Deploy website on push / 🎉 Deploy (push) Successful in 17s
Reviewed-on: #57
2024-11-04 22:39:51 +00:00
rodude123 a55ba6ce2f Fixed small tiny issue with the carousel having less the maximum number of visible items i.e. none in the hidden div
🚀 Deploy website on push / 🎉 Deploy (push) Successful in 20s
Signed-off-by: rodude123 <rodude123@gmail.com>
2024-11-04 22:39:04 +00:00
3 changed files with 9 additions and 6 deletions
-5
View File
@@ -673,11 +673,6 @@ EOD;
*/
public function changeHTMLSrc(string $body, string $to, string $from): string
{
// $body = preg_replace_callback('/>([^<]+)</', function($matches) {
// // Convert special characters to HTML entities
// return '>' . htmlentities(trim($matches[1]), ENT_QUOTES | ENT_HTML5, 'UTF-8') . '<';
// }, $body);
$htmlDoc = new DOMDocument();
// Load the raw HTML content into DOMDocument
+1 -1
View File
File diff suppressed because one or more lines are too long
+8
View File
@@ -376,6 +376,14 @@ function carouselLoop(carouselInner, allItems)
visibleCards.push(cards[i]);
}
if (allItems.children.length === 0)
{
// if there are no cards in the carousel, don't show the arrows
prev.style.visibility = 'hidden';
next.style.visibility = 'hidden';
return;
}
next.addEventListener('click', () =>
{
const firstCard = visibleCards.shift();