- Add music as a fourth channel (nav + theme color) - Glowing themed border on cards that have been posted to Matrix - Replace per-channel index sections with: "Pete just posted" strip, channel dashboard (last post, 24h count, totals), unified latest feed - /img proxy: SSRF-guarded thumbnail re-encoder that resizes to 800px and runs avifenc -q 45, cached under data/img-cache
88 lines
3.3 KiB
HTML
88 lines
3.3 KiB
HTML
{{define "title"}}{{.SiteTitle}} — your news feed{{end}}
|
|
|
|
{{define "main"}}
|
|
<section class="mt-2 mb-8 text-center">
|
|
<h1 class="font-display text-4xl sm:text-6xl font-bold leading-tight">
|
|
a friendlier news feed.
|
|
</h1>
|
|
<p class="mx-auto mt-3 max-w-xl text-base sm:text-lg text-[color:var(--ink)]/70">
|
|
Pete reads RSS, sorts stories, and posts them to Matrix.
|
|
Glowing cards are the ones he's posted.
|
|
</p>
|
|
</section>
|
|
|
|
{{if .JustPosted}}
|
|
<section class="mb-10">
|
|
<div class="flex items-end justify-between gap-3 mb-4">
|
|
<h2 class="font-display text-xl sm:text-2xl font-bold">
|
|
<span aria-hidden="true">📡</span> Pete just posted
|
|
</h2>
|
|
<span class="text-xs text-[color:var(--ink)]/50">most recent posts to Matrix</span>
|
|
</div>
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
{{range .JustPosted}}
|
|
{{template "card" dict "Story" . "Theme" .Channel "ShowChannel" true}}
|
|
{{end}}
|
|
</div>
|
|
</section>
|
|
{{end}}
|
|
|
|
<section class="mb-10">
|
|
<div class="flex items-end justify-between gap-3 mb-4">
|
|
<h2 class="font-display text-xl sm:text-2xl font-bold">
|
|
<span aria-hidden="true">📊</span> Channels
|
|
</h2>
|
|
<span class="text-xs text-[color:var(--ink)]/50">last 24 hours</span>
|
|
</div>
|
|
<div class="grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4">
|
|
{{range .Stats}}
|
|
<a href="/{{.Channel.Slug}}"
|
|
class="block rounded-3xl bg-[color:var(--card)] border-2 border-[color:var(--ink)]/10 shadow-pete p-4 hover:-translate-y-1 hover:shadow-pete-lg transition">
|
|
<div class="flex items-center gap-2">
|
|
<span class="inline-flex items-center justify-center h-9 w-9 rounded-2xl bg-theme-{{.Channel.Theme}} text-white text-lg">
|
|
{{.Channel.Emoji}}
|
|
</span>
|
|
<span class="font-display text-lg font-semibold">{{.Channel.Title}}</span>
|
|
</div>
|
|
<dl class="mt-3 space-y-1 text-xs text-[color:var(--ink)]/70">
|
|
<div class="flex justify-between gap-2">
|
|
<dt>last post</dt>
|
|
<dd class="font-semibold text-[color:var(--ink)]">
|
|
{{if .HasLastPosted}}{{timeAgo .LastPostedAt}}{{else}}—{{end}}
|
|
</dd>
|
|
</div>
|
|
<div class="flex justify-between gap-2">
|
|
<dt>posted 24h</dt>
|
|
<dd class="font-semibold text-[color:var(--ink)]">{{.PostsToday}}</dd>
|
|
</div>
|
|
<div class="flex justify-between gap-2">
|
|
<dt>stories</dt>
|
|
<dd class="font-semibold text-[color:var(--ink)]">{{.Total}}</dd>
|
|
</div>
|
|
</dl>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
</section>
|
|
|
|
<section class="mb-12">
|
|
<div class="flex items-end justify-between gap-3 mb-4">
|
|
<h2 class="font-display text-xl sm:text-2xl font-bold">
|
|
<span aria-hidden="true">🗞️</span> Latest across the feed
|
|
</h2>
|
|
<span class="text-xs text-[color:var(--ink)]/50">newest first, all channels</span>
|
|
</div>
|
|
{{if .Latest}}
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
{{range .Latest}}
|
|
{{template "card" dict "Story" . "Theme" .Channel "ShowChannel" true}}
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<div class="rounded-3xl bg-[color:var(--card)] border-2 border-dashed border-[color:var(--ink)]/15 p-8 text-center text-[color:var(--ink)]/60">
|
|
Nothing here yet — Pete's still listening.
|
|
</div>
|
|
{{end}}
|
|
</section>
|
|
{{end}}
|