Abandoned GUI Prototype ™
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

22 lines
598 B

package components
import (
"fmt"
)
templ Homepage(sites []string) {
if len(sites) != 0 {
<div>Configure an existing Hugo site below 👇</div>
<ul>
for _, site := range sites {
<li><a href={ templ.URL(fmt.Sprintf("/%s/config", site)) }>{ site }</a></li>
}
</ul>
}
<div>Create a new Hugo site below 👇</div>
<form id="new-site-form" hx-post="/hugo/new" hx-indicator="#new-site-loader" hx-trigger="submit">
<input type="text" required="required" name="site-name" />
<p id="new-site-loader" class="htmx-indicator">Creating new site...</p>
</form>
}