···
1074
+
// Fixed month header overlap issue
1075
+
// First hide all month headers
1076
+
document.querySelectorAll('.month-year-header').forEach(header => {
1077
+
header.style.visibility = 'hidden';
1080
+
// Only show the current month header
1081
+
const currentHeader = document.querySelector(`.month-year-header[data-year="${year}"][data-month="${month}"]`);
1082
+
if (currentHeader) {
1083
+
currentHeader.style.visibility = 'visible';
···
button.classList.add('active');
1095
-
document.querySelector(`.tab-content[data-tab="${tabName}"]`).classList.add('active');
1106
+
const tabContent = document.querySelector(`.tab-content[data-tab="${tabName}"]`);
1107
+
tabContent.classList.add('active');
1109
+
// Reset month header visibility when switching tabs
1110
+
if (tabName === 'posts' || tabName === 'links') {
1111
+
const monthHeaders = tabContent.querySelectorAll('.month-year-header');
1112
+
monthHeaders.forEach((header, index) => {
1113
+
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;
1674
+
// Initialize month headers - hide all except first one
1675
+
const monthHeaders = document.querySelectorAll('.month-year-header');
1676
+
monthHeaders.forEach((header, index) => {
1677
+
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;
1924
+
// Initialize month headers in links view - hide all except first one
1925
+
const linkMonthHeaders = document.querySelectorAll('#link-items .month-year-header');
1926
+
linkMonthHeaders.forEach((header, index) => {
1927
+
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');
2068
+
// Update month header visibility when clicking timeline
2069
+
// Hide all headers
2070
+
activeTab.querySelectorAll('.month-year-header').forEach(header => {
2071
+
header.style.visibility = 'hidden';
2074
+
// Show only the clicked month header
2075
+
if (month !== null && month !== undefined) {
2076
+
const clickedHeader = activeTab.querySelector(`.month-year-header[data-year="${year}"][data-month="${month}"]`);
2077
+
if (clickedHeader) {
2078
+
clickedHeader.style.visibility = 'visible';