rename
This commit is contained in:
parent
00ed9b7b7e
commit
cc9d489fe1
16 changed files with 33 additions and 26 deletions
|
|
@ -1 +1,3 @@
|
||||||
module github.com/maddalax/mhtml/framework/tooling/astgen
|
module github.com/maddalax/mhtml/framework/tooling/astgen
|
||||||
|
|
||||||
|
go 1.23.0
|
||||||
|
|
@ -1 +1,3 @@
|
||||||
module github.com/maddalax/mhtml/framework/tooling/copyassets
|
module github.com/maddalax/mhtml/framework/tooling/copyassets
|
||||||
|
|
||||||
|
go 1.23.0
|
||||||
|
|
@ -1 +1,3 @@
|
||||||
module github.com/maddalax/mhtml/framework/tooling/downloadtemplate
|
module github.com/maddalax/mhtml/framework/tooling/downloadtemplate
|
||||||
|
|
||||||
|
go 1.23.0
|
||||||
|
|
@ -1 +1,3 @@
|
||||||
module github.com/maddalax/mhtml/framework/tooling/mhtml
|
module github.com/maddalax/mhtml/framework/tooling/mhtml
|
||||||
|
|
||||||
|
go 1.23.0
|
||||||
3
setup.md
3
setup.md
|
|
@ -1,2 +1 @@
|
||||||
go install github.com/maddalax/mhtml/framework/tooling/mhtml
|
go run github.com/maddalax/mhtml/framework/tooling/mhtml@latest -task template
|
||||||
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/maddalax/mhtml/starter-template/database"
|
"starter-template/database"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module github.com/maddalax/mhtml/starter-template
|
module starter-template
|
||||||
|
|
||||||
go 1.23.0
|
go 1.23.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@ import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/pages"
|
|
||||||
"github.com/maddalax/mhtml/starter-template/partials/load"
|
|
||||||
"log"
|
"log"
|
||||||
|
"starter-template/pages"
|
||||||
|
"starter-template/partials/load"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package news
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/database"
|
"starter-template/database"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/partials"
|
"starter-template/partials"
|
||||||
"github.com/maddalax/mhtml/starter-template/partials/sheet"
|
"starter-template/partials/sheet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func RootPage(children ...h.Renderable) h.Renderable {
|
func RootPage(children ...h.Renderable) h.Renderable {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package pages
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/pages/base"
|
"starter-template/pages/base"
|
||||||
"github.com/maddalax/mhtml/starter-template/partials"
|
"starter-template/partials"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ListPage(ctx *fiber.Ctx) *h.Page {
|
func ListPage(ctx *fiber.Ctx) *h.Page {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package pages
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/pages/base"
|
"starter-template/pages/base"
|
||||||
"github.com/maddalax/mhtml/starter-template/partials/patient"
|
"starter-template/partials/patient"
|
||||||
)
|
)
|
||||||
|
|
||||||
func PatientsIndex(ctx *fiber.Ctx) *h.Page {
|
func PatientsIndex(ctx *fiber.Ctx) *h.Page {
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ package load
|
||||||
|
|
||||||
import "github.com/maddalax/mhtml/framework/h"
|
import "github.com/maddalax/mhtml/framework/h"
|
||||||
import "github.com/gofiber/fiber/v2"
|
import "github.com/gofiber/fiber/v2"
|
||||||
import "github.com/maddalax/mhtml/starter-template/partials"
|
import "starter-template/partials"
|
||||||
import "github.com/maddalax/mhtml/starter-template/partials/patient"
|
import "starter-template/partials/patient"
|
||||||
import "github.com/maddalax/mhtml/starter-template/partials/sheet"
|
import "starter-template/partials/sheet"
|
||||||
|
|
||||||
func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial {
|
func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial {
|
||||||
path := ctx.Path()
|
path := ctx.Path()
|
||||||
|
|
@ -34,7 +34,7 @@ func GetPartialFromContext(ctx *fiber.Ctx) *h.Partial {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterPartials(f *fiber.App) {
|
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)
|
partial := GetPartialFromContext(ctx)
|
||||||
if partial == nil {
|
if partial == nil {
|
||||||
return ctx.SendStatus(404)
|
return ctx.SendStatus(404)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/maddalax/mhtml/framework-ui/ui"
|
"github.com/maddalax/mhtml/framework-ui/ui"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/news"
|
"starter-template/news"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewsSheet(ctx *fiber.Ctx) *h.Partial {
|
func NewsSheet(ctx *fiber.Ctx) *h.Partial {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ package patient
|
||||||
import (
|
import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/features/patient"
|
"starter-template/features/patient"
|
||||||
"github.com/maddalax/mhtml/starter-template/partials/sheet"
|
"starter-template/partials/sheet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Create(ctx *fiber.Ctx) *h.Partial {
|
func Create(ctx *fiber.Ctx) *h.Partial {
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/maddalax/mhtml/framework-ui/ui"
|
"github.com/maddalax/mhtml/framework-ui/ui"
|
||||||
"github.com/maddalax/mhtml/framework/h"
|
"github.com/maddalax/mhtml/framework/h"
|
||||||
"github.com/maddalax/mhtml/starter-template/features/patient"
|
"starter-template/features/patient"
|
||||||
"github.com/maddalax/mhtml/starter-template/partials/sheet"
|
"starter-template/partials/sheet"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue