← back to Crazy News Channel
Article view: render a real outbound link to a story's source article
f79b2f19b288323c8c3ed0d9c87946ef6c5e04ec · 2026-09-24 08:03:52 -0700 · Steve Abrams
renderArticleContent() now checks source.sourceUrl and, when present,
renders a real <a target="_blank" rel="noopener noreferrer"> pointing at
it ("Read the full story at <source> →"). Prepares the article view for
RSS-backed stories, which carry a real sourceUrl/sourceName and have no
full article text of their own to show.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01166faVcwiztzWqhHwD9yer
Files touched
Diff
commit f79b2f19b288323c8c3ed0d9c87946ef6c5e04ec
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Sep 24 08:03:52 2026 -0700
Article view: render a real outbound link to a story's source article
renderArticleContent() now checks source.sourceUrl and, when present,
renders a real <a target="_blank" rel="noopener noreferrer"> pointing at
it ("Read the full story at <source> →"). Prepares the article view for
RSS-backed stories, which carry a real sourceUrl/sourceName and have no
full article text of their own to show.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01166faVcwiztzWqhHwD9yer
---
index.html | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/index.html b/index.html
index 6906d9b..0a77848 100644
--- a/index.html
+++ b/index.html
@@ -541,6 +541,17 @@ body.breaking-mode .ticker-track { color: #ff5959; font-weight: 800; }
.live-update-headline { font-weight: 800; margin-bottom: .3rem; }
.live-update-detail { color: var(--text-dim); font-size: .92rem; }
.live-update-concluded { margin-top: .5rem; }
+.article-source-link { margin-top: 1rem; }
+.article-source-link a {
+ display: inline-block;
+ color: var(--accent);
+ font-weight: 800;
+ text-decoration: none;
+ border: 1px solid var(--accent);
+ border-radius: 6px;
+ padding: .5rem .9rem;
+}
+.article-source-link a:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.related-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--panel-border); }
.related-section h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); margin-bottom: .6rem; }
.related-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
@@ -2463,6 +2474,11 @@ function renderArticleContent(source) {
<div class="article-body">
${(art.paragraphs || []).map((p, i, arr) => `<p${i === arr.length - 1 ? ' class="kicker"' : ""}>${escapeHTML(p)}</p>`).join("")}
</div>
+ ${source.sourceUrl ? `
+ <p class="article-source-link">
+ <a href="${escapeHTML(source.sourceUrl)}" target="_blank" rel="noopener noreferrer">Read the full story at ${escapeHTML(source.sourceName || source.byline || "the source")} →</a>
+ </p>
+ ` : ""}
${related.length ? `
<div class="related-section">
<h3>Related Coverage</h3>
← 458b2cc Category selection opens a real page (#/category/<key>), not
·
back to Crazy News Channel
·
Add scripts/fetch-real-news.mjs: real Google News RSS per ca d7c494a →