Phase 5 part 4: landing pages per buying signal

Each signal's page lists its landing pages with their Gitea status, live
address and 30-day visitors from Plausible, and builds a new one. Pages
can be duplicated as variants (B, C…, with their own utm_content), taken
off the site through a pull request that deletes the file, or have their
pull request closed. The scorecard counts live pages. Schema 23.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 14:19:55 -07:00
co-authored by Claude Opus 5.5
parent 11b80b6461
commit 062fcf2e59
17 changed files with 674 additions and 33 deletions
+42
View File
@@ -97,6 +97,48 @@
<ul class="small">{{range $i, $u := .}}<li><code id="link-{{$i}}">{{$u}}</code> <button type="button" class="link small" data-copy="link-{{$i}}">Copy</button></li>{{end}}</ul>
{{end}}
<h2>Landing pages</h2>
{{$sig := $s}}
{{if .Pages}}
<div class="table-wrap"><table>
<thead><tr><th>Page</th><th>Status</th><th>Visitors, 30 days</th><th></th></tr></thead>
<tbody>{{range .Pages}}<tr>
<td>{{with .Source.Variant}}<span class="badge">{{.}}</span> {{end}}<a href="/sites/pages/{{.ID}}">{{or .Title "Untitled"}}</a><br>
<span class="small muted">{{if .Address}}<a href="{{.Address}}" target="_blank" rel="noopener noreferrer">{{.Address}}</a>{{else}}{{.Site}}{{.Path}}{{end}}</span></td>
<td>{{template "page-status" .}}</td>
<td>{{if ge .Visitors 0}}{{.Visitors}}{{else}}<span class="muted">—</span>{{end}}</td>
<td><div class="row-actions">
<details class="inline-details"><summary class="button secondary small">Duplicate as a variant</summary>
<form method="post" action="/sites/pages/{{.ID}}/duplicate">
<label class="small">What to change in the variant <span class="muted">(optional: empty makes an exact copy to edit)</span>
<textarea name="variant_notes" rows="2" placeholder="A shorter page, with the price in the hero."></textarea></label>
<button type="submit" class="small" data-busy="Making it…">Make the variant</button>
</form>
</details>
{{if eq .Status "merged"}}<form method="post" action="/sites/pages/{{.ID}}/remove" data-confirm="Open a pull request that takes {{.Path}} off the site?">
<input type="hidden" name="return" value="/signals/{{$sig.ID}}"><button type="submit" class="secondary small" data-busy="Opening…">Remove from the site</button></form>{{end}}
{{if or (eq .Status "pr") (eq .Status "removing")}}<form method="post" action="/sites/pages/{{.ID}}/close" data-confirm="Close the pull request without merging?">
<input type="hidden" name="return" value="/signals/{{$sig.ID}}"><button type="submit" class="secondary small">Close the pull request</button></form>{{end}}
</div></td>
</tr>{{end}}</tbody>
</table></div>
{{with .VisitorsErr}}<p class="small warn-text">Couldn't read visitors from Plausible: {{.}}</p>{{end}}
<p class="small muted">Visitors are everyone who saw the page, however they came. A variant's links to your site carry its own <code>utm_content</code>, so sign-ups that keep the tags can be told apart.</p>
{{else}}<p class="help">No landing page for this signal yet.</p>{{end}}
{{if .PageSites}}
<form method="post" action="/sites/pages" class="card">
<input type="hidden" name="kind" value="landing"><input type="hidden" name="signal" value="{{$s.ID}}">
<div class="cols">
{{if gt (len .PageSites) 1}}<label>Website <select name="site">{{range .PageSites}}<option value="{{.Index}}">{{.URL}}</option>{{end}}</select></label>
{{else}}{{range .PageSites}}<input type="hidden" name="site" value="{{.Index}}">{{end}}{{end}}
<label>Address <span class="muted">(optional)</span> <input name="path" placeholder="/{{$s.Slug}}/"></label>
</div>
<label>What the page should do <span class="muted">(optional; the signal's angle is used)</span> <textarea name="notes" rows="2"></textarea></label>
<button type="submit" data-busy="Reading the site and writing…">Build a landing page for it</button>
<span class="small muted">Its links to your site carry utm_campaign={{$s.Slug}}. You review it before anything goes to Gitea.</span>
</form>
{{else}}<p class="small">Landing pages need a website with a Hugo repository in <a href="/settings/profile">Settings → Profile</a>.</p>{{end}}
{{if .Events}}
<h2>Latest steps</h2>
<table class="list">