Files
esh-pfi-infrastructure/stacks/news-digest/templates/archive.html.j2
T
vh 28cb96c087 news-digest: separated SOURCE / REDDIT THREAD action chips + archive page
Two requested polish items:

1. Reddit items now show TWO distinct action chips in the footer:

     [↗ SOURCE huggingface.co]  [⌥ REDDIT THREAD]      3h · u/foo

   Previously the external link was a tiny dot-separated text link
   that visually competed with the post metadata. Now: explicit
   labeled buttons, distinct colors (cyan for source, blue for
   thread), with hover states that match the Australis accent
   palette. Non-Reddit items get just the SOURCE chip.

2. Archive page at /archive.html — lists every edition-*.html on
   disk, newest-first, sorted PM-before-AM within a day. Each row
   is the date in editorial serif + an AM/PM chip color-coded
   (yellow morning / cyan evening) + a hover-affordance arrow.
   Header link from the main edition reads "ARCHIVE →".

   Generation: digest.py walks OUTPUT_DIR for the edition-*.html
   filename pattern on every run, sorts, renders archive.html.j2,
   writes atomically. Cheap (~1ms even with hundreds of editions).
   No retention cap — twice-daily for a year is ~700 small files,
   well under any reasonable concern.

CSS additions: .action chip styles (with per-action color variants),
.archive-link in masthead, full .archive-row + .archive-edition
treatment.
2026-04-26 13:48:58 -07:00

84 lines
2.7 KiB
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Daily Digest · Archive</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header class="masthead" role="banner">
<div class="masthead-inner">
<div class="masthead-brand">
<span class="brand-glyph" aria-hidden="true">◢</span>
<span class="brand-mark">DAILY DIGEST</span>
</div>
<div class="masthead-edition">
<span class="edition-stamp">ARCHIVE</span>
<a class="archive-link" href="index.html">← LATEST</a>
</div>
<div class="masthead-meta">
<div class="meta-row">
<span class="meta-label">EDITIONS ON FILE</span>
<span class="meta-value">{{ total }}</span>
</div>
<div class="meta-row">
<span class="meta-label">CADENCE</span>
<span class="meta-value">2× DAILY · 0800 / 2000</span>
</div>
<div class="meta-row">
<span class="meta-label">RETENTION</span>
<span class="meta-value">UNLIMITED</span>
</div>
</div>
</div>
<div class="aurora-rule" aria-hidden="true"></div>
</header>
<main class="brief">
<section class="desk">
<header class="desk-head">
<span class="desk-num">∞</span>
<h2 class="desk-title">All Editions</h2>
<span class="desk-sub">newest first</span>
</header>
{% if editions %}
<ol class="archive-list">
{% for e in editions %}
<li class="archive-item">
<a class="archive-row" href="{{ e.filename }}">
<span class="archive-date">{{ e.date_long }}</span>
<span class="archive-edition archive-edition-{{ e.edition_short|lower }}">
{{ e.edition_short }}
</span>
<span class="archive-arrow">→</span>
</a>
</li>
{% endfor %}
</ol>
{% else %}
<p class="empty-msg">No editions on file yet. Cron fires twice daily at 0800 / 2000.</p>
{% endif %}
</section>
</main>
<footer class="colophon">
<div class="colophon-inner">
<div class="colophon-block">
<span class="meta-label">INDEXED</span>
<span class="meta-value">{{ generated_at.isoformat(timespec="seconds") }}</span>
</div>
<div class="colophon-block">
<span class="meta-label">STORE</span>
<span class="meta-value">/opt/docker/data/news-digest</span>
</div>
<div class="colophon-block">
<span class="meta-label">FORMAT</span>
<span class="meta-value">edition-YYYY-MM-DD-{am,pm}.html</span>
</div>
</div>
</footer>
</body>
</html>