mux.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. package docsrc
  2. import (
  3. "fmt"
  4. "net/http"
  5. "os"
  6. "strings"
  7. "github.com/go-chi/chi/middleware"
  8. "github.com/qor5/admin/presets"
  9. "github.com/qor5/docs/docsrc/examples/e00_basics"
  10. "github.com/qor5/docs/docsrc/examples/e10_vuetify_autocomplete"
  11. "github.com/qor5/docs/docsrc/examples/e11_vuetify_basic_inputs"
  12. "github.com/qor5/docs/docsrc/examples/e13_vuetify_list"
  13. "github.com/qor5/docs/docsrc/examples/e14_vuetify_menu"
  14. "github.com/qor5/docs/docsrc/examples/e15_vuetify_navigation_drawer"
  15. "github.com/qor5/docs/docsrc/examples/e17_hello_lazy_portals_and_reload"
  16. "github.com/qor5/docs/docsrc/examples/e21_presents"
  17. "github.com/qor5/docs/docsrc/examples/e22_vuetify_variant_sub_form"
  18. "github.com/qor5/docs/docsrc/examples/e23_vuetify_components_kitchen"
  19. "github.com/qor5/docs/docsrc/examples/e24_vuetify_components_linkage_select"
  20. "github.com/qor5/docs/docsrc/examples/example_basics"
  21. "github.com/qor5/docs/docsrc/utils"
  22. "github.com/qor5/ui/tiptap"
  23. v "github.com/qor5/ui/vuetify"
  24. "github.com/qor5/ui/vuetifyx"
  25. "github.com/qor5/web"
  26. "github.com/theplant/docgo"
  27. . "github.com/theplant/htmlgo"
  28. )
  29. type section struct {
  30. title string
  31. slug string
  32. items []*pageItem
  33. }
  34. type pageItem struct {
  35. section string
  36. slug string
  37. title string
  38. doc HTMLComponent
  39. }
  40. func menuLinks(prefix string, secs []*section) (comp HTMLComponent) {
  41. var nav = Nav().Class("side-tree-nav")
  42. for _, sec := range secs {
  43. secdiv := Div(
  44. Div(
  45. Div().Class("marker"),
  46. Div().Class("text").Text(sec.title),
  47. ).Class("tree-item-title tree-branch-title js-item-title js-branch-title is_active"),
  48. ).Class("tree-item tree-branch js-item js-branch _opened")
  49. for _, p := range sec.items {
  50. secdiv.AppendChildren(
  51. Div(
  52. A(
  53. Span("").Class("marker"),
  54. Span(p.title).Class("text"),
  55. ).Class("tree-item-title tree-leaf-title js-item-title js-leaf-title").
  56. Href(fmt.Sprintf("%s/%s/%s", prefix, sec.slug, p.slug)),
  57. ).Class("tree-item tree-leaf js-item js-leaf"),
  58. )
  59. }
  60. nav.AppendChildren(secdiv)
  61. }
  62. comp = Aside(
  63. Div(nav).Class("js-side-tree-nav"),
  64. ).Class("g-3")
  65. return
  66. }
  67. func header() HTMLComponent {
  68. return Header(
  69. Div(
  70. Div(
  71. A().Href("/").Class("global-header-logo").Text("QOR5"),
  72. Nav(
  73. Div(
  74. A().Href("https://github.com/qor5").Text("Github").Class("nav-item"),
  75. ).Class("nav-links"),
  76. ).Class("global-nav"),
  77. ).Class("g-layout"),
  78. ).Class("global-header-panel"),
  79. ).Class("global-header")
  80. }
  81. func footer() HTMLComponent {
  82. return Footer(
  83. Div(
  84. Div(
  85. Div(
  86. Div(
  87. Div().Class("terms-copyright").Text("Licensed under the MIT license"),
  88. ).Class("global-footer-row"),
  89. ).Class("global-footer-container"),
  90. ).Class("g-layout"),
  91. ).Class("global-footer-terms"),
  92. ).Role("contentinfo").Class("global-footer")
  93. }
  94. func addGA(ctx *web.EventContext) {
  95. if strings.Index(ctx.R.Host, "localhost") >= 0 {
  96. return
  97. }
  98. ctx.Injector.HeadHTML(`
  99. <!-- Global site tag (gtag.js) - Google Analytics -->
  100. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-149605708-1"></script>
  101. <script>
  102. window.dataLayer = window.dataLayer || [];
  103. function gtag(){dataLayer.push(arguments);}
  104. gtag('js', new Date());
  105. gtag('config', 'UA-149605708-1');
  106. </script>
  107. `)
  108. }
  109. func layout(in web.PageFunc, secs []*section, prefix string, cp *pageItem) (out web.PageFunc) {
  110. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  111. addGA(ctx)
  112. pr.PageTitle = cp.title + " - " + "QOR5"
  113. ctx.Injector.HeadHTML(`
  114. <link rel="stylesheet" href="/assets/main.css">
  115. `)
  116. ctx.Injector.Title(cp.title)
  117. ctx.Injector.HeadHTML(`
  118. <script src='/assets/vue.js'></script>
  119. <script src='/assets/codehighlight.js'></script>
  120. `)
  121. ctx.Injector.TailHTML(coreJSTags)
  122. var innerPr web.PageResponse
  123. innerPr, err = in(ctx)
  124. if err != nil {
  125. panic(err)
  126. }
  127. demo := innerPr.Body
  128. ctx.Injector.HeadHTML(`
  129. <style>
  130. [v-cloak] {
  131. display: none;
  132. }
  133. </style>
  134. `)
  135. pr.Body = Components(
  136. Div(
  137. header(),
  138. Div(
  139. Div(
  140. menuLinks(prefix, secs),
  141. Article(demo.(HTMLComponent)).Class("page-content g-9").Role("main"),
  142. ).Class("g-grid"),
  143. ).Class("g-layout global-content"),
  144. ).Class("global-layout"),
  145. footer(),
  146. )
  147. return
  148. }
  149. }
  150. // @snippet_begin(DemoLayoutSample)
  151. func demoLayout(in web.PageFunc) (out web.PageFunc) {
  152. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  153. addGA(ctx)
  154. ctx.Injector.HeadHTML(`
  155. <script src='/assets/vue.js'></script>
  156. `)
  157. ctx.Injector.TailHTML(coreJSTags)
  158. ctx.Injector.HeadHTML(`
  159. <style>
  160. [v-cloak] {
  161. display: none;
  162. }
  163. </style>
  164. `)
  165. var innerPr web.PageResponse
  166. innerPr, err = in(ctx)
  167. if err != nil {
  168. panic(err)
  169. }
  170. pr.Body = innerPr.Body
  171. return
  172. }
  173. }
  174. // @snippet_end
  175. // @snippet_begin(TipTapLayoutSample)
  176. func tiptapLayout(in web.PageFunc) (out web.PageFunc) {
  177. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  178. addGA(ctx)
  179. ctx.Injector.HeadHTML(`
  180. <link rel="stylesheet" href="/assets/tiptap.css">
  181. <script src='/assets/vue.js'></script>
  182. `)
  183. ctx.Injector.TailHTML(`
  184. <script src='/assets/tiptap.js'></script>
  185. <script src='/assets/main.js'></script>
  186. `)
  187. ctx.Injector.HeadHTML(`
  188. <style>
  189. [v-cloak] {
  190. display: none;
  191. }
  192. </style>
  193. `)
  194. var innerPr web.PageResponse
  195. innerPr, err = in(ctx)
  196. if err != nil {
  197. panic(err)
  198. }
  199. pr.Body = innerPr.Body
  200. return
  201. }
  202. }
  203. // @snippet_end
  204. // @snippet_begin(DemoBootstrapLayoutSample)
  205. func demoBootstrapLayout(in web.PageFunc) (out web.PageFunc) {
  206. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  207. addGA(ctx)
  208. ctx.Injector.HeadHTML(`
  209. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  210. <script src='/assets/vue.js'></script>
  211. `)
  212. ctx.Injector.TailHTML(`
  213. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  214. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  215. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  216. <script src='/assets/main.js'></script>
  217. `)
  218. ctx.Injector.HeadHTML(`
  219. <style>
  220. [v-cloak] {
  221. display: none;
  222. }
  223. </style>
  224. `)
  225. var innerPr web.PageResponse
  226. innerPr, err = in(ctx)
  227. if err != nil {
  228. panic(err)
  229. }
  230. pr.Body = innerPr.Body
  231. return
  232. }
  233. }
  234. // @snippet_end
  235. var coreJSTags = func() string {
  236. if len(os.Getenv("DEV_CORE_JS")) > 0 {
  237. return `
  238. <script src='http://localhost:3100/js/chunk-vendors.js'></script>
  239. <script src='http://localhost:3100/js/app.js'></script>
  240. `
  241. }
  242. return `<script src='/assets/main.js'></script>`
  243. }()
  244. var vuetifyJSTags = func() string {
  245. if len(os.Getenv("DEV_VUETIFY_JS")) > 0 {
  246. return `
  247. <script src='http://localhost:3080/js/chunk-vendors.js'></script>
  248. <script src='http://localhost:3080/js/app.js'></script>
  249. `
  250. }
  251. return `<script src='/assets/vuetify.js'></script>`
  252. }()
  253. // @snippet_begin(DemoVuetifyLayoutSample)
  254. func demoVuetifyLayout(in web.PageFunc) (out web.PageFunc) {
  255. return func(ctx *web.EventContext) (pr web.PageResponse, err error) {
  256. addGA(ctx)
  257. ctx.Injector.HeadHTML(`
  258. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono" async>
  259. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" async>
  260. <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" async>
  261. <link rel="stylesheet" href="/assets/vuetify.css">
  262. <script src='/assets/vue.js'></script>
  263. `)
  264. ctx.Injector.TailHTML(fmt.Sprintf("%s %s", vuetifyJSTags, coreJSTags))
  265. ctx.Injector.HeadHTML(`
  266. <style>
  267. [v-cloak] {
  268. display: none;
  269. }
  270. </style>
  271. `)
  272. var innerPr web.PageResponse
  273. innerPr, err = in(ctx)
  274. if err != nil {
  275. panic(err)
  276. }
  277. pr.Body = v.VApp(
  278. v.VMain(
  279. innerPr.Body,
  280. ),
  281. )
  282. return
  283. }
  284. }
  285. // @snippet_end
  286. func rf(comp HTMLComponent, p *pageItem) web.PageFunc {
  287. return func(ctx *web.EventContext) (r web.PageResponse, err error) {
  288. r.Body = Components(
  289. utils.Anchor(H1(""), p.title),
  290. comp,
  291. )
  292. return
  293. }
  294. }
  295. func Mux(prefix string) http.Handler {
  296. // @snippet_begin(HelloWorldMuxSample1)
  297. mux := http.NewServeMux()
  298. // @snippet_end
  299. // @snippet_begin(ComponentsPackSample)
  300. mux.Handle("/assets/main.js",
  301. web.PacksHandler("text/javascript",
  302. web.JSComponentsPack(),
  303. ),
  304. )
  305. mux.Handle("/assets/vue.js",
  306. web.PacksHandler("text/javascript",
  307. web.JSVueComponentsPack(),
  308. ),
  309. )
  310. // @snippet_end
  311. // @snippet_begin(TipTapComponentsPackSample)
  312. mux.Handle("/assets/tiptap.js",
  313. web.PacksHandler("text/javascript",
  314. tiptap.JSComponentsPack(),
  315. ),
  316. )
  317. mux.Handle("/assets/tiptap.css",
  318. web.PacksHandler("text/css",
  319. tiptap.CSSComponentsPack(),
  320. ),
  321. )
  322. // @snippet_end
  323. // @snippet_begin(VuetifyComponentsPackSample)
  324. mux.Handle("/assets/vuetify.js",
  325. web.PacksHandler("text/javascript",
  326. v.Vuetify(""),
  327. v.JSComponentsPack(),
  328. vuetifyx.JSComponentsPack(),
  329. ),
  330. )
  331. mux.Handle("/assets/vuetify.css",
  332. web.PacksHandler("text/css",
  333. v.CSSComponentsPack(),
  334. ),
  335. )
  336. // @snippet_end
  337. mux.Handle("/favicon.ico", http.NotFoundHandler())
  338. samplesMux := SamplesHandler(prefix)
  339. mux.Handle("/samples/",
  340. middleware.Logger(
  341. middleware.RequestID(
  342. samplesMux,
  343. ),
  344. ),
  345. )
  346. mux.Handle("/", docgo.New().
  347. MainPageTitle("QOR5 Document").
  348. Assets("/assets/", Assets).
  349. DocTree(DocTree...).
  350. Build(),
  351. )
  352. return mux
  353. }
  354. func SamplesHandler(prefix string) http.Handler {
  355. mux := http.NewServeMux()
  356. emptyUb := web.New().LayoutFunc(web.NoopLayoutFunc)
  357. mux.Handle(e00_basics.TypeSafeBuilderSamplePath, e00_basics.TypeSafeBuilderSamplePFPB.Builder(emptyUb))
  358. // @snippet_begin(HelloWorldMuxSample2)
  359. mux.Handle(e00_basics.HelloWorldPath, e00_basics.HelloWorldPB)
  360. // @snippet_end
  361. // @snippet_begin(HelloWorldReloadMuxSample1)
  362. mux.Handle(
  363. e00_basics.HelloWorldReloadPath,
  364. e00_basics.HelloWorldReloadPB.Wrap(demoLayout),
  365. )
  366. // @snippet_end
  367. mux.Handle(
  368. e00_basics.Page1Path,
  369. e00_basics.Page1PB.Wrap(demoLayout),
  370. )
  371. mux.Handle(
  372. e00_basics.Page2Path,
  373. e00_basics.Page2PB.Wrap(demoLayout),
  374. )
  375. mux.Handle(
  376. e00_basics.ReloadWithFlashPath,
  377. e00_basics.ReloadWithFlashPB.Wrap(demoLayout),
  378. )
  379. mux.Handle(
  380. e00_basics.PartialUpdatePagePath,
  381. e00_basics.PartialUpdatePagePB.Wrap(demoLayout),
  382. )
  383. mux.Handle(
  384. e00_basics.PartialReloadPagePath,
  385. e00_basics.PartialReloadPagePB.Wrap(demoLayout),
  386. )
  387. mux.Handle(
  388. e00_basics.MultiStatePagePath,
  389. e00_basics.MultiStatePagePB.Wrap(demoLayout),
  390. )
  391. mux.Handle(
  392. e00_basics.FormHandlingPagePath,
  393. e00_basics.FormHandlingPagePB.Wrap(demoLayout),
  394. )
  395. mux.Handle(
  396. e00_basics.CompositeComponentSample1PagePath,
  397. e00_basics.CompositeComponentSample1PagePB.Wrap(demoBootstrapLayout),
  398. )
  399. mux.Handle(
  400. e00_basics.HelloWorldTipTapPath,
  401. e00_basics.HelloWorldTipTapPB.Wrap(tiptapLayout),
  402. )
  403. mux.Handle(
  404. e13_vuetify_list.HelloVuetifyListPath,
  405. e13_vuetify_list.HelloVuetifyListPB.Wrap(demoVuetifyLayout),
  406. )
  407. mux.Handle(
  408. e14_vuetify_menu.HelloVuetifyMenuPath,
  409. e14_vuetify_menu.HelloVuetifyMenuPB.Wrap(demoVuetifyLayout),
  410. )
  411. mux.Handle(
  412. e00_basics.EventExamplePagePath,
  413. e00_basics.ExamplePagePB.Wrap(demoVuetifyLayout),
  414. )
  415. mux.Handle(
  416. e00_basics.EventHandlingPagePath,
  417. e00_basics.EventHandlingPagePB.Wrap(demoVuetifyLayout),
  418. )
  419. mux.Handle(
  420. e00_basics.WebScopeUseLocalsPagePath,
  421. e00_basics.UseLocalsPB.Wrap(demoVuetifyLayout),
  422. )
  423. mux.Handle(
  424. e00_basics.WebScopeUsePlaidFormPagePath,
  425. e00_basics.UsePlaidFormPB.Wrap(demoVuetifyLayout),
  426. )
  427. mux.Handle(
  428. e00_basics.ShortCutSamplePath,
  429. e00_basics.ShortCutSamplePB.Wrap(demoVuetifyLayout),
  430. )
  431. mux.Handle(
  432. e11_vuetify_basic_inputs.VuetifyBasicInputsPath,
  433. e11_vuetify_basic_inputs.VuetifyBasicInputsPB.Wrap(demoVuetifyLayout),
  434. )
  435. mux.Handle(
  436. e10_vuetify_autocomplete.VuetifyAutoCompletePath,
  437. e10_vuetify_autocomplete.VuetifyAutocompletePB.Wrap(demoVuetifyLayout),
  438. )
  439. mux.Handle(
  440. e10_vuetify_autocomplete.VuetifyAutoCompletePresetPath+"/",
  441. e10_vuetify_autocomplete.ExamplePreset,
  442. )
  443. mux.Handle(
  444. e22_vuetify_variant_sub_form.VuetifyVariantSubFormPath,
  445. e22_vuetify_variant_sub_form.VuetifyVariantSubFormPB.Wrap(demoVuetifyLayout),
  446. )
  447. mux.Handle(
  448. e23_vuetify_components_kitchen.VuetifyComponentsKitchenPath,
  449. e23_vuetify_components_kitchen.VuetifyComponentsKitchenPB.Wrap(demoVuetifyLayout),
  450. )
  451. mux.Handle(
  452. e15_vuetify_navigation_drawer.VuetifyNavigationDrawerPath,
  453. e15_vuetify_navigation_drawer.VuetifyNavigationDrawerPB.Wrap(demoVuetifyLayout),
  454. )
  455. mux.Handle(
  456. e17_hello_lazy_portals_and_reload.LazyPortalsAndReloadPath,
  457. e17_hello_lazy_portals_and_reload.LazyPortalsAndReloadPB.Wrap(demoVuetifyLayout),
  458. )
  459. mux.Handle(
  460. e24_vuetify_components_linkage_select.VuetifyComponentsLinkageSelectPath,
  461. e24_vuetify_components_linkage_select.VuetifyComponentsLinkageSelectPB.Wrap(demoVuetifyLayout),
  462. )
  463. // @snippet_begin(MountPresetHelloWorldSample)
  464. c00 := presets.New().AssetFunc(addGA)
  465. e21_presents.PresetsHelloWorld(c00)
  466. mux.Handle(
  467. e21_presents.PresetsHelloWorldPath+"/",
  468. c00,
  469. )
  470. // @snippet_end
  471. c01 := presets.New().AssetFunc(addGA)
  472. e21_presents.PresetsListingCustomizationFields(c01)
  473. mux.Handle(
  474. e21_presents.PresetsListingCustomizationFieldsPath+"/",
  475. c01,
  476. )
  477. c02 := presets.New().AssetFunc(addGA)
  478. e21_presents.PresetsListingCustomizationFilters(c02)
  479. mux.Handle(
  480. e21_presents.PresetsListingCustomizationFiltersPath+"/",
  481. c02,
  482. )
  483. c03 := presets.New().AssetFunc(addGA)
  484. e21_presents.PresetsListingCustomizationTabs(c03)
  485. mux.Handle(
  486. e21_presents.PresetsListingCustomizationTabsPath+"/",
  487. c03,
  488. )
  489. c04 := presets.New().AssetFunc(addGA)
  490. e21_presents.PresetsListingCustomizationBulkActions(c04)
  491. mux.Handle(
  492. e21_presents.PresetsListingCustomizationBulkActionsPath+"/",
  493. c04,
  494. )
  495. c05 := presets.New().AssetFunc(addGA)
  496. e21_presents.PresetsEditingCustomizationDescription(c05)
  497. mux.Handle(
  498. e21_presents.PresetsEditingCustomizationDescriptionPath+"/",
  499. c05,
  500. )
  501. c06 := presets.New().AssetFunc(addGA)
  502. e21_presents.PresetsEditingCustomizationFileType(c06)
  503. mux.Handle(
  504. e21_presents.PresetsEditingCustomizationFileTypePath+"/",
  505. c06,
  506. )
  507. c07 := presets.New().AssetFunc(addGA)
  508. e21_presents.PresetsEditingCustomizationValidation(c07)
  509. mux.Handle(
  510. e21_presents.PresetsEditingCustomizationValidationPath+"/",
  511. c07,
  512. )
  513. c08 := presets.New().AssetFunc(addGA)
  514. e21_presents.PresetsDetailPageTopNotes(c08)
  515. mux.Handle(
  516. e21_presents.PresetsDetailPageTopNotesPath+"/",
  517. c08,
  518. )
  519. c09 := presets.New().AssetFunc(addGA)
  520. e21_presents.PresetsDetailPageDetails(c09)
  521. mux.Handle(
  522. e21_presents.PresetsDetailPageDetailsPath+"/",
  523. c09,
  524. )
  525. c10 := presets.New().AssetFunc(addGA)
  526. e21_presents.PresetsDetailPageCards(c10)
  527. mux.Handle(
  528. e21_presents.PresetsDetailPageCardsPath+"/",
  529. c10,
  530. )
  531. c11 := presets.New().AssetFunc(addGA)
  532. e21_presents.PresetsPermissions(c11)
  533. mux.Handle(
  534. e21_presents.PresetsPermissionsPath+"/",
  535. c11,
  536. )
  537. c12 := presets.New().AssetFunc(addGA)
  538. e21_presents.PresetsModelBuilderExtensions(c12)
  539. mux.Handle(
  540. e21_presents.PresetsModelBuilderExtensionsPath+"/",
  541. c12,
  542. )
  543. c13 := presets.New().AssetFunc(addGA)
  544. example_basics.PresetsBasicFilter(c13)
  545. mux.Handle(
  546. example_basics.PresetsBasicFilterPath+"/",
  547. c13,
  548. )
  549. c14 := presets.New().AssetFunc(addGA)
  550. e21_presents.PresetsNotificationCenterSample(c14)
  551. mux.Handle(
  552. e21_presents.NotificationCenterSamplePath+"/",
  553. c14,
  554. )
  555. c15 := presets.New().AssetFunc(addGA)
  556. e21_presents.PresetsLinkageSelectFilterItem(c15)
  557. mux.Handle(
  558. e21_presents.PresetsLinkageSelectFilterItemPath+"/",
  559. c15,
  560. )
  561. c16 := presets.New().AssetFunc(addGA)
  562. example_basics.ListingSample(c16)
  563. mux.Handle(
  564. example_basics.ListingSamplePath+"/",
  565. c16,
  566. )
  567. c17 := presets.New().AssetFunc(addGA)
  568. e21_presents.PresetsBrandTitle(c17)
  569. mux.Handle(
  570. e21_presents.PresetsBrandTitlePath+"/",
  571. c17,
  572. )
  573. c18 := presets.New().AssetFunc(addGA)
  574. e21_presents.PresetsBrandFunc(c18)
  575. mux.Handle(
  576. e21_presents.PresetsBrandFuncPath+"/",
  577. c18,
  578. )
  579. c19 := presets.New().AssetFunc(addGA)
  580. e21_presents.PresetsProfile(c19)
  581. mux.Handle(
  582. e21_presents.PresetsProfilePath+"/",
  583. c19,
  584. )
  585. c20 := presets.New().AssetFunc(addGA)
  586. e21_presents.PresetsOrderMenu(c20)
  587. mux.Handle(
  588. e21_presents.PresetsMenuOrderPath+"/",
  589. c20,
  590. )
  591. c21 := presets.New().AssetFunc(addGA)
  592. e21_presents.PresetsGroupMenu(c21)
  593. mux.Handle(
  594. e21_presents.PresetsMenuGroupPath+"/",
  595. c21,
  596. )
  597. c22 := presets.New().AssetFunc(addGA)
  598. example_basics.PresetsConfirmDialog(c22)
  599. mux.Handle(
  600. example_basics.PresetsConfirmDialogPath+"/",
  601. c22,
  602. )
  603. return mux
  604. }