Targoyle on Nostr: ``` function loadImagesForDate(separatorElement, date) { const imageObjsForDate = ...
```
function loadImagesForDate(separatorElement, date) {
const imageObjsForDate = images.filter(imageObj => imageObj.date.slice(0, 7) === date);
imageObjsForDate.reverse();
imageObjsForDate.forEach(function (imageObj, index) {
var imageContainer = document.createElement("div");
imageContainer.className = "imageContainer";
var imgElement = document.createElement("img");
imgElement.src = baseImageUrl + imageObj.name;
imgElement.title = imageObj.date;
imgElement.loading = "lazy";
imgElement.onclick = openModal;
imageContainer.appendChild(imgElement);
imageGrid.insertBefore(imageContainer, separatorElement.nextSibling);
});
separatorElement.classList.add('loaded');
separatorElement.style.color = '#515151';
}
```
function loadImagesForDate(separatorElement, date) {
const imageObjsForDate = images.filter(imageObj => imageObj.date.slice(0, 7) === date);
imageObjsForDate.reverse();
imageObjsForDate.forEach(function (imageObj, index) {
var imageContainer = document.createElement("div");
imageContainer.className = "imageContainer";
var imgElement = document.createElement("img");
imgElement.src = baseImageUrl + imageObj.name;
imgElement.title = imageObj.date;
imgElement.loading = "lazy";
imgElement.onclick = openModal;
imageContainer.appendChild(imgElement);
imageGrid.insertBefore(imageContainer, separatorElement.nextSibling);
});
separatorElement.classList.add('loaded');
separatorElement.style.color = '#515151';
}
```