Atom feed for our EEG site

more

Changed files
+47 -1
+47 -1
index.html
···
lastActiveMonth = month;
+
// Fixed month header overlap issue
+
// First hide all month headers
+
document.querySelectorAll('.month-year-header').forEach(header => {
+
header.style.visibility = 'hidden';
+
});
+
+
// Only show the current month header
+
const currentHeader = document.querySelector(`.month-year-header[data-year="${year}"][data-month="${month}"]`);
+
if (currentHeader) {
+
currentHeader.style.visibility = 'visible';
+
}
});
···
// Activate selected tab
button.classList.add('active');
-
document.querySelector(`.tab-content[data-tab="${tabName}"]`).classList.add('active');
+
const tabContent = document.querySelector(`.tab-content[data-tab="${tabName}"]`);
+
tabContent.classList.add('active');
+
+
// Reset month header visibility when switching tabs
+
if (tabName === 'posts' || tabName === 'links') {
+
const monthHeaders = tabContent.querySelectorAll('.month-year-header');
+
monthHeaders.forEach((header, index) => {
+
header.style.visibility = index === 0 ? 'visible' : 'hidden';
+
});
+
}
// Show or hide timeline sidebar based on active tab
if (tabName === 'people') {
···
loadingContainer.style.display = 'none';
feedItemsContainer.innerHTML = entriesHTML;
+
// Initialize month headers - hide all except first one
+
const monthHeaders = document.querySelectorAll('.month-year-header');
+
monthHeaders.forEach((header, index) => {
+
header.style.visibility = index === 0 ? 'visible' : 'hidden';
+
});
+
// Helper function to observe all items with date attributes
function observeAllDateItems() {
// Observe all feed items for scroll tracking
···
// Update the links container
linksContainer.innerHTML = linksHTML;
+
// Initialize month headers in links view - hide all except first one
+
const linkMonthHeaders = document.querySelectorAll('#link-items .month-year-header');
+
linkMonthHeaders.forEach((header, index) => {
+
header.style.visibility = index === 0 ? 'visible' : 'hidden';
+
});
+
// Process people data
const peopleContainer = document.querySelector('.people-container');
const peopleMap = new Map(); // Map to store people data
···
if (yearEl) yearEl.classList.add('active');
if (monthEl) monthEl.classList.add('active');
+
+
// Update month header visibility when clicking timeline
+
// Hide all headers
+
activeTab.querySelectorAll('.month-year-header').forEach(header => {
+
header.style.visibility = 'hidden';
+
});
+
+
// Show only the clicked month header
+
if (month !== null && month !== undefined) {
+
const clickedHeader = activeTab.querySelector(`.month-year-header[data-year="${year}"][data-month="${month}"]`);
+
if (clickedHeader) {
+
clickedHeader.style.visibility = 'visible';
+
}
+
}
});
});