Compare commits

...

3 Commits

Author SHA1 Message Date
0845a636b4 Rename to new 2025-01-26 00:37:57 +01:00
6df1ac0a70 Use nav in header 2025-01-26 00:37:01 +01:00
65f639179d Fix postgresql.conf mounting 2025-01-26 00:33:59 +01:00
5 changed files with 6 additions and 9 deletions

View File

@ -15,7 +15,7 @@ services:
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./db/schema.sql:/docker-entrypoint-initdb.d/schema.sql
# for some reason this can't be mounted on first run
- ./db/postgresql.conf:/var/lib/postgresql/data/postgresql.conf
- ./db/postgresql.conf:/etc/postgresql/data/postgresql.conf
volumes:
delphi:

View File

@ -20,7 +20,7 @@ import (
"github.com/lightningnetwork/lnd/lnwire"
)
func HandleCreate(sc context.Context) echo.HandlerFunc {
func HandleNew(sc context.Context) echo.HandlerFunc {
return func(c echo.Context) error {
var (
db = sc.Db

View File

@ -13,7 +13,8 @@ templ Nav() {
hx-push-url="true"
>
<div>
<button hx-get="/">home</button>
<button hx-get="/">markets</button>
<button hx-get="/new">new</button>
</div>
<div class="ms-auto">
<button hx-get="/about">about</button>

View File

@ -25,10 +25,6 @@ templ Index(markets []types.Market) {
hx-select="#grid-container"
hx-push-url="true"
>
<div class="border border-muted">
<button hx-get="/" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/") + " !py-1 !px-3" }>markets</button>
<button hx-get="/create" class={ tabStyle(ctx.Value(c.ReqPathContextKey).(string), "/create") + " !py-1 !px-3" }>create</button>
</div>
if ctx.Value(c.ReqPathContextKey).(string) == "/" {
<div class="grid grid-cols-[auto_fit-content(10%)_fit-content(10%)]">
for _, m := range markets {

View File

@ -14,8 +14,8 @@ func Init(e *echo.Echo, sc Context) {
e.Use(middleware.Session(sc))
e.GET("/", handler.HandleIndex(sc))
e.GET("/create", handler.HandleIndex(sc))
e.POST("/create", handler.HandleCreate(sc), middleware.SessionGuard(sc))
e.GET("/new", handler.HandleIndex(sc))
e.POST("/new", handler.HandleNew(sc), middleware.SessionGuard(sc))
e.GET("/market/:id", handler.HandleMarket(sc))
e.POST("/market/:id/order", handler.HandleOrder(sc), middleware.SessionGuard(sc))
e.GET("/about", handler.HandleAbout(sc))