Phase 6 part 5, step 2: start a new site
Sites → New site fills an empty Gitea repository with the theme, a hugo.toml in the site's brand and a starter home page: checked that the repository is empty and builds with Hugo, then the first commit is pushed to its default branch. The site joins the profile, and a First pages card builds its Home, About, Contact and product pages with the page builder; About and Contact join the top menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
<a href="/sites/previews" {{if eq $nav "sites/previews"}}aria-current="page"{{end}}>Previews</a>
|
||||
<a href="/sites/publishing" {{if eq $nav "sites/publishing"}}aria-current="page"{{end}}>Publishing</a>
|
||||
<a href="/sites/forms" {{if eq $nav "sites/forms"}}aria-current="page"{{end}}>Lead forms</a>
|
||||
<a href="/sites/new" {{if eq $nav "sites/new"}}aria-current="page"{{end}}>New site</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if eq .ID "prospects"}}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{{define "content"}}{{with .Data}}{{$n := .N}}
|
||||
<div class="heading"><h1>A new site</h1></div>
|
||||
<p class="lede">Start a website with Supermarket's theme: federated-website's look and sections, in your brand. Supermarket fills an empty Gitea repository with the theme, the settings and a starter home page; then you build its pages here, as pull requests.</p>
|
||||
|
||||
<section class="card">
|
||||
<h2>1. In Gitea</h2>
|
||||
<p>Create a new, <strong>empty</strong> repository{{with .Gitea}} on <a href="{{.}}/repo/create" target="_blank" rel="noopener noreferrer">{{.}}</a>{{end}}: no README, license or .gitignore. Supermarket makes its first commit.</p>
|
||||
<p class="small muted">Publishing the site is your Gitea's job, as for your other sites: add the deploy hook that builds it with Hugo on your web server, and point the address below at it.</p>
|
||||
{{if not .Gitea}}<p class="warn-text">Save a Gitea token under <a href="/settings/search">Settings → Search engines</a> first.</p>{{end}}
|
||||
</section>
|
||||
|
||||
<form method="post" action="/sites/new" class="card">
|
||||
<h2>2. The site</h2>
|
||||
<div class="cols">
|
||||
<label>Repository <input name="repo" value="{{$n.Repo}}" placeholder="owner/name" required></label>
|
||||
<label>Its address <input name="url" value="{{$n.URL}}" placeholder="https://www.example.com" required></label>
|
||||
</div>
|
||||
<div class="cols">
|
||||
<label>Name <input name="title" value="{{$n.Title}}" placeholder="Acme Widgets" required></label>
|
||||
<label>Contact email <span class="muted">(where forms go until they're connected to EspoCRM)</span> <input name="email" type="email" value="{{$n.Email}}"></label>
|
||||
</div>
|
||||
<label>Tagline <input name="tagline" value="{{$n.Tagline}}" placeholder="What the company does, in a line."></label>
|
||||
|
||||
<h3>Brand</h3>
|
||||
<div class="cols">
|
||||
<label>Dark <span class="muted">(top bar, hero, closing band)</span> <input type="color" name="dark" value="{{$n.Dark}}"></label>
|
||||
<label>Primary <span class="muted">(the main button)</span> <input type="color" name="primary" value="{{$n.Primary}}"></label>
|
||||
<label>Accent <span class="muted">(links, highlights)</span> <input type="color" name="accent" value="{{$n.Accent}}"></label>
|
||||
</div>
|
||||
<div class="cols">
|
||||
<label>Font <select name="font">{{range .Fonts}}<option {{if eq . $n.Font}}selected{{end}}>{{.}}</option>{{end}}</select></label>
|
||||
<label>Logo <span class="muted">(optional: an image's https:// address, or a path on the site; without one, the name shows)</span> <input name="logo" value="{{$n.Logo}}"></label>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button type="submit" data-busy="Starting the site…" {{if not .Gitea}}disabled{{end}}>Start the site</button>
|
||||
</div>
|
||||
<p class="small muted">It checks the repository is empty and builds the site with Hugo before pushing anything. Colors, font and logo can be changed later in the site's <code>hugo.toml</code>.</p>
|
||||
</form>
|
||||
{{end}}{{end}}
|
||||
@@ -26,6 +26,23 @@
|
||||
{{end}}
|
||||
|
||||
{{with .Catalog}}
|
||||
{{if $d.Theme}}
|
||||
<section class="card">
|
||||
<h2>First pages</h2>
|
||||
<p>This site uses Supermarket's theme (version {{$d.Theme}}). Build its pages: each is written from your profile, opens for you to edit and preview, and goes to the site as a pull request.</p>
|
||||
<div class="row-actions">
|
||||
{{range $d.Kinds}}
|
||||
<form method="post" action="/sites/pages"><input type="hidden" name="site" value="{{$d.Current.Index}}"><input type="hidden" name="kind" value="{{.}}">
|
||||
<button type="submit" class="secondary" data-busy="Writing…">{{kindLabel .}}</button></form>
|
||||
{{end}}
|
||||
{{range $d.Products}}
|
||||
<form method="post" action="/sites/pages"><input type="hidden" name="site" value="{{$d.Current.Index}}"><input type="hidden" name="kind" value="product"><input type="hidden" name="product" value="{{.Name}}">
|
||||
<button type="submit" class="secondary" data-busy="Writing…">Product page: {{.Name}}</button></form>
|
||||
{{end}}
|
||||
</div>
|
||||
<p class="small muted">Each uses the AI (a paid call). About and Contact join the top menu; Contact has a lead form: connect it under <a href="/sites/forms?site={{$d.Current.Index}}">Lead forms</a>.</p>
|
||||
</section>
|
||||
{{end}}
|
||||
{{with $d.Commits}}
|
||||
<h2>Latest on the published branch</h2>
|
||||
<div class="table-wrap"><table class="compact">
|
||||
|
||||
Reference in New Issue
Block a user