Files
supermarket/internal/web/templates/seo-report.html
T
davidandClaude Opus 5.5 c36f786ae9 Fixes from the first round of TEST.md
SEO: a domain property (sc-domain:) covers every subdomain, so the shop,
Gitea and forum were counted as the website. What ranks, the morning
check, the Monday report, keywords, change candidates and the audit's
traffic now read only the website's own host (with or without www).
The report keeps pages worth a proposal apart from "Waiting for your
yes", explains only moves past the thresholds, and says "places up/down".

Also:
- Feed summaries drop the posts' scripts and styles.
- Spend you log can't be negative.
- Test and check buttons can't be clicked twice while they run.
- Previews show the site's web fonts and icon sprites.
- Backups are read without leaving -wal/-shm files; deleting one removes
  them, and leftovers are swept at start.
- The Overview's setup flags a CRM that Hermes can't reach.
- Import now says what came in; adding a prospect that exists says so;
  prospects can be deleted.
- Signal tags and brief addresses keep accented letters (Ü → u).
- Page errors start with a capital; clearer messages for bad uploads,
  CRM retry and cancel, keywords, and the finished audit.
- The module you're in stays unfolded in the sidebar.
- A picked keyword can be unpicked.

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

57 lines
3.3 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 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}}</span></div>
<div class="step"><span class="label">Impressions</span><strong>{{num .After.Impressions}}</strong><span class="rate">was {{num .Before.Impressions}}</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>
</section>
<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}}
{{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}}