4,114
edits
No edit summary Tag: Manual revert |
No edit summary Tag: Reverted |
||
Line 33: | Line 33: | ||
} | } | ||
} | } | ||
// Check if there are any images and set up the initial content | |||
if (cardImages.length > 0) { | |||
var initialImage = cardImages[0]; // Use the first image initially | |||
// Set up image toggle if more than one image is found | // Set up image toggle if more than one image is found | ||
Line 58: | Line 61: | ||
}; | }; | ||
// Update the fixed column content | |||
$('#article-title').html('<p class="article-entry-number">' + entryNumber + '</p><p class="article-people">' + people + '</p>'); | $('#article-title').html('<p class="article-entry-number">' + entryNumber + '</p><p class="article-people">' + people + '</p>'); | ||
$('#article-content').html( | $('#article-content').html( | ||
Line 91: | Line 94: | ||
'<div class="article-modification-date">' + formatSimpleDate(modificationDate) + '</div>' | '<div class="article-modification-date">' + formatSimpleDate(modificationDate) + '</div>' | ||
); | ); | ||
} | |||
function getImageHtml(image) { | |||
return '<div class="image-container">' + | |||
'<img src="' + image.src + '" alt="' + image.alt + '">' + | |||
'<div class="' + image.captionClass + '">' + image.caption + '</div>' + | |||
'</div>'; | |||
} | |||
function formatParagraphs(text) { | function formatParagraphs(text) { | ||
// Split the text into paragraphs and wrap each in a <span> | // Split the text into paragraphs and wrap each in a <span> | ||
Line 121: | Line 125: | ||
event.stopPropagation(); | event.stopPropagation(); | ||
}); | }); | ||
// Attach a mousedown event listener to close the fixed column | // Attach a mousedown event listener to close the fixed column |