debugged image serving and fixed a couple of images in the frame

This commit is contained in:
2025-09-14 15:51:27 -06:00
parent 3fe226938c
commit ae3c9ca748
5 changed files with 32 additions and 12 deletions
+1 -5
View File
@@ -9,8 +9,6 @@
package main
import (
"fmt"
"git.erbosoft.com/amy/amsterdam/ui"
"github.com/labstack/echo/v4"
)
@@ -18,9 +16,7 @@ import (
func setupEcho() *echo.Echo {
e := echo.New()
e.Renderer = &ui.TemplateRenderer{}
e.GET("/img/*", ui.AmWrap(func(ctxt ui.AmContext) (string, any, error) {
return "string", fmt.Sprintf("Path: %s", ctxt.URLPath()), nil
}))
e.GET("/img/*", ui.AmWrap(ui.AmServeImage))
e.GET("/", ui.AmWrap(func(ctxt ui.AmContext) (string, any, error) {
ctxt.VarMap().Set("amsterdam_pageTitle", "My Front Page")
return "framed_template", "top.jet", nil