From 228e19ee857000691e0319659dcc414b26c5d373 Mon Sep 17 00:00:00 2001 From: xing Date: Thu, 15 Jun 2023 18:00:57 +0800 Subject: [PATCH] =?UTF-8?q?order=E6=95=B0=E5=80=BC=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/theme/twentyfifteen/twentyfifteen.go | 18 +++++++++--------- app/theme/twentyseventeen/script.go | 2 +- app/theme/twentyseventeen/twentyseventeen.go | 18 +++++++++--------- app/theme/wp/components.go | 16 ++++++++-------- app/theme/wp/components/widgetareadata.go | 4 +++- app/theme/wp/customheader.go | 8 ++++---- app/theme/wp/pipe.go | 4 ++-- app/theme/wp/wp.go | 8 ++++---- 8 files changed, 40 insertions(+), 38 deletions(-) diff --git a/app/theme/twentyfifteen/twentyfifteen.go b/app/theme/twentyfifteen/twentyfifteen.go index 93f1306..cec4cbf 100644 --- a/app/theme/twentyfifteen/twentyfifteen.go +++ b/app/theme/twentyfifteen/twentyfifteen.go @@ -26,19 +26,19 @@ func configs(h *wp.Handle) { wp.NewHandleFn(widget.IsCategory, 100, "widget.IsCategory")) h.Index.SetPageEle(plugins.TwentyFifteenPagination()) - h.PushCacheGroupHeadScript(constraints.AllScene, "CalCustomBackGround", 10, CalCustomBackGround) - h.PushCacheGroupHeadScript(constraints.AllScene, "colorSchemeCss", 10, colorSchemeCss) + h.PushCacheGroupHeadScript(constraints.AllScene, "CalCustomBackGround", 10.005, CalCustomBackGround) + h.PushCacheGroupHeadScript(constraints.AllScene, "colorSchemeCss", 10.0056, colorSchemeCss) h.CommonComponents() components.WidgetArea(h) wp.ReplyCommentJs(h) h.SetData("customHeader", customHeader(h)) - wp.PushIndexHandler(constraints.PipeRender, h, wp.NewHandleFn(wp.IndexRender, 50, "wp.IndexRender")) - h.PushRender(constraints.Detail, wp.NewHandleFn(wp.DetailRender, 50, "wp.DetailRender")) - h.PushRender(constraints.Detail, wp.NewHandleFn(postThumb, 60, "postThumb")) - h.PushDataHandler(constraints.Detail, wp.NewHandleFn(wp.Detail, 100, "wp.Detail")) - wp.PushIndexHandler(constraints.PipeData, h, wp.NewHandleFn(wp.Index, 100, "wp.Index")) - h.PushDataHandler(constraints.AllScene, wp.NewHandleFn(wp.PreCodeAndStats, 80, "wp.PreCodeAndStats")) - h.PushRender(constraints.AllScene, wp.NewHandleFn(wp.PreTemplate, 70, "wp.PreTemplate")) + wp.PushIndexHandler(constraints.PipeRender, h, wp.NewHandleFn(wp.IndexRender, 50.005, "wp.IndexRender")) + h.PushRender(constraints.Detail, wp.NewHandleFn(wp.DetailRender, 50.005, "wp.DetailRender")) + h.PushRender(constraints.Detail, wp.NewHandleFn(postThumb, 60.005, "postThumb")) + h.PushDataHandler(constraints.Detail, wp.NewHandleFn(wp.Detail, 100.005, "wp.Detail")) + wp.PushIndexHandler(constraints.PipeData, h, wp.NewHandleFn(wp.Index, 100.005, "wp.Index")) + h.PushDataHandler(constraints.AllScene, wp.NewHandleFn(wp.PreCodeAndStats, 80.005, "wp.PreCodeAndStats")) + h.PushRender(constraints.AllScene, wp.NewHandleFn(wp.PreTemplate, 70.005, "wp.PreTemplate")) } func postThumb(h *wp.Handle) { diff --git a/app/theme/twentyseventeen/script.go b/app/theme/twentyseventeen/script.go index a2a10d3..576f9a1 100644 --- a/app/theme/twentyseventeen/script.go +++ b/app/theme/twentyseventeen/script.go @@ -15,7 +15,7 @@ func pushScripts(h *wp.Handle) { } return head }) - h.PushGroupFooterScript(constraints.AllScene, "{theme}.footer", 20, footerScript) + h.PushGroupFooterScript(constraints.AllScene, "{theme}.footer", 20.005, footerScript) } diff --git a/app/theme/twentyseventeen/twentyseventeen.go b/app/theme/twentyseventeen/twentyseventeen.go index 29c80d6..0027cdd 100644 --- a/app/theme/twentyseventeen/twentyseventeen.go +++ b/app/theme/twentyseventeen/twentyseventeen.go @@ -37,19 +37,19 @@ func Hook(h *wp.Handle) { func configs(h *wp.Handle) { wp.InitPipe(h) h.PushHandler(constraints.PipeMiddleware, constraints.Home, - wp.NewHandleFn(widget.IsCategory, 100, "widget.IsCategory")) + wp.NewHandleFn(widget.IsCategory, 100.006, "widget.IsCategory")) h.PushComponentFilterFn("bodyClass", calClass) h.PushCacheGroupHeadScript(constraints.AllScene, "colorScheme-customHeader", 10, colorScheme, customHeader) components.WidgetArea(h) pushScripts(h) - h.PushRender(constraints.AllStats, wp.NewHandleFn(calCustomHeader, 10, "calCustomHeader")) + h.PushRender(constraints.AllStats, wp.NewHandleFn(calCustomHeader, 10.005, "calCustomHeader")) h.SetComponentsArgs(widgets.Widget, map[string]string{ "{$before_widget}": `
`, "{$after_widget}": `
`, }) h.PushRender(constraints.AllStats, - wp.NewHandleFn(wp.PreTemplate, 70, "wp.PreTemplate"), - wp.NewHandleFn(errorsHandle, 80, "errorsHandle"), + wp.NewHandleFn(wp.PreTemplate, 70.005, "wp.PreTemplate"), + wp.NewHandleFn(errorsHandle, 80.005, "errorsHandle"), ) videoHeader(h) h.Detail.CommentRender = commentFormat @@ -58,11 +58,11 @@ func configs(h *wp.Handle) { wp.ReplyCommentJs(h) h.PushPostPlugin(postThumbnail) wp.SetComponentsArgsForMap(h, widgets.Search, "{$form}", searchForm) - wp.PushIndexHandler(constraints.PipeRender, h, wp.NewHandleFn(wp.IndexRender, 10, "wp.IndexRender")) - h.PushRender(constraints.Detail, wp.NewHandleFn(wp.DetailRender, 10, "wp.DetailRender")) - h.PushDataHandler(constraints.Detail, wp.NewHandleFn(wp.Detail, 100, "wp.Detail"), wp.NewHandleFn(postThumb, 90, "{theme}.postThumb")) - wp.PushIndexHandler(constraints.PipeData, h, wp.NewHandleFn(wp.Index, 100, "wp.Index")) - h.PushDataHandler(constraints.AllScene, wp.NewHandleFn(wp.PreCodeAndStats, 90, "wp.PreCodeAndStats")) + wp.PushIndexHandler(constraints.PipeRender, h, wp.NewHandleFn(wp.IndexRender, 10.005, "wp.IndexRender")) + h.PushRender(constraints.Detail, wp.NewHandleFn(wp.DetailRender, 10.005, "wp.DetailRender")) + h.PushDataHandler(constraints.Detail, wp.NewHandleFn(wp.Detail, 100.005, "wp.Detail"), wp.NewHandleFn(postThumb, 90.005, "{theme}.postThumb")) + wp.PushIndexHandler(constraints.PipeData, h, wp.NewHandleFn(wp.Index, 100.005, "wp.Index")) + h.PushDataHandler(constraints.AllScene, wp.NewHandleFn(wp.PreCodeAndStats, 90.005, "wp.PreCodeAndStats")) } var searchForm = `