···
+
// 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}"]`);
+
currentHeader.style.visibility = 'visible';
···
button.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';
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
+
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}"]`);
+
clickedHeader.style.visibility = 'visible';