Files
supermarket/internal/web/templates/profile.html
T
davidandClaude Opus 5.5 cd24f2a06d Phase 1, part 4: promote the company's own products
- Content lists the company first, at /content/own: its products from
  the profile (always there to pick from), its own feeds (a new profile
  field for the blog, news and releases), and new or updated pages from
  its websites' sitemaps, with each page's title and description.
- Drafts from it are kind "product" (utm_campaign=product), filed under
  the company's name, and prompted to promote the company's own work
  without unsupported claims; on Reddit, in the makers' voice, with a
  warning that self-promotion is often restricted.

This completes Phase 1.

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

108 lines
5.8 KiB
HTML

{{define "content"}}{{with .Data}}
<h1>Company profile</h1>
<p class="lede">Everything Supermarket writes, targets and audits starts here.</p>
<form class="card inline-form" method="post" action="/profile/draft">
<label for="draft_url"><strong>Draft from your website</strong></label>
<p class="help">Reads your home page and a few pages it links to (about, products, pricing), and fills in what's empty below. Nothing is saved until you press Save.</p>
<div class="row">
<input id="draft_url" name="draft_url" type="url" placeholder="https://example.com" value="{{.DraftURL}}" required>
<button type="submit" class="secondary">Draft</button>
</div>
<p class="help">Takes up to a minute or two.</p>
</form>
{{if .Drafted}}<p class="flash">Here's a draft. Check every field, correct what's wrong, then Save.</p>{{end}}
<form method="post" action="/profile">
{{with .P}}
<section class="card">
<h2>The company</h2>
<label>Name <input name="name" value="{{.Name}}" required></label>
<label>What it does <textarea name="description" rows="3" required>{{.Description}}</textarea>
<span class="help">Two or three sentences: what you sell and to whom.</span></label>
<label>Positioning <textarea name="positioning" rows="2">{{.Positioning}}</textarea>
<span class="help">How you differ from the alternatives.</span></label>
<label>Voice <textarea name="voice" rows="2">{{.Voice}}</textarea>
<span class="help">How posts should sound, e.g. "plain, practical, friendly; no hype".</span></label>
<label>Words and claims to avoid <textarea name="avoid" rows="3">{{lines .Avoid}}</textarea>
<span class="help">One per line.</span></label>
<label>Keywords <textarea name="keywords" rows="4">{{lines .Keywords}}</textarea>
<span class="help">Search phrases you want to rank for, one per line.</span></label>
</section>
{{end}}
<section class="card">
<h2>Products</h2>
{{range $i, $p := .Products}}
<fieldset>
<legend>{{if $p.Name}}{{$p.Name}}{{else}}Add a product{{end}}</legend>
<div class="cols">
<label>Name <input name="product_name" value="{{$p.Name}}"></label>
<label>Page <input name="product_url" type="url" value="{{$p.URL}}" placeholder="https://"></label>
</div>
<label>Description <textarea name="product_description" rows="2">{{$p.Description}}</textarea></label>
<div class="cols">
<label>Pricing <input name="product_pricing" value="{{$p.Pricing}}" placeholder="e.g. from $15/month"></label>
<label>Benefits <textarea name="product_benefits" rows="3">{{lines $p.Benefits}}</textarea>
<span class="help">One per line.</span></label>
</div>
</fieldset>
{{end}}
<p class="help">To remove a product, clear its name. Save to get another empty row.</p>
</section>
{{with .P.Targets}}
<section class="card">
<h2>Targets</h2>
<p class="help">Your ideal customers. One entry per line in each box.</p>
<div class="cols">
<label>Industries <textarea name="industries" rows="4">{{lines .Industries}}</textarea></label>
<label>Company sizes <textarea name="company_sizes" rows="4">{{lines .CompanySizes}}</textarea></label>
<label>Roles you sell to <textarea name="roles" rows="4">{{lines .Roles}}</textarea></label>
<label>Regions <textarea name="regions" rows="4">{{lines .Regions}}</textarea></label>
<label>Problems you solve <textarea name="problems" rows="4">{{lines .Problems}}</textarea></label>
<label>Buying signals <textarea name="buying_signals" rows="4">{{lines .BuyingSignals}}</textarea>
<span class="help">e.g. "hiring a sysadmin", "asking for a Google Workspace alternative"</span></label>
<label>Technologies they use <textarea name="technologies" rows="4">{{lines .Technologies}}</textarea></label>
</div>
</section>
{{end}}
<section class="card">
<h2>Websites</h2>
{{range .Websites}}
<fieldset>
<legend>{{if .URL}}{{.URL}}{{else}}Add a website{{end}}</legend>
<div class="cols">
<label>Address <input name="website_url" type="url" value="{{.URL}}" placeholder="https://"></label>
<label>Hugo repository on Gitea <input name="website_repo" value="{{.Repo}}" placeholder="https://gitea.example.com/org/site.git"></label>
<label>Branch that gets published <input name="website_branch" value="{{.Branch}}" placeholder="main"></label>
<label>Plausible site <input name="website_plausible" value="{{.PlausibleSite}}" placeholder="example.com"></label>
<label>Google Search Console property <input name="website_gsc" value="{{.SearchConsoleProperty}}" placeholder="sc-domain:example.com"></label>
<label>Bing Webmaster site <input name="website_bing" value="{{.BingSite}}" placeholder="https://example.com/"></label>
</div>
</fieldset>
{{end}}
<p class="help">To remove a website, clear its address.</p>
<label>Feeds of your own <textarea name="feeds" rows="3" placeholder="https://example.com/blog/index.xml">{{lines .P.Feeds}}</textarea>
<span class="help">Your blog, news and release feeds (RSS or Atom; a GitHub or Gitea repository's <code>releases.atom</code> works), one per line. Content → Your company writes posts from them, from your products, and from new pages in your sites' sitemaps.</span></label>
</section>
{{with .P.Accounts}}
<section class="card">
<h2>Accounts</h2>
<div class="cols">
<label>X handle <input name="account_x" value="{{.X}}" placeholder="without @"></label>
<label>LinkedIn page <input name="account_linkedin" value="{{.LinkedIn}}" placeholder="https://www.linkedin.com/company/…"></label>
<label>Reddit user <input name="account_reddit" value="{{.Reddit}}" placeholder="without u/"></label>
<label>Subreddits <textarea name="subreddits" rows="3">{{lines .Subreddits}}</textarea>
<span class="help">Where your customers talk, one per line, without r/.</span></label>
</div>
</section>
{{end}}
<div class="actions"><button type="submit">Save</button></div>
</form>
{{end}}{{end}}