consts.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. package consts
  2. import (
  3. "html/template"
  4. )
  5. const AssetsPath = "assets"
  6. const AssetsVersion = "42"
  7. const DirIndexFile = "index.html"
  8. // Bootstrap resources
  9. const AssetsBootstrapCss = AssetsPath + "/bootstrap.css"
  10. const AssetsBootstrapJs = AssetsPath + "/bootstrap.js"
  11. const AssetsJqueryJs = AssetsPath + "/jquery.js"
  12. const AssetsPopperJs = AssetsPath + "/popper.js"
  13. // System resources
  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. // Wysiwyg editor
  22. const AssetsCpWysiwygPellCss = AssetsPath + "/cp/wysiwyg/pell.css"
  23. const AssetsCpWysiwygPellJs = AssetsPath + "/cp/wysiwyg/pell.js"
  24. // CodeMirror template editor
  25. const AssetsCpCodeMirrorCss = AssetsPath + "/cp/tmpl-editor/codemirror.css"
  26. const AssetsCpCodeMirrorJs = AssetsPath + "/cp/tmpl-editor/codemirror.js"
  27. // LightGallery for products
  28. const AssetsLightGalleryCss = AssetsPath + "/lightgallery.css"
  29. const AssetsLightGalleryJs = AssetsPath + "/lightgallery.js"
  30. // Make global for other packages
  31. var ParamDebug bool
  32. var ParamHost string
  33. var ParamKeepAlive bool
  34. var ParamPort int
  35. var ParamWwwDir string
  36. // For admin panel
  37. type BreadCrumb struct {
  38. Name string
  39. Link string
  40. }
  41. // Template data
  42. type TmplSystem struct {
  43. CpSubModule string
  44. InfoVersion string
  45. PathCssBootstrap string
  46. PathCssCpCodeMirror string
  47. PathCssCpStyles string
  48. PathCssCpWysiwygPell string
  49. PathCssLightGallery string
  50. PathCssStyles string
  51. PathIcoFav string
  52. PathJsBootstrap string
  53. PathJsCpCodeMirror string
  54. PathJsCpScripts string
  55. PathJsCpWysiwygPell string
  56. PathJsJquery string
  57. PathJsLightGallery string
  58. PathJsPopper string
  59. PathSvgLogo string
  60. PathThemeScripts string
  61. PathThemeStyles string
  62. CpModule string
  63. }
  64. type TmplError struct {
  65. ErrorMessage string
  66. }
  67. type TmplData struct {
  68. System TmplSystem
  69. Data interface{}
  70. }
  71. type TmplDataCpBase struct {
  72. Caption string
  73. Content template.HTML
  74. ModuleCurrentAlias string
  75. NavBarModules template.HTML
  76. NavBarModulesSys template.HTML
  77. SidebarLeft template.HTML
  78. SidebarRight template.HTML
  79. Title string
  80. UserAvatarLink string
  81. UserEmail string
  82. UserFirstName string
  83. UserId int
  84. UserLastName string
  85. UserPassword string
  86. BodyClasses string
  87. }