consts.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. package consts
  2. import (
  3. "html/template"
  4. )
  5. const AssetsPath = "assets"
  6. const AssetsVersion = "32"
  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. // Make global for other packages
  28. var ParamDebug bool
  29. var ParamHost string
  30. var ParamKeepAlive bool
  31. var ParamPort int
  32. var ParamWwwDir string
  33. // For admin panel
  34. type BreadCrumb struct {
  35. Name string
  36. Link string
  37. }
  38. // Template data
  39. type TmplSystem struct {
  40. PathIcoFav string
  41. PathSvgLogo string
  42. PathCssStyles string
  43. PathCssCpStyles string
  44. PathCssBootstrap string
  45. PathCssCpCodeMirror string
  46. PathCssCpWysiwygPell string
  47. PathJsJquery string
  48. PathJsPopper string
  49. PathJsBootstrap string
  50. PathJsCpCodeMirror string
  51. PathJsCpScripts string
  52. PathJsCpWysiwygPell string
  53. PathThemeStyles string
  54. PathThemeScripts string
  55. InfoVersion string
  56. CpModule string
  57. CpSubModule string
  58. }
  59. type TmplError struct {
  60. ErrorMessage string
  61. }
  62. type TmplData struct {
  63. System TmplSystem
  64. Data interface{}
  65. }
  66. type TmplDataCpBase struct {
  67. Title string
  68. Caption string
  69. BodyClasses string
  70. UserId int
  71. UserFirstName string
  72. UserLastName string
  73. UserEmail string
  74. UserPassword string
  75. UserAvatarLink string
  76. NavBarModules template.HTML
  77. NavBarModulesSys template.HTML
  78. ModuleCurrentAlias string
  79. SidebarLeft template.HTML
  80. Content template.HTML
  81. SidebarRight template.HTML
  82. }