This commit is contained in:
maddalax 2024-09-13 16:33:50 -05:00
parent 00ed9b7b7e
commit cc9d489fe1
16 changed files with 33 additions and 26 deletions

View file

@ -1 +1,3 @@
module github.com/maddalax/mhtml/framework/tooling/astgen
module github.com/maddalax/mhtml/framework/tooling/astgen
go 1.23.0

View file

@ -1 +1,3 @@
module github.com/maddalax/mhtml/framework/tooling/copyassets
module github.com/maddalax/mhtml/framework/tooling/copyassets
go 1.23.0

View file

@ -1 +1,3 @@
module github.com/maddalax/mhtml/framework/tooling/downloadtemplate
module github.com/maddalax/mhtml/framework/tooling/downloadtemplate
go 1.23.0

View file

@ -1 +1,3 @@
module github.com/maddalax/mhtml/framework/tooling/mhtml
module github.com/maddalax/mhtml/framework/tooling/mhtml
go 1.23.0

View file

@ -1,2 +1 @@
go install github.com/maddalax/mhtml/framework/tooling/mhtml
go run github.com/maddalax/mhtml/framework/tooling/mhtml@latest -task template

View file

@ -4,7 +4,7 @@ import (
"errors"
"github.com/gofiber/fiber/v2"
"github.com/google/uuid"
"github.com/maddalax/mhtml/starter-template/database"
"starter-template/database"
"time"
)

View file

@ -1,4 +1,4 @@
module github.com/maddalax/mhtml/starter-template
module starter-template
go 1.23.0

View file

@ -4,9 +4,9 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/google/uuid"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/pages"
"github.com/maddalax/mhtml/starter-template/partials/load"
"log"
"starter-template/pages"
"starter-template/partials/load"
"time"
)

View file

@ -3,7 +3,7 @@ package news
import (
"fmt"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/database"
"starter-template/database"
"time"
)

View file

@ -2,8 +2,8 @@ package base
import (
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/partials"
"github.com/maddalax/mhtml/starter-template/partials/sheet"
"starter-template/partials"
"starter-template/partials/sheet"
)
func RootPage(children ...h.Renderable) h.Renderable {

View file

@ -3,8 +3,8 @@ package pages
import (
"github.com/gofiber/fiber/v2"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/pages/base"
"github.com/maddalax/mhtml/starter-template/partials"
"starter-template/pages/base"
"starter-template/partials"
)
func ListPage(ctx *fiber.Ctx) *h.Page {

View file

@ -3,8 +3,8 @@ package pages
import (
"github.com/gofiber/fiber/v2"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/pages/base"
"github.com/maddalax/mhtml/starter-template/partials/patient"
"starter-template/pages/base"
"starter-template/partials/patient"
)
func PatientsIndex(ctx *fiber.Ctx) *h.Page {

View file

@ -3,9 +3,9 @@ package load
import "github.com/maddalax/mhtml/framework/h"
import "github.com/gofiber/fiber/v2"
import "github.com/maddalax/mhtml/starter-template/partials"
import "github.com/maddalax/mhtml/starter-template/partials/patient"
import "github.com/maddalax/mhtml/starter-template/partials/sheet"
import "starter-template/partials"
import "starter-template/partials/patient"
import "starter-template/partials/sheet"
func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial {
path := ctx.Path()
@ -34,7 +34,7 @@ func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial {
}
func RegisterPartials(f *fiber.App) {
f.All("github.com/maddalax/mhtml/starter-template/partials*", func(ctx *fiber.Ctx) error {
f.All("starter-template/partials*", func(ctx *fiber.Ctx) error {
partial := GetPartialFromContext(ctx)
if partial == nil {
return ctx.SendStatus(404)

View file

@ -5,7 +5,7 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/maddalax/mhtml/framework-ui/ui"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/news"
"starter-template/news"
)
func NewsSheet(ctx *fiber.Ctx) *h.Partial {

View file

@ -3,8 +3,8 @@ package patient
import (
"github.com/gofiber/fiber/v2"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/features/patient"
"github.com/maddalax/mhtml/starter-template/partials/sheet"
"starter-template/features/patient"
"starter-template/partials/sheet"
)
func Create(ctx *fiber.Ctx) *h.Partial {

View file

@ -4,8 +4,8 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/maddalax/mhtml/framework-ui/ui"
"github.com/maddalax/mhtml/framework/h"
"github.com/maddalax/mhtml/starter-template/features/patient"
"github.com/maddalax/mhtml/starter-template/partials/sheet"
"starter-template/features/patient"
"starter-template/partials/sheet"
"strings"
)