Atom feed for our EEG site

threads

Changed files
+52 -94
+52 -94
index.html
···
width: 100%;
max-width: 1200px;
margin: 0 auto;
-
padding-right: var(--sidebar-width);
}
.timeline-sidebar {
position: fixed;
top: var(--header-height);
-
right: 0;
width: var(--sidebar-width);
height: calc(100vh - var(--header-height));
background-color: var(--bg-alt-color);
-
border-left: 1px solid var(--border-color);
display: flex;
flex-direction: column;
overflow-y: auto;
···
.timeline-month::before {
content: '';
position: absolute;
-
left: 20px;
top: 50%;
width: 7px;
height: 1px;
···
.timeline-year::after {
content: '';
position: absolute;
-
left: 15px;
top: 50%;
transform: translateY(-50%);
width: 4px;
···
.timeline-month::after {
content: '';
position: absolute;
-
left: 16px;
top: 50%;
transform: translateY(-50%);
width: 2px;
···
.timeline-year.active::after {
width: 8px;
height: 8px;
-
left: 13px;
box-shadow: 0 0 8px var(--accent-shadow);
}
.timeline-month.active::after {
width: 4px;
height: 4px;
-
left: 15px;
}
.feed-item {
···
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
color: var(--text-muted);
-
min-width: 32px;
margin-right: 10px;
-
text-align: right;
}
-
.date-column {
-
position: absolute;
-
left: 0;
-
width: 110px;
-
font-family: 'JetBrains Mono', monospace;
-
color: var(--text-muted);
-
font-size: 0.8rem;
-
text-align: left;
-
padding-left: 15px;
-
}
.month-year-header {
-
position: sticky;
-
top: var(--header-height);
-
background-color: var(--bg-color);
-
z-index: 10;
padding: 8px 0;
-
margin-left: -110px;
-
padding-left: 110px;
width: 100%;
}
.month-year-label {
···
.feed-container {
position: relative;
-
padding-left: 110px; /* Make room for date column */
}
.feed-item-author {
···
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
color: var(--text-muted);
-
min-width: 32px;
margin-right: 15px;
-
text-align: right;
}
.link-item-source {
···
align-items: flex-start;
}
-
.link-item-date, .link-item-source {
margin-bottom: 6px;
}
···
.timeline-sidebar {
top: 140px;
height: calc(100vh - 140px);
}
.tabs {
···
}
.feed-item-date {
-
min-width: 60px;
-
margin-right: 10px;
}
.tabs {
···
.timeline-sidebar {
top: 150px;
height: calc(100vh - 150px);
}
}
</style>
···
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';
-
}
}
}
});
···
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') {
timeline.style.display = 'none';
-
document.querySelector('.content').style.paddingRight = '0';
} else {
timeline.style.display = 'flex';
-
document.querySelector('.content').style.paddingRight = 'var(--sidebar-width)';
// Reset timeline highlighting
document.querySelectorAll('.timeline-year.active, .timeline-month.active').forEach(el => {
···
// Create a timeline structure by year/month
const timeline = new Map();
const monthNames = [
-
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
-
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
];
const shortMonthNames = [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
···
entriesHTML += `
<div class="month-year-header" ${dateAttr}>
-
<div class="date-column">
-
<div class="month-year-label">${monthNames[month]} ${year}</div>
-
</div>
</div>`;
}
···
entriesHTML += `
<article id="${entry.articleId}" class="feed-item" ${dateAttr}>
<div class="feed-item-row">
-
<div class="feed-item-date">${getDayWithOrdinal(date)}</div>
<div class="feed-item-author">${entry.author}</div>
<div class="feed-item-content-wrapper">
<div class="feed-item-title"><a href="${entry.link}" target="_blank">${entry.title}</a></div><div class="feed-item-preview">${entry.contentHtml}</div>
···
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';
-
});
// If we have entries, set the most recent (first) entry's date as active in the timeline
if (entriesArray.length > 0) {
···
lastActiveMonth = month;
}
-
// Show the month header for the most recent month
-
document.querySelectorAll('.month-year-header').forEach(header => {
-
header.style.visibility = 'hidden';
-
});
-
const recentHeader = document.querySelector(`.month-year-header[data-year="${year}"][data-month="${month}"]`);
-
if (recentHeader) {
-
recentHeader.style.visibility = 'visible';
-
}
}
// Helper function to observe all items with date attributes
···
const initialActiveTab = document.querySelector('.tab-button.active').getAttribute('data-tab');
if (initialActiveTab === 'people') {
document.getElementById('timeline-sidebar').style.display = 'none';
-
document.querySelector('.content').style.paddingRight = '0';
} else {
// Initialize the last active date from the first visible item
const selector = initialActiveTab === 'posts' ? '.feed-item' : '.link-item';
···
linksHTML += `
<div class="month-year-header" data-year="${year}" data-month="${month}">
-
<div class="date-column">
-
<div class="month-year-label">${monthNames[month]} ${year}</div>
-
</div>
</div>`;
}
···
// Create link item HTML
linksHTML += `
<div class="link-item" data-year="${date.getFullYear()}" data-month="${date.getMonth()}">
-
<div class="link-item-date">${getLinkDayWithOrdinal(date)}</div>
<div class="link-item-source" title="From: ${link.sourceTitle}">
<a href="${link.sourceLink}" target="_blank" style="color: inherit; text-decoration: none;">
${link.source}
···
// 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';
-
});
// If we have links, set the most recent link's date as active in the timeline for the links tab
if (dedupedLinks.length > 0) {
···
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';
-
}
-
}
}
});
});
···
width: 100%;
max-width: 1200px;
margin: 0 auto;
+
padding-left: var(--sidebar-width);
}
.timeline-sidebar {
position: fixed;
top: var(--header-height);
+
left: 0;
width: var(--sidebar-width);
height: calc(100vh - var(--header-height));
background-color: var(--bg-alt-color);
+
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
overflow-y: auto;
···
.timeline-month::before {
content: '';
position: absolute;
+
right: 20px;
top: 50%;
width: 7px;
height: 1px;
···
.timeline-year::after {
content: '';
position: absolute;
+
right: 15px;
top: 50%;
transform: translateY(-50%);
width: 4px;
···
.timeline-month::after {
content: '';
position: absolute;
+
right: 16px;
top: 50%;
transform: translateY(-50%);
width: 2px;
···
.timeline-year.active::after {
width: 8px;
height: 8px;
+
right: 13px;
box-shadow: 0 0 8px var(--accent-shadow);
}
.timeline-month.active::after {
width: 4px;
height: 4px;
+
right: 15px;
}
.feed-item {
···
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
color: var(--text-muted);
margin-right: 10px;
+
min-width: 120px;
+
white-space: nowrap;
}
+
/* .date-column removed as part of sidebar simplification */
.month-year-header {
padding: 8px 0;
width: 100%;
+
margin-bottom: 5px;
+
margin-top: 10px;
}
.month-year-label {
···
.feed-container {
position: relative;
+
padding-left: 15px; /* Reduced from 110px since we don't need space for date column anymore */
}
.feed-item-author {
···
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
color: var(--text-muted);
+
min-width: 120px;
margin-right: 15px;
+
white-space: nowrap;
}
.link-item-source {
···
align-items: flex-start;
}
+
.link-item-date {
+
margin-bottom: 6px;
+
min-width: auto;
+
width: 100%;
+
}
+
+
.link-item-source {
margin-bottom: 6px;
}
···
.timeline-sidebar {
top: 140px;
height: calc(100vh - 140px);
+
width: 60px; /* Make the sidebar a bit narrower on mobile */
}
.tabs {
···
}
.feed-item-date {
+
min-width: auto;
+
width: 100%;
+
margin-bottom: 5px;
+
}
+
+
.feed-item-row {
+
flex-direction: column;
+
align-items: flex-start;
}
.tabs {
···
.timeline-sidebar {
top: 150px;
height: calc(100vh - 150px);
+
width: 50px; /* Even narrower on very small screens */
+
}
+
+
.content {
+
padding-left: 50px; /* Match the sidebar width on small screens */
}
}
</style>
···
lastActiveMonth = month;
}
+
// Month headers are now simple inline elements, no need to toggle visibility
}
}
});
···
const tabContent = document.querySelector(`.tab-content[data-tab="${tabName}"]`);
tabContent.classList.add('active');
+
// Month headers are now simple inline elements, no need to toggle visibility
// Show or hide timeline sidebar based on active tab
if (tabName === 'people') {
timeline.style.display = 'none';
+
document.querySelector('.content').style.paddingLeft = '0';
} else {
timeline.style.display = 'flex';
+
document.querySelector('.content').style.paddingLeft = 'var(--sidebar-width)';
// Reset timeline highlighting
document.querySelectorAll('.timeline-year.active, .timeline-month.active').forEach(el => {
···
// Create a timeline structure by year/month
const timeline = new Map();
const monthNames = [
+
'January', 'February', 'March', 'April', 'May', 'June',
+
'July', 'August', 'September', 'October', 'November', 'December'
];
const shortMonthNames = [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
···
entriesHTML += `
<div class="month-year-header" ${dateAttr}>
+
<div class="month-year-label">${monthNames[month]} ${year}</div>
</div>`;
}
···
entriesHTML += `
<article id="${entry.articleId}" class="feed-item" ${dateAttr}>
<div class="feed-item-row">
+
<div class="feed-item-date">${monthNames[month]} ${getDayWithOrdinal(date)}, ${year}</div>
<div class="feed-item-author">${entry.author}</div>
<div class="feed-item-content-wrapper">
<div class="feed-item-title"><a href="${entry.link}" target="_blank">${entry.title}</a></div><div class="feed-item-preview">${entry.contentHtml}</div>
···
loadingContainer.style.display = 'none';
feedItemsContainer.innerHTML = entriesHTML;
+
// Month headers are now all visible
// If we have entries, set the most recent (first) entry's date as active in the timeline
if (entriesArray.length > 0) {
···
lastActiveMonth = month;
}
+
// Month headers are now simple inline elements, no need to toggle visibility
}
// Helper function to observe all items with date attributes
···
const initialActiveTab = document.querySelector('.tab-button.active').getAttribute('data-tab');
if (initialActiveTab === 'people') {
document.getElementById('timeline-sidebar').style.display = 'none';
+
document.querySelector('.content').style.paddingLeft = '0';
} else {
// Initialize the last active date from the first visible item
const selector = initialActiveTab === 'posts' ? '.feed-item' : '.link-item';
···
linksHTML += `
<div class="month-year-header" data-year="${year}" data-month="${month}">
+
<div class="month-year-label">${monthNames[month]} ${year}</div>
</div>`;
}
···
// Create link item HTML
linksHTML += `
<div class="link-item" data-year="${date.getFullYear()}" data-month="${date.getMonth()}">
+
<div class="link-item-date">${monthNames[date.getMonth()]} ${getLinkDayWithOrdinal(date)}, ${date.getFullYear()}</div>
<div class="link-item-source" title="From: ${link.sourceTitle}">
<a href="${link.sourceLink}" target="_blank" style="color: inherit; text-decoration: none;">
${link.source}
···
// Update the links container
linksContainer.innerHTML = linksHTML;
+
// Month headers in links view are now all visible
// If we have links, set the most recent link's date as active in the timeline for the links tab
if (dedupedLinks.length > 0) {
···
if (yearEl) yearEl.classList.add('active');
if (monthEl) monthEl.classList.add('active');
+
// Month headers are now simple inline elements, no need to toggle visibility
}
});
});