aboutsummaryrefslogtreecommitdiffstats
path: root/web/command/html/create.go
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.net>2025-07-17 21:52:26 +0100
committerLeonardo Bishop <me@leonardobishop.net>2025-07-17 21:52:26 +0100
commit4b58544300847e5faf19be5baa4eb177a86b2b0f (patch)
tree60c43bfe7ec7c1cd46a12db73946aad03ebff01f /web/command/html/create.go
parentd6a028feb7e7c3657f846889a1c0edf9f22e8dd2 (diff)
Add automatic index
Diffstat (limited to 'web/command/html/create.go')
-rw-r--r--web/command/html/create.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/web/command/html/create.go b/web/command/html/create.go
index 8b76776..47de92f 100644
--- a/web/command/html/create.go
+++ b/web/command/html/create.go
@@ -1,6 +1,7 @@
package html
import (
+ . "github.com/LMBishop/scrapbook/web/skeleton"
. "maragu.dev/gomponents"
. "maragu.dev/gomponents/html"
)
@@ -11,19 +12,19 @@ type CreatePageForm struct {
}
func CreatePage(success, err string, formValues CreatePageForm) Node {
- return page("Create site",
+ return Page("Create site",
H1(Text("Create site")),
If(success != "", Group{
- alertSuccess(success),
+ AlertSuccess(success),
Div(
Class("control-group group-right"),
- navButton("OK", "/"),
+ NavButton("OK", "/"),
),
}),
If(success == "", Group{
- If(err != "", alertError(err)),
+ If(err != "", AlertError(err)),
Form(
Action("/create"),
@@ -62,7 +63,7 @@ func CreatePage(success, err string, formValues CreatePageForm) Node {
Div(
Class("control-group group-right"),
- navButton("Go back", "/"),
+ NavButton("Go back", "/"),
Input(
Type("submit"),
Value("Submit"),