blob: a46d5ed3d52cf077c62ad4c0f6b960b280d2c7fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package handler
import (
"net/http"
"github.com/LMBishop/scrapbook/pkg/config"
"github.com/LMBishop/scrapbook/pkg/index"
"github.com/LMBishop/scrapbook/web/command/html"
. "maragu.dev/gomponents"
ghttp "maragu.dev/gomponents/http"
)
func GetHome(mainConfig *config.MainConfig, index *index.SiteIndex) func(http.ResponseWriter, *http.Request) {
return ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (Node, error) {
return html.HomePage(index), nil
})
}
|