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>
25 lines
1.9 KiB
HTML
25 lines
1.9 KiB
HTML
{{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 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}}">
|
|
<p>On <a href="{{$d.Current.Base}}{{.Path}}" target="_blank" rel="noopener noreferrer">{{.Path}}</a> <strong>{{.Title}}</strong>: {{join .Types " · "}}</p>
|
|
<div class="cols">
|
|
<label>Section type
|
|
<select name="type">{{range $d.Types}}{{if not .Missing}}<option value="{{.Name}}" {{if eq .Name $d.Type}}selected{{end}}>{{.Name}}{{if .Uses}} (used on {{len .Pages}} pages){{end}}</option>{{end}}{{end}}</select>
|
|
</label>
|
|
<label>Where
|
|
<select name="at">{{range $i, $t := .Types}}<option value="{{$i}}">Before section {{inc $i}} ({{$t}})</option>{{end}}<option value="{{len .Types}}" selected>At the end</option></select>
|
|
<span class="help">Before the page's closing call to action reads best, usually.</span>
|
|
</label>
|
|
</div>
|
|
<label>What it's for <span class="muted">(optional)</span>
|
|
<textarea name="notes" rows="3" placeholder="Answer the questions people search for this page; compare us with the big help desks.">{{$d.Notes}}</textarea></label>
|
|
<div class="actions"><button type="submit">Write the section</button></div>
|
|
<p class="small muted">It reads the site's repository first. Writing takes a minute.</p>
|
|
</form>
|
|
{{end}}
|
|
{{end}}{{end}}
|