Skip to content

Commit 01024a9

Browse files
committed
update search index for publications, add new papers, update news
1 parent c07bfd8 commit 01024a9

2 files changed

Lines changed: 169 additions & 26 deletions

File tree

src/News_Training/new-publications.html

Lines changed: 168 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,54 @@
165165
background: var(--btn-primary-bg, #80abc1);
166166
color: white;
167167
}
168+
.year-section {
169+
margin-bottom: 1.5rem;
170+
border: 1px solid #ddd;
171+
border-radius: 8px;
172+
background: #fff;
173+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
174+
}
175+
.year-section[open] {
176+
border-color: #2e3b92;
177+
}
178+
.year-header {
179+
font-size: 1.3rem;
180+
font-weight: 700;
181+
color: #2e3b92;
182+
cursor: pointer;
183+
padding: 1rem 1.5rem;
184+
list-style: none;
185+
display: flex;
186+
align-items: center;
187+
gap: 0.5rem;
188+
user-select: none;
189+
}
190+
.year-header::-webkit-details-marker {
191+
display: none;
192+
}
193+
.year-header::before {
194+
content: "▶";
195+
font-size: 0.9rem;
196+
transition: transform 0.2s;
197+
margin-right: 0.5rem;
198+
}
199+
.year-section[open] .year-header::before {
200+
transform: rotate(90deg);
201+
}
202+
.year-header:hover {
203+
background-color: #f8f9fa;
204+
}
205+
.year-count {
206+
font-size: 0.85rem;
207+
font-weight: normal;
208+
color: #666;
209+
background: #f0f0f0;
210+
padding: 0.2rem 0.5rem;
211+
border-radius: 4px;
212+
}
213+
.year-content {
214+
padding: 0 1.5rem 1.5rem 1.5rem;
215+
}
168216

169217
.empty-state {
170218
text-align: center;
@@ -227,31 +275,10 @@ <h2 class="subsection-title"><i class="fas fa-newspaper"></i> Latest News & Anno
227275
<!-- Recent Publications Section -->
228276
<section>
229277
<h2 class="subsection-title"><i class="fas fa-book-open"></i> Recent Publications</h2>
230-
231-
<div class="publication-item">
232-
<div class="publication-meta">
233-
<span><i class="far fa-calendar-alt"></i> Feb 1, 2026</span>
234-
<span><i class="fas fa-book"></i> Hepatology Communications</span>
235-
</div>
236-
<div class="publication-title">Short-term costs of alcohol-associated hepatitis care in different clinical settings</div>
237-
<div class="publication-authors">Nguyen CM, Su J, Li Y, Healey R, Jiang S, Li J, Chalasani N, Gawrieh S, Liangpunsakul S, Tu W</div>
238-
<div class="publication-journal">Hepatology Communications. 2026 Feb 1;10(2):e0634.</div>
239-
<div class="publication-links">
240-
<a class="publication-link" href="https://pmc.ncbi.nlm.nih.gov/articles/PMC11781763/" target="_blank" rel="noopener noreferrer">View Paper</a>
241-
<a class="publication-link" href="https://journals.lww.com/hepcomm/fulltext/2025/02010/short_term_costs_of_alcohol_associated_hepatitis.10.aspx" target="_blank" rel="noopener noreferrer">Journal Link</a>
242-
</div>
243-
</div>
244-
245-
<div class="publication-item">
246-
<div class="publication-meta">
247-
<span><i class="far fa-calendar-alt"></i> 2026</span>
248-
<span><i class="fas fa-book"></i> Hepatology</span>
249-
</div>
250-
<div class="publication-title">Real-world impact of AUD pharmacotherapy on healthcare utilization, cost, and cost-effectiveness in the US</div>
251-
<div class="publication-authors">Nguyen CM, Blaney HL, Su J, Jiang S, Li Y, Li Y, Gawrieh S, Tu W, Liangpunsakul S</div>
252-
<div class="publication-journal">Hepatology. :10-97.</div>
253-
<div class="publication-links">
254-
<a class="publication-link" href="../Publishing/publications.html" target="_blank" rel="noopener noreferrer">Publication List</a>
278+
<div id="recentPublicationsContainer">
279+
<div class="empty-state">
280+
<i class="fas fa-book-open"></i>
281+
<p>Loading recent publications...</p>
255282
</div>
256283
</div>
257284
</section>
@@ -265,7 +292,123 @@ <h2 class="subsection-title"><i class="fas fa-book-open"></i> Recent Publication
265292
<script src="../bootstrap.min.js"></script>
266293
<script src="../simple-dropdown.js"></script>
267294
<script>
295+
function extractPublicationParts(content) {
296+
const firstBreak = content.indexOf('. ');
297+
if (firstBreak === -1) {
298+
return {
299+
authors: '',
300+
title: content,
301+
journal: '',
302+
};
303+
}
304+
305+
const authors = content.slice(0, firstBreak + 1).trim();
306+
const remainder = content.slice(firstBreak + 2).trim();
307+
const secondBreak = remainder.indexOf('. ');
308+
309+
if (secondBreak === -1) {
310+
return {
311+
authors: authors,
312+
title: remainder,
313+
journal: '',
314+
};
315+
}
316+
317+
return {
318+
authors: authors,
319+
title: remainder.slice(0, secondBreak).trim(),
320+
journal: remainder.slice(secondBreak + 2).trim(),
321+
};
322+
}
323+
324+
function extractPmid(content) {
325+
const match = content.match(/PMID:\s*(\d+)/i);
326+
return match ? match[1] : null;
327+
}
328+
329+
function extractJournalName(journalText) {
330+
const match = journalText.match(/^([^.;]+(?:\.[^.;]+)*)/);
331+
return match ? match[1].trim() : 'Publication';
332+
}
333+
334+
function buildPublicationCard(publication, year) {
335+
const parts = extractPublicationParts(publication.content);
336+
const pmid = extractPmid(publication.content);
337+
const journalName = extractJournalName(parts.journal);
338+
const links = [];
339+
340+
if (pmid) {
341+
links.push(
342+
`<a class="publication-link" href="https://pubmed.ncbi.nlm.nih.gov/${pmid}/" target="_blank" rel="noopener noreferrer">PubMed</a>`
343+
);
344+
}
345+
346+
return `
347+
<div class="publication-item">
348+
<div class="publication-meta">
349+
<span><i class="far fa-calendar-alt"></i> ${year}</span>
350+
<span><i class="fas fa-book"></i> ${journalName}</span>
351+
</div>
352+
<div class="publication-title">${parts.title || publication.content}</div>
353+
<div class="publication-authors">${parts.authors}</div>
354+
<div class="publication-journal">${parts.journal}</div>
355+
${links.length ? `<div class="publication-links">${links.join('')}</div>` : ''}
356+
</div>
357+
`;
358+
}
359+
360+
function renderRecentPublications() {
361+
const yearsToShow = ['2026', '2025'];
362+
363+
$.getJSON('../Publishing/doc/all_publications.json')
364+
.done(function(data) {
365+
const yearSections = [];
366+
367+
yearsToShow.forEach(function(year, index) {
368+
const publications = data.publicationsByYear[year] || [];
369+
370+
if (!publications.length) {
371+
return;
372+
}
373+
374+
const publicationCards = publications.map(function(publication) {
375+
return buildPublicationCard(publication, year);
376+
}).join('');
377+
378+
yearSections.push(`
379+
<details class="year-section" ${index === 0 ? 'open' : ''}>
380+
<summary class="year-header">${year} <span class="year-count">${publications.length} publications</span></summary>
381+
<div class="year-content">
382+
${publicationCards}
383+
</div>
384+
</details>
385+
`);
386+
});
387+
388+
if (!yearSections.length) {
389+
$('#recentPublicationsContainer').html(`
390+
<div class="empty-state">
391+
<i class="fas fa-book-open"></i>
392+
<p>No recent publications available.</p>
393+
</div>
394+
`);
395+
return;
396+
}
397+
398+
$('#recentPublicationsContainer').html(yearSections.join(''));
399+
})
400+
.fail(function() {
401+
$('#recentPublicationsContainer').html(`
402+
<div class="empty-state">
403+
<i class="fas fa-book-open"></i>
404+
<p>Unable to load recent publications.</p>
405+
</div>
406+
`);
407+
});
408+
}
409+
268410
$(function() {
411+
renderRecentPublications();
269412
$("#navbar-include").load("../navbar.html", function() {
270413
$("#navbar-include a").each(function() {
271414
var href = $(this).attr("href");

src/searchIndex.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"title": "News & Publications - AlcHepNet",
154154
"url": "News_Training/new-publications.html",
155155
"snippet": "News & Publications Latest updates, announcements, and publications from AlcHepNet Latest News & Announcements Jan 2026 News ITAALD Trial Enrollment Began Clinical Trial The ITAALD trial started enrollment in January 2026. The first two patients were...",
156-
"content": "News & Publications Latest updates, announcements, and publications from AlcHepNet Latest News & Announcements Jan 2026 News ITAALD Trial Enrollment Began Clinical Trial The ITAALD trial started enrollment in January 2026. The first two patients were enrolled at the Cleveland Clinic. Congratulations to the Cleveland Clinic team! Recent Publications Feb 1, 2026 Hepatology Communications Short-term costs of alcohol-associated hepatitis care in different clinical settings Nguyen CM, Su J, Li Y, Healey R, Jiang S, Li J, Chalasani N, Gawrieh S, Liangpunsakul S, Tu W Hepatology Communications. 2026 Feb 1;10(2):e0634. View Paper Journal Link 2026 Hepatology Real-world impact of AUD pharmacotherapy on healthcare utilization, cost, and cost-effectiveness in the US Nguyen CM, Blaney HL, Su J, Jiang S, Li Y, Li Y, Gawrieh S, Tu W, Liangpunsakul S Hepatology. :10-97. Publication List"
156+
"content": "News & Publications Latest updates, announcements, and publications from AlcHepNet Latest News & Announcements Jan 2026 News ITAALD Trial Enrollment Began Clinical Trial The ITAALD trial started enrollment in January 2026. The first two patients were enrolled at the Cleveland Clinic. Congratulations to the Cleveland Clinic team! Recent Publications Loading recent publications..."
157157
},
158158
{
159159
"title": "Training MI-MET - AlcHepNet",

0 commit comments

Comments
 (0)