2023-02-11 15:51:07 +00:00
|
|
|
package actions
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/fthvgb1/wp-go/internal/theme"
|
2023-03-01 05:17:12 +00:00
|
|
|
"github.com/fthvgb1/wp-go/internal/theme/wp"
|
2023-02-11 15:51:07 +00:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
func ThemeHook(scene int) func(*gin.Context) {
|
|
|
|
return func(ctx *gin.Context) {
|
2023-02-14 11:47:47 +00:00
|
|
|
t := theme.GetTemplateName()
|
2023-03-01 05:17:12 +00:00
|
|
|
h := wp.NewHandle(ctx, scene, t)
|
|
|
|
h.Index = wp.NewIndexHandle(h)
|
|
|
|
h.Detail = wp.NewDetailHandle(h)
|
2023-02-24 11:34:19 +00:00
|
|
|
theme.Hook(t, h)
|
2023-02-11 15:51:07 +00:00
|
|
|
}
|
|
|
|
}
|