Files
supermarket/internal/web/templates/seo-report.html
T
davidandClaude Opus 5.5 5705a9b58b Phase 7 part 4: SEO → What to write next
One list per website of everything worth writing: new wording for pages
(Push pages and the audit's title and description issues), landing
pages for signals that get replies, pages for apps people name in their
replies (their own words, without quoted mail or signatures), and
keywords or briefs that stalled. Ranked by the sign-ups each is expected
to bring, at most 10 shown, each with its reason in numbers and the
button that starts its flow; Not now hides one for 90 days. The SEO
module still opens on the Morning check; the Monday report links here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 07:17:42 -07:00

60 lines
3.7 KiB
HTML

{{define "content"}}{{with .Data}}{{$d := .}}
<div class="heading">
<h1>Monday report</h1>
{{if .Current}}<div class="buttons">
<form method="post" action="/seo/report?site={{.Current.Index}}" data-busy="Writing…"><button type="submit" class="secondary">Write it now</button></form>
</div>{{end}}
</div>
<p class="lede">One page, the same every week, so this Monday compares with the last in seconds: three numbers, the searches that gained and lost most, the three pages that moved most, and the changes waiting for your yes. It's written every Monday{{if .Current}}, and can be emailed to you (Settings → Search engines){{end}}.</p>
{{template "seo-sites" .}}
{{if .Current}}
{{with .Report}}
<section class="card">
<p class="small muted">{{.WeekFrom}} to {{.WeekTo}}, against the week before · written {{ago .CreatedAt}}</p>
<h2>1. The week</h2>
<div class="funnel">
<div class="step"><span class="label">Clicks</span><strong>{{num .After.Clicks}}</strong><span class="rate">was {{num .Before.Clicks}}{{with change .Before.Clicks .After.Clicks}} · {{.}}{{end}}</span></div>
<div class="step"><span class="label">Impressions</span><strong>{{num .After.Impressions}}</strong><span class="rate">was {{num .Before.Impressions}}{{with change .Before.Impressions .After.Impressions}} · {{.}}{{end}}</span></div>
<div class="step"><span class="label">Position</span><strong>{{dec1 .After.Position}}</strong><span class="rate">was {{dec1 .Before.Position}}</span></div>
</div>
<p>{{.Where}}</p>
{{range .Outside}}<p class="small muted">{{.Sentence}}</p>{{end}}
</section>
{{template "query-changes" .}}
<section class="card">
<h2>2. The pages that moved most</h2>
{{range .Pages}}
<p><a href="{{.Key}}" target="_blank" rel="noopener noreferrer">{{pagePath .Key}}</a>: clicks {{num .Before.Clicks}} → <strong>{{num .After.Clicks}}</strong>, position {{dec1 .Before.Position}} → <strong>{{dec1 .After.Position}}</strong>
{{with .Why}}<br><span class="small">{{range .}}{{.}} {{end}}</span>{{end}}</p>
{{else}}<p class="help">No page moved.</p>{{end}}
</section>
<section class="card">
<h2>3. Waiting for your yes</h2>
{{range .Waiting}}
<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>
{{else}}<p class="help">Nothing is waiting: no change has been proposed.</p>{{end}}
{{if .Waiting}}<p class="help">Say yes or no to each on <a href="/seo/changes?site={{$d.Current.Index}}">Changes</a>: a yes opens a pull request.</p>{{end}}
<p class="help">Everything worth writing, ranked, is on <a href="/seo/next?site={{$d.Current.Index}}">What to write next</a>.</p>
{{with .Candidates}}
<h3>Worth a proposal</h3>
{{range .}}<p><a href="{{.Page}}" target="_blank" rel="noopener noreferrer">{{pagePath .Page}}</a><br><span class="small">{{.Why}}</span></p>{{end}}
<p class="help"><em>Propose changes</em> on <a href="/seo/changes?site={{$d.Current.Index}}">Changes</a> writes new wording for pages like these.</p>
{{end}}
</section>
{{else}}
<section class="card empty"><p>No report yet. It's written on Monday once there are two weeks of data, or now with <em>Write it now</em>.</p></section>
{{end}}
{{if gt (len .Reports) 1}}
<h2>Earlier reports</h2>
<table class="list">
<thead><tr><th>Week to</th><th class="num">Clicks</th><th class="num">Impressions</th><th class="num">Position</th></tr></thead>
<tbody>{{range .Reports}}<tr><td><a href="/seo/report?site={{$d.Current.Index}}&amp;week={{.WeekTo}}">{{.WeekTo}}</a></td><td class="num">{{num .After.Clicks}}</td><td class="num">{{num .After.Impressions}}</td><td class="num">{{dec1 .After.Position}}</td></tr>{{end}}</tbody>
</table>
{{end}}
{{end}}
{{end}}{{end}}