consts.go 2.1 KB

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