Inventory is now the Market

Everything the user sees says Market: the sidebar, titles, breadcrumbs,
help text, messages, suggestions and the agent tool's description; the
export downloads as supermarket-market.yaml. Its pages live under
/market, and the old /inventory addresses redirect there (308, so a
form's POST stays a POST). The YAML format (inventory:), the database
and the code's names are unchanged, so exported files still import. A
breadcrumb no longer repeats the page's own title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 12:38:50 -07:00
co-authored by Claude Opus 5.5
parent 98f8788f18
commit a81ced3503
25 changed files with 105 additions and 79 deletions
+6 -6
View File
@@ -25,7 +25,7 @@ func (s *Server) inventoryList(w http.ResponseWriter, r *http.Request) {
s.serverError(w, err)
return
}
s.render(w, r, "inventory", page{Title: "Inventory", Nav: "inventory", Data: map[string]any{
s.render(w, r, "inventory", page{Title: "Market", Nav: "inventory", Data: map[string]any{
"Entries": entries,
"Relationship": rel,
"Relationships": inventory.Relationships,
@@ -94,7 +94,7 @@ func (s *Server) inventorySave(w http.ResponseWriter, r *http.Request) {
s.render(w, r, "entry", page{Title: title, Nav: "inventory", Error: err.Error(), Data: s.entryForm(e)})
return
}
redirect(w, r, "/inventory", "saved")
redirect(w, r, "/market", "saved")
}
func entryFromForm(r *http.Request) *inventory.Entry {
@@ -197,11 +197,11 @@ func (s *Server) inventoryDelete(w http.ResponseWriter, r *http.Request) {
s.serverError(w, err)
return
}
redirect(w, r, "/inventory", "deleted")
redirect(w, r, "/market", "deleted")
}
func (s *Server) inventoryImportPage(w http.ResponseWriter, r *http.Request) {
s.render(w, r, "import", page{Title: "Import inventory", Nav: "inventory", Data: map[string]any{
s.render(w, r, "import", page{Title: "Import into the Market", Nav: "inventory", Data: map[string]any{
"Relationships": inventory.Relationships,
}})
}
@@ -217,7 +217,7 @@ func (s *Server) inventoryImport(w http.ResponseWriter, r *http.Request) {
rel := r.FormValue("relationship")
overwrite := r.FormValue("overwrite") == "on"
show := func(errMsg string, res *inventory.ImportResult) {
s.render(w, r, "import", page{Title: "Import inventory", Nav: "inventory", Error: errMsg, Data: map[string]any{
s.render(w, r, "import", page{Title: "Import into the Market", Nav: "inventory", Error: errMsg, Data: map[string]any{
"Relationships": inventory.Relationships,
"Result": res,
"YAML": r.FormValue("yaml"),
@@ -269,7 +269,7 @@ func (s *Server) inventoryExport(w http.ResponseWriter, r *http.Request) {
return
}
w.Header().Set("Content-Type", "application/yaml")
w.Header().Set("Content-Disposition", `attachment; filename="supermarket-inventory.yaml"`)
w.Header().Set("Content-Disposition", `attachment; filename="supermarket-market.yaml"`)
w.Write(data)
}
+18 -3
View File
@@ -15,20 +15,35 @@ func TestInventoryPrices(t *testing.T) {
form := url.Values{"name": {"Zendesk"}, "relationship": {"competitor"}, "mention_policy": {"name"},
"price_plan": {"Suite Team", ""}, "price_amount": {"$55", ""}, "price_per": {"per agent per month", ""},
"price_checked": {"2026-11-20", "2026-11-24"}, "price_source": {"https://zendesk.com/pricing", ""}}
if rec := postForm(h, "/inventory/save", form); rec.Code != http.StatusSeeOther {
if rec := postForm(h, "/market/save", form); rec.Code != http.StatusSeeOther {
t.Fatalf("save: %d %s", rec.Code, rec.Body.String())
}
es, _ := inventory.List(s.DB, "")
if len(es) != 1 || len(es[0].Prices) != 1 || es[0].Prices[0].Amount != "$55" {
t.Fatalf("saved: %+v", es)
}
body := do(h, http.MethodGet, "/inventory/"+strconv.FormatInt(es[0].ID, 10), nil, nil).Body.String()
body := do(h, http.MethodGet, "/market/"+strconv.FormatInt(es[0].ID, 10), nil, nil).Body.String()
if !strings.Contains(body, `name="price_amount" value="$55"`) || !strings.Contains(body, "Their prices") {
t.Errorf("edit page: %s", body)
}
form.Set("price_checked", "")
form["price_checked"] = []string{"", ""}
if rec := postForm(h, "/inventory/save", form); !strings.Contains(rec.Body.String(), "say when you checked the price $55") && !strings.Contains(rec.Body.String(), "Say when you checked the price $55") {
if rec := postForm(h, "/market/save", form); !strings.Contains(rec.Body.String(), "say when you checked the price $55") && !strings.Contains(rec.Body.String(), "Say when you checked the price $55") {
t.Errorf("a price without its date was saved: %d", rec.Code)
}
}
// The Market was the Inventory: its old addresses lead to the new ones,
// keeping the query and a form's POST.
func TestMarketMoved(t *testing.T) {
_, h := newTestServer(t, nil)
for old, want := range map[string]string{"/inventory": "/market", "/inventory/3?x=1": "/market/3?x=1", "/inventory/import": "/market/import"} {
rec := do(h, http.MethodGet, old, nil, nil)
if rec.Code != http.StatusPermanentRedirect || rec.Header().Get("Location") != want {
t.Errorf("%s: %d %s", old, rec.Code, rec.Header().Get("Location"))
}
}
if rec := postForm(h, "/inventory/save", url.Values{"name": {"X"}}); rec.Code != http.StatusPermanentRedirect || rec.Header().Get("Location") != "/market/save" {
t.Errorf("post: %d %s", rec.Code, rec.Header().Get("Location"))
}
}
+1 -1
View File
@@ -198,7 +198,7 @@ func (s *Server) seoLinksAction(w http.ResponseWriter, r *http.Request) {
id, _ := strconv.ParseInt(r.PostFormValue("competitor"), 10, 64)
e, err := inventory.Get(s.DB, id)
if err != nil || e.Relationship != inventory.Competitor {
s.renderLinks(w, r, "Choose a competitor from the Inventory.")
s.renderLinks(w, r, "Choose a competitor from the Market.")
return
}
rs, err := s.researcher()
+1 -1
View File
@@ -138,7 +138,7 @@ func (s *Server) dashboard(w http.ResponseWriter, r *http.Request) {
Detail: ifElse(aiErr == nil, aiCfg.Provider+" · "+aiCfg.Model, "Choose Anthropic or a server on your network; the profile draft and posts need it")},
{Label: "Company profile", Done: p.IsSet(), Link: "/settings/profile",
Detail: ifElse(p.IsSet(), p.Name, "Describe the company, its products and its customers (the AI can draft it from your website)")},
{Label: "Inventory", Done: len(entries) > 0, Link: "/inventory",
{Label: "Market", Done: len(entries) > 0, Link: "/market",
Detail: inventorySummary(counts)},
{Label: "Social accounts", Done: s.Secrets.Has(secrets.XAccessToken) || s.Secrets.Has(secrets.LinkedInAccessToken) || s.Secrets.Has(secrets.RedditAccessToken),
Link: "/settings/accounts", Detail: s.connectionSummary(conns)},
+2 -2
View File
@@ -100,7 +100,7 @@ func (s *Server) search(q string) ([]hitGroup, error) {
if matches(e.Name, e.Description, e.TwitterHandle, e.TalkingPoints, strings.Join(e.Websites, " "),
strings.Join(e.Hashtags, " "), strings.Join(e.Keywords, " "), strings.Join(e.Subreddits, " ")) {
inv = append(inv, hit{Title: e.Name, Detail: e.Description,
Link: "/inventory/" + strconv.FormatInt(e.ID, 10), Badge: e.Relationship})
Link: "/market/" + strconv.FormatInt(e.ID, 10), Badge: e.Relationship})
}
}
entryLink := func(name string) string {
@@ -202,7 +202,7 @@ func (s *Server) search(q string) ([]hitGroup, error) {
}
var groups []hitGroup
for _, g := range []hitGroup{{"Posts", posts}, {"Fetched items", found}, {"Inventory", inv}, {"Prospects", prospectHits}, {"Settings", settings}} {
for _, g := range []hitGroup{{"Posts", posts}, {"Fetched items", found}, {"Market", inv}, {"Prospects", prospectHits}, {"Settings", settings}} {
if len(g.Hits) > 0 {
groups = append(groups, g)
}
+21 -10
View File
@@ -97,15 +97,19 @@ func (s *Server) Handler() (http.Handler, error) {
mux.HandleFunc("GET /search", s.searchPage)
mux.HandleFunc("GET /inventory", s.inventoryList)
mux.HandleFunc("GET /inventory/new", s.inventoryEdit)
mux.HandleFunc("GET /inventory/{id}", s.inventoryEdit)
mux.HandleFunc("POST /inventory/save", s.inventorySave)
mux.HandleFunc("POST /inventory/fill", s.inventoryFill)
mux.HandleFunc("POST /inventory/{id}/delete", s.inventoryDelete)
mux.HandleFunc("GET /inventory/import", s.inventoryImportPage)
mux.HandleFunc("POST /inventory/import", s.inventoryImport)
mux.HandleFunc("GET /inventory/export", s.inventoryExport)
mux.HandleFunc("GET /market", s.inventoryList)
mux.HandleFunc("GET /market/new", s.inventoryEdit)
mux.HandleFunc("GET /market/{id}", s.inventoryEdit)
mux.HandleFunc("POST /market/save", s.inventorySave)
mux.HandleFunc("POST /market/fill", s.inventoryFill)
mux.HandleFunc("POST /market/{id}/delete", s.inventoryDelete)
mux.HandleFunc("GET /market/import", s.inventoryImportPage)
mux.HandleFunc("POST /market/import", s.inventoryImport)
mux.HandleFunc("GET /market/export", s.inventoryExport)
// The Market was the Inventory: its old addresses lead to the new ones
// (308 keeps a form's POST a POST).
mux.HandleFunc("/inventory", marketMoved)
mux.HandleFunc("/inventory/", marketMoved)
// Settings: the profile, social accounts, AI, and the Core & Hermes.
mux.HandleFunc("GET /settings", func(w http.ResponseWriter, r *http.Request) {
@@ -476,7 +480,7 @@ func (p page) Section() string {
case strings.HasPrefix(p.Nav, "settings"):
return "Settings"
case p.Nav == "inventory":
return "Inventory"
return "Market"
case strings.HasPrefix(p.Nav, "sites"):
return "Sites"
}
@@ -705,3 +709,10 @@ func ago(t time.Time) string {
return t.Local().Format("2 Jan 2006")
}
}
// marketMoved sends an old /inventory address to its /market one.
func marketMoved(w http.ResponseWriter, r *http.Request) {
u := *r.URL
u.Path = "/market" + strings.TrimPrefix(r.URL.Path, "/inventory")
http.Redirect(w, r, u.RequestURI(), http.StatusPermanentRedirect)
}
+10 -10
View File
@@ -95,8 +95,8 @@ func TestEveryPageRenders(t *testing.T) {
t.Fatal(err)
}
for _, path := range []string{"/", "/?msg=saved", "/settings/profile", "/inventory", "/inventory?relationship=partner",
"/inventory/new", "/inventory/1", "/inventory/import", "/inventory/export",
for _, path := range []string{"/", "/?msg=saved", "/settings/profile", "/market", "/market?relationship=partner",
"/market/new", "/market/1", "/market/import", "/market/export",
"/settings/ai", "/settings/accounts", "/settings/core", "/static/app.css", "/favicon.ico", "/static/favicon.png", "/static/logo.png", "/static/apple-touch-icon.png", "/search", "/crm", "/search?q=rival", "/search?q=nothing+here", "/static/htmx.min.js", "/healthz",
"/content", "/content/1", "/content/1?dismissed=1", "/posts", "/posts?msg=drafted",
"/content/scheduled", "/content/published",
@@ -107,7 +107,7 @@ func TestEveryPageRenders(t *testing.T) {
t.Errorf("core=%v GET %s: %d %s", c != nil, path, rec.Code, rec.Body.String())
}
}
if rec := do(h, http.MethodGet, "/inventory/999", nil, nil); rec.Code != http.StatusNotFound {
if rec := do(h, http.MethodGet, "/market/999", nil, nil); rec.Code != http.StatusNotFound {
t.Errorf("missing entry: %d", rec.Code)
}
}
@@ -179,7 +179,7 @@ func TestProfileAndInventoryForms(t *testing.T) {
}
entry := url.Values{"name": {"Rival"}, "relationship": {"competitor"}, "hashtags": {"rival, #Other"}, "twitter_handle": {"@rival"}}
if rec := postForm(h, "/inventory/save", entry); rec.Code != http.StatusSeeOther {
if rec := postForm(h, "/market/save", entry); rec.Code != http.StatusSeeOther {
t.Fatalf("save entry: %d %s", rec.Code, rec.Body.String())
}
entries, _ := inventory.List(s.DB, "competitor")
@@ -188,12 +188,12 @@ func TestProfileAndInventoryForms(t *testing.T) {
t.Fatalf("entry: %+v", entries)
}
// Same name, different case: refused.
rec = postForm(h, "/inventory/save", url.Values{"name": {"RIVAL"}, "relationship": {"partner"}})
rec = postForm(h, "/market/save", url.Values{"name": {"RIVAL"}, "relationship": {"partner"}})
if rec.Code != http.StatusOK || !strings.Contains(rec.Body.String(), "already has that name") {
t.Errorf("duplicate: %d", rec.Code)
}
rec = postForm(h, "/inventory/import", url.Values{"example": {"federated"}, "relationship": {"watch"}})
rec = postForm(h, "/market/import", url.Values{"example": {"federated"}, "relationship": {"watch"}})
if rec.Code != http.StatusOK || !strings.Contains(rec.Body.String(), "21 added") {
t.Errorf("import example: %d %s", rec.Code, rec.Body.String())
}
@@ -202,7 +202,7 @@ func TestProfileAndInventoryForms(t *testing.T) {
t.Errorf("example entries are partners: got %d", len(partners))
}
if rec := postForm(h, "/inventory/1/delete", nil); rec.Code != http.StatusSeeOther {
if rec := postForm(h, "/market/1/delete", nil); rec.Code != http.StatusSeeOther {
t.Errorf("delete: %d", rec.Code)
}
}
@@ -384,17 +384,17 @@ func TestMCPNeedsTokenAndChecksIn(t *testing.T) {
func TestInventoryFillNeedsAI(t *testing.T) {
_, h := newTestServer(t, nil)
if body := do(h, http.MethodGet, "/inventory/new", nil, nil).Body.String(); !strings.Contains(body, `<a href="/settings/ai">set up the AI</a>`) {
if body := do(h, http.MethodGet, "/market/new", nil, nil).Body.String(); !strings.Contains(body, `<a href="/settings/ai">set up the AI</a>`) {
t.Error("new entry without AI: no warning")
}
// The form comes back with what was typed, and says why.
rec := postForm(h, "/inventory/fill", url.Values{"name": {"Rival"}, "relationship": {"competitor"},
rec := postForm(h, "/market/fill", url.Values{"name": {"Rival"}, "relationship": {"competitor"},
"description": {"Typed."}, "draft_url": {"https://rival.example"}})
body := rec.Body.String()
if rec.Code != http.StatusOK || !strings.Contains(body, "AI provider not configured") || !strings.Contains(body, "Typed.") {
t.Errorf("fill without AI: %d", rec.Code)
}
rec = postForm(h, "/inventory/fill", url.Values{"name": {"Rival"}})
rec = postForm(h, "/market/fill", url.Values{"name": {"Rival"}})
if !strings.Contains(rec.Body.String(), "Enter their website") {
t.Error("fill without a website: no message")
}
+1 -1
View File
@@ -63,7 +63,7 @@ func (s *Server) pageInputs(p *sites.SitePage, prof *profile.Profile) (sites.Inp
if id := p.Source.Competitor; id != 0 {
e, err := inventory.Get(s.DB, id)
if err != nil {
return in, "", errors.New("that competitor isn't in the Inventory any more")
return in, "", errors.New("that competitor isn't in the Market any more")
}
in.Competitor = e
}
+1 -1
View File
@@ -1,6 +1,6 @@
{{define "content"}}{{template "settings-start" .}}{{with .Data}}{{$d := .}}
<h2>Backups</h2>
<p class="lede">Copies of Supermarket's database: your profile, inventory, signals, prospects, drafts, SEO and metrics. Each one is a single SQLite file. Your keys and tokens aren't in them; they stay in <code>secrets.json</code>.</p>
<p class="lede">Copies of Supermarket's database: your profile, the Market, signals, prospects, drafts, SEO and metrics. Each one is a single SQLite file. Your keys and tokens aren't in them; they stay in <code>secrets.json</code>.</p>
{{with .Restored}}<p class="ok">Restored from {{.From}} {{ago .At}}{{if .Secrets}}, keys and tokens included{{end}}. What was there before is backed up as {{.Backup}}.</p>{{end}}
{{if .Pending}}
+1 -1
View File
@@ -5,7 +5,7 @@
<form method="post" action="{{.Base}}/fetch" data-busy="Fetching…">
<button type="submit" {{if not .Sources}}disabled{{end}}>Fetch new</button>
</form>
{{if .Own}}<a class="button secondary" href="/settings/profile">Edit profile</a>{{else}}<a class="button secondary" href="/inventory/{{.Entry.ID}}">Edit entry</a>{{end}}
{{if .Own}}<a class="button secondary" href="/settings/profile">Edit profile</a>{{else}}<a class="button secondary" href="/market/{{.Entry.ID}}">Edit entry</a>{{end}}
</div>
</div>
<p class="lede">
+3 -3
View File
@@ -1,6 +1,6 @@
{{define "content"}}{{with .Data}}
<h1>Sources</h1>
<p class="lede">Pick an inventory entry to fetch its latest news, choose what to write about, and get a draft for each channel to review under <a href="/posts">Posts</a>.</p>
<p class="lede">Pick a Market entry to fetch its latest news, choose what to write about, and get a draft for each channel to review under <a href="/posts">Posts</a>.</p>
{{if .Rows}}
<table class="list">
@@ -15,7 +15,7 @@
{{else}}
<td><a href="/content/{{.Entry.ID}}">{{.Name}}</a></td>
<td><span class="badge {{.Entry.Relationship}}">{{.Entry.Relationship}}</span></td>
<td>{{if .Sources}}{{join .Sources ", "}}{{else}}<span class="muted">none: <a href="/inventory/{{.Entry.ID}}">add some</a></span>{{end}}</td>
<td>{{if .Sources}}{{join .Sources ", "}}{{else}}<span class="muted">none: <a href="/market/{{.Entry.ID}}">add some</a></span>{{end}}</td>
{{end}}
<td>{{if .Waiting}}{{.Waiting}}{{end}}</td>
<td>{{ago .LastChecked}}</td>
@@ -25,7 +25,7 @@
</table>
{{else}}
<section class="card empty">
<p>Add the partners and competitors you post about to the <a href="/inventory">Inventory</a> first.</p>
<p>Add the partners and competitors you post about to the <a href="/market">Market</a> first.</p>
</section>
{{end}}
{{end}}{{end}}
+4 -4
View File
@@ -1,8 +1,8 @@
{{define "content"}}{{with .Data}}{{$d := .}}{{$e := .E}}
<p><a href="/inventory">← Inventory</a></p>
<p><a href="/market">← Market</a></p>
<h1>{{if $e.ID}}{{$e.Name}}{{else}}New entry{{end}}</h1>
<form method="post" action="/inventory/save" data-busy-on="fill" data-busy="Reading their website…">
<form method="post" action="/market/save" data-busy-on="fill" data-busy="Reading their website…">
<input type="hidden" name="id" value="{{$e.ID}}">
<section class="card">
<h2>Fill in with AI</h2>
@@ -10,7 +10,7 @@
{{if .NoAI}}<p class="warn-text">This needs the AI: first <a href="/settings/ai">set up the AI</a>, then come back. Or fill in the form by hand.</p>{{end}}
<div class="row">
<input name="draft_url" type="text" inputmode="url" value="{{.DraftURL}}" placeholder="https://example.com" aria-label="Their website">
<button type="submit" name="action" value="fill" class="secondary" formaction="/inventory/fill" formnovalidate {{if .NoAI}}disabled{{end}}>Fill in the empty boxes</button>
<button type="submit" name="action" value="fill" class="secondary" formaction="/market/fill" formnovalidate {{if .NoAI}}disabled{{end}}>Fill in the empty boxes</button>
</div>
<p class="help">Takes up to a minute or two.</p>
{{if .Drafted}}{{if .Filled}}<p class="flash">Filled in: {{join .Filled ", "}}. Check them, correct what's wrong, then Save.</p>{{else}}<p class="muted">Nothing to fill in: every box the website could answer is already filled, or the site doesn't say.</p>{{end}}{{end}}
@@ -97,7 +97,7 @@
</form>
{{if $e.ID}}
<form method="post" action="/inventory/{{$e.ID}}/delete" class="danger-zone" data-confirm="Delete {{$e.Name}} from the inventory?">
<form method="post" action="/market/{{$e.ID}}/delete" class="danger-zone" data-confirm="Delete {{$e.Name}} from the Market?">
<button type="submit" class="danger">Delete {{$e.Name}}</button>
</form>
{{end}}
+5 -5
View File
@@ -1,16 +1,16 @@
{{define "content"}}{{with .Data}}
<p><a href="/inventory">← Inventory</a></p>
<h1>Import inventory</h1>
<p><a href="/market">← Market</a></p>
<h1>Import into the Market</h1>
{{with .Result}}
<section class="card {{if .Errors}}warn{{end}}">
<p>{{.Added}} added, {{.Updated}} updated, {{.Skipped}} skipped (already in the inventory).</p>
<p>{{.Added}} added, {{.Updated}} updated, {{.Skipped}} skipped (already in the Market).</p>
{{if .Errors}}<ul>{{range .Errors}}<li>{{.}}</li>{{end}}</ul>{{end}}
<p><a href="/inventory">See the inventory</a></p>
<p><a href="/market">See the Market</a></p>
</section>
{{end}}
<form class="card" method="post" action="/inventory/import" enctype="multipart/form-data">
<form class="card" method="post" action="/market/import" enctype="multipart/form-data">
<p>YAML: a list of entries, or a document with an <code>inventory:</code> list. The old app's <code>config.yaml</code> works too (its <code>applications:</code> list).</p>
<label>Paste <textarea name="yaml" rows="12" placeholder="inventory:
- name: Example
+8 -8
View File
@@ -1,10 +1,10 @@
{{define "content"}}{{with .Data}}
<div class="heading">
<h1>Inventory</h1>
<h1>Market</h1>
<div class="buttons">
<a class="button" href="/inventory/new">New entry</a>
<a class="button secondary" href="/inventory/import">Import</a>
<a class="button secondary" href="/inventory/export">Export</a>
<a class="button" href="/market/new">New entry</a>
<a class="button secondary" href="/market/import">Import</a>
<a class="button secondary" href="/market/export">Export</a>
</div>
</div>
<p class="lede"><strong>Partners</strong>: Supermarket amplifies their news.
@@ -12,9 +12,9 @@
<strong>Watch</strong>: news to curate, no promotion either way.</p>
<nav class="tabs">
<a href="/inventory" {{if eq .Relationship ""}}aria-current="page"{{end}}>All</a>
<a href="/market" {{if eq .Relationship ""}}aria-current="page"{{end}}>All</a>
{{$cur := .Relationship}}
{{range .Relationships}}<a href="/inventory?relationship={{.}}" {{if eq $cur .}}aria-current="page"{{end}}>{{.}}</a>{{end}}
{{range .Relationships}}<a href="/market?relationship={{.}}" {{if eq $cur .}}aria-current="page"{{end}}>{{.}}</a>{{end}}
</nav>
{{if .Entries}}
@@ -23,7 +23,7 @@
<tbody>
{{range .Entries}}
<tr>
<td><a href="/inventory/{{.ID}}">{{.Name}}</a></td>
<td><a href="/market/{{.ID}}">{{.Name}}</a></td>
<td><span class="badge {{.Relationship}}">{{.Relationship}}</span></td>
<td>{{if .TwitterHandle}}@{{.TwitterHandle}}{{end}}</td>
<td>{{if .YouTubeChannelID}}✓{{end}}</td>
@@ -34,7 +34,7 @@
</table>
{{else}}
<section class="card empty">
<p>Nothing here yet. Add the partners and competitors you post about, or <a href="/inventory/import">import a list</a>.</p>
<p>Nothing here yet. Add the partners and competitors you post about, or <a href="/market/import">import a list</a>.</p>
</section>
{{end}}
{{end}}{{end}}
+2 -2
View File
@@ -23,7 +23,7 @@
</form>
<nav class="nav" aria-label="Main">
<a href="/" {{if eq .Nav "home"}}aria-current="page"{{end}}>{{template "icon" "overview"}}<span>Overview</span></a>
<a href="/inventory" {{if eq .Nav "inventory"}}aria-current="page"{{end}}>{{template "icon" "inventory"}}<span>Inventory</span></a>
<a href="/market" {{if eq .Nav "inventory"}}aria-current="page"{{end}}>{{template "icon" "inventory"}}<span>Market</span></a>
<div class="nav-label">Modules</div>
{{$nav := .Nav}}{{$inbox := .Inbox}}
@@ -99,7 +99,7 @@
<header class="topbar">
<button type="button" class="icon-button menu-button" data-nav-toggle aria-controls="sidebar" aria-label="Open navigation">{{template "icon" "menu"}}</button>
<nav class="crumbs" aria-label="Breadcrumb">
{{with .Section}}<span>{{.}}</span><span class="sep" aria-hidden="true">/</span>{{end}}
{{with .Section}}{{if ne . $.Title}}<span>{{.}}</span><span class="sep" aria-hidden="true">/</span>{{end}}{{end}}
<span class="here">{{.Title}}</span>
</nav>
</header>
+1 -1
View File
@@ -1,7 +1,7 @@
{{define "content"}}{{with .Data}}
<div class="page-head">
<h1>Search</h1>
<p class="lede">Posts, fetched items, the inventory, your products and settings.</p>
<p class="lede">Posts, fetched items, the Market, your products and settings.</p>
</div>
<form class="search-page" action="/search" method="get" role="search">
<input type="search" name="q" value="{{.Q}}" placeholder="e.g. a company, a product, or words from a post" aria-label="Search for" autofocus>
+3 -3
View File
@@ -88,10 +88,10 @@
<section class="card" id="opportunities">
<h2>Where to win a link</h2>
<p class="small">Pages that list others like you but not you: your Inventory partners' pages of providers and hosts, and lists of alternatives to your competitors. Nothing is sent from here: open the page, ask them (a short, friendly note usually does it), and mark it. When the link shows up (Bing, or a check), it's marked won.</p>
<p class="small">Pages that list others like you but not you: your Market partners' pages of providers and hosts, and lists of alternatives to your competitors. Nothing is sent from here: open the page, ask them (a short, friendly note usually does it), and mark it. When the link shows up (Bing, or a check), it's marked won.</p>
<div class="row">
<form method="post" action="/seo/links/partners?site={{$d.Current.Index}}" data-busy="Reading their pages…"><button type="submit" class="secondary small" {{if not $d.Partners}}disabled{{end}}>Look at the partners' pages</button></form>
<span class="small muted">{{if $d.Partners}}{{$d.Partners}} {{if eq $d.Partners 1}}partner{{else}}partners{{end}} in the Inventory; looked at once a month by itself.{{else}}No partners in the <a href="/inventory">Inventory</a> yet: add the projects and companies you work with, with their websites.{{end}}</span>
<span class="small muted">{{if $d.Partners}}{{$d.Partners}} {{if eq $d.Partners 1}}partner{{else}}partners{{end}} in the Market; looked at once a month by itself.{{else}}No partners in the <a href="/market">Market</a> yet: add the projects and companies you work with, with their websites.{{end}}</span>
</div>
{{with $d.Competitors}}
<form method="post" action="/seo/links/alternatives?site={{$d.Current.Index}}" class="row" data-busy="Searching…">
@@ -100,7 +100,7 @@
<button type="submit" class="secondary small" {{if $d.Research}}disabled{{end}}>Find them (up to 4 web searches)</button>
{{with $d.Research}}<span class="small warn-text">{{.}}</span>{{end}}
</form>
{{else}}<p class="small muted">Add competitors to the <a href="/inventory">Inventory</a> to look for lists of alternatives to them.</p>{{end}}
{{else}}<p class="small muted">Add competitors to the <a href="/market">Market</a> to look for lists of alternatives to them.</p>{{end}}
{{with $d.Opportunities}}
<table class="list">
<thead><tr><th>Page</th><th>Why</th><th>Status</th><th></th></tr></thead>
+1 -1
View File
@@ -1,7 +1,7 @@
{{define "content"}}{{with .Data}}{{$d := .}}
<p><a href="/sites{{with .Current}}?site={{.Index}}{{end}}">← Sections and pages</a></p>
<h1>Add a section</h1>
<p class="lede">One more section on a page that's already on the site, of one of the site's own types: a FAQ for the questions people search, a comparison table, more features. The AI writes it from the page, your profile and the Inventory, with the same rules as a new page: nothing invented, claims of experience to confirm, a pull request that adds only that section.</p>
<p class="lede">One more section on a page that's already on the site, of one of the site's own types: a FAQ for the questions people search, a comparison table, more features. The AI writes it from the page, your profile and the Market, with the same rules as a new page: nothing invented, claims of experience to confirm, a pull request that adds only that section.</p>
{{with .Page}}
<form method="post" action="/sites/pages/add?site={{$d.Current.Index}}" class="card" data-busy="Reading the page and writing…">
<input type="hidden" name="page" value="{{.Path}}">