consts.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. package consts
  2. import (
  3. "html/template"
  4. )
  5. const AssetsPath = "assets"
  6. const DirIndexFile = "index.html"
  7. // Bootstrap resources
  8. const AssetsBootstrapCss = AssetsPath + "/bootstrap.css"
  9. const AssetsBootstrapJs = AssetsPath + "/bootstrap.js"
  10. const AssetsJqueryJs = AssetsPath + "/jquery.js"
  11. const AssetsPopperJs = AssetsPath + "/popper.js"
  12. // System resources
  13. const AssetsCpImgLoadGif = AssetsPath + "/cp/img-load.gif"
  14. const AssetsCpScriptsJs = AssetsPath + "/cp/scripts.js"
  15. const AssetsCpStylesCss = AssetsPath + "/cp/styles.css"
  16. const AssetsSysBgPng = AssetsPath + "/sys/bg.png"
  17. const AssetsSysFaveIco = AssetsPath + "/sys/fave.ico"
  18. const AssetsSysLogoPng = AssetsPath + "/sys/logo.png"
  19. const AssetsSysLogoSvg = AssetsPath + "/sys/logo.svg"
  20. const AssetsSysStylesCss = AssetsPath + "/sys/styles.css"
  21. const AssetsSysPlaceholderPng = AssetsPath + "/sys/placeholder.png"
  22. // Wysiwyg editor
  23. const AssetsCpWysiwygPellCss = AssetsPath + "/cp/wysiwyg/pell.css"
  24. const AssetsCpWysiwygPellJs = AssetsPath + "/cp/wysiwyg/pell.js"
  25. // CodeMirror template editor
  26. const AssetsCpCodeMirrorCss = AssetsPath + "/cp/tmpl-editor/codemirror.css"
  27. const AssetsCpCodeMirrorJs = AssetsPath + "/cp/tmpl-editor/codemirror.js"
  28. // LightGallery for products
  29. const AssetsLightGalleryCss = AssetsPath + "/lightgallery.css"
  30. const AssetsLightGalleryJs = AssetsPath + "/lightgallery.js"
  31. // Make global for other packages
  32. var ParamDebug bool
  33. var ParamHost string
  34. var ParamKeepAlive bool
  35. var ParamPort int
  36. var ParamWwwDir string
  37. // For admin panel
  38. type BreadCrumb struct {
  39. Name string
  40. Link string
  41. }
  42. // Template data
  43. type TmplSystem struct {
  44. CpSubModule string
  45. InfoVersion string
  46. PathCssBootstrap string
  47. PathCssCpCodeMirror string
  48. PathCssCpStyles string
  49. PathCssCpWysiwygPell string
  50. PathCssLightGallery string
  51. PathCssStyles string
  52. PathIcoFav string
  53. PathJsBootstrap string
  54. PathJsCpCodeMirror string
  55. PathJsCpScripts string
  56. PathJsCpWysiwygPell string
  57. PathJsJquery string
  58. PathJsLightGallery string
  59. PathJsPopper string
  60. PathSvgLogo string
  61. PathThemeScripts string
  62. PathThemeStyles string
  63. CpModule string
  64. }
  65. type TmplError struct {
  66. ErrorMessage string
  67. }
  68. type TmplData struct {
  69. System TmplSystem
  70. Data interface{}
  71. }
  72. type TmplDataCpBase struct {
  73. Caption string
  74. Content template.HTML
  75. ModuleCurrentAlias string
  76. NavBarModules template.HTML
  77. NavBarModulesSys template.HTML
  78. SidebarLeft template.HTML
  79. SidebarRight template.HTML
  80. Title string
  81. UserAvatarLink string
  82. UserEmail string
  83. UserFirstName string
  84. UserId int
  85. UserLastName string
  86. UserPassword string
  87. BodyClasses string
  88. }
  89. type TmplOrderClient struct {
  90. LastName string
  91. FirstName string
  92. MiddleName string
  93. Phone string
  94. Email string
  95. DeliveryComment string
  96. OrderComment string
  97. }
  98. type TmplOrderElse struct {
  99. OrderId int64
  100. Subject string
  101. CpOrderLink string
  102. }
  103. type TmplEmailOrder struct {
  104. Basket interface{}
  105. Client TmplOrderClient
  106. Else TmplOrderElse
  107. }