From 4b58544300847e5faf19be5baa4eb177a86b2b0f Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Thu, 17 Jul 2025 21:52:26 +0100 Subject: Add automatic index --- pkg/html/notfound.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 pkg/html/notfound.go (limited to 'pkg/html/notfound.go') diff --git a/pkg/html/notfound.go b/pkg/html/notfound.go new file mode 100644 index 0000000..ceb521f --- /dev/null +++ b/pkg/html/notfound.go @@ -0,0 +1,25 @@ +package html + +import ( + "fmt" + + . "github.com/LMBishop/scrapbook/web/skeleton" + . "maragu.dev/gomponents" + . "maragu.dev/gomponents/html" +) + +func NotFoundUrlPage(url, host string) Node { + return Page("Page not found", + H1(Text("Page not found")), + + P(Text(fmt.Sprintf("The URL %s could not be found on site %s", url, host))), + ) +} + +func NotFoundSitePage(host string) Node { + return Page("Site not found", + H1(Text("Site not found")), + + P(Text(fmt.Sprintf("The site %s is unknown", host))), + ) +} -- cgit v1.2.3-70-g09d2