16 lines
298 B
Go
16 lines
298 B
Go
|
package app
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
|
||
|
"git.akyoto.dev/go/web"
|
||
|
"git.akyoto.dev/go/web/send"
|
||
|
)
|
||
|
|
||
|
func Render(ctx web.Context, head string, body string) error {
|
||
|
html := HTML
|
||
|
html = strings.Replace(html, "{head}", head, 1)
|
||
|
html = strings.Replace(html, "{body}", body, 1)
|
||
|
return send.HTML(ctx, html)
|
||
|
}
|