aboutsummaryrefslogtreecommitdiffstats
path: root/web/command/html/home.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/home.go
parentd6a028feb7e7c3657f846889a1c0edf9f22e8dd2 (diff)
Add automatic index
Diffstat (limited to 'web/command/html/home.go')
-rw-r--r--web/command/html/home.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/web/command/html/home.go b/web/command/html/home.go
index 5dc236a..6de30bd 100644
--- a/web/command/html/home.go
+++ b/web/command/html/home.go
@@ -5,16 +5,17 @@ import (
"github.com/LMBishop/scrapbook/pkg/index"
"github.com/LMBishop/scrapbook/pkg/site"
+ . "github.com/LMBishop/scrapbook/web/skeleton"
. "maragu.dev/gomponents"
. "maragu.dev/gomponents/html"
)
func HomePage(siteIndex *index.SiteIndex) Node {
- return page("All sites",
+ return Page("All sites",
H1(Text("All sites")),
Div(
- Class("sites-table"),
+ Class("table sites-table"),
Group{
Span(
Class("header name"),
@@ -58,18 +59,18 @@ func HomePage(siteIndex *index.SiteIndex) Node {
),
Span(
Class("actions"),
- navButton("Details", fmt.Sprintf("/site/%s/", site.Name)),
+ NavButton("Details", fmt.Sprintf("/site/%s/", site.Name)),
),
}
}),
),
- If(len(siteIndex.GetSites()) == 0, alert("There are no sites to display", "")),
+ If(len(siteIndex.GetSites()) == 0, Alert("There are no sites to display", "")),
Div(
Class("control-group group-right"),
- navButton("Create new", "/create"),
+ NavButton("Create new", "/create"),
),
)
}