consts.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package consts
  2. import (
  3. "html/template"
  4. )
  5. const ServerVersion = "1.0.5"
  6. const AssetsVersion = "22"
  7. const AssetsPath = "assets"
  8. const DirIndexFile = "index.html"
  9. // Bootstrap resources
  10. const AssetsBootstrapCss = AssetsPath + "/bootstrap.css"
  11. const AssetsBootstrapJs = AssetsPath + "/bootstrap.js"
  12. const AssetsJqueryJs = AssetsPath + "/jquery.js"
  13. const AssetsPopperJs = AssetsPath + "/popper.js"
  14. // System resources
  15. const AssetsCpScriptsJs = AssetsPath + "/cp/scripts.js"
  16. const AssetsCpStylesCss = AssetsPath + "/cp/styles.css"
  17. const AssetsSysBgPng = AssetsPath + "/sys/bg.png"
  18. const AssetsSysFaveIco = AssetsPath + "/sys/fave.ico"
  19. const AssetsSysLogoPng = AssetsPath + "/sys/logo.png"
  20. const AssetsSysLogoSvg = AssetsPath + "/sys/logo.svg"
  21. const AssetsSysStylesCss = AssetsPath + "/sys/styles.css"
  22. // Wysiwyg editor
  23. const AssetsCpWysiwygPellJs = AssetsPath + "/cp/wysiwyg/pell.js"
  24. const AssetsCpWysiwygPellCss = AssetsPath + "/cp/wysiwyg/pell.css"
  25. // Make global for other packages
  26. var ParamHost string
  27. var ParamPort int
  28. var ParamWwwDir string
  29. var ParamDebug bool
  30. var ParamKeepAlive bool
  31. // For admin panel
  32. type BreadCrumb struct {
  33. Name string
  34. Link string
  35. }
  36. // Template data
  37. type TmplSystem struct {
  38. PathIcoFav string
  39. PathSvgLogo string
  40. PathCssStyles string
  41. PathCssCpStyles string
  42. PathCssBootstrap string
  43. PathJsJquery string
  44. PathJsPopper string
  45. PathJsBootstrap string
  46. PathJsCpScripts string
  47. PathThemeStyles string
  48. PathThemeScripts string
  49. InfoVersion string
  50. }
  51. type TmplError struct {
  52. ErrorMessage string
  53. }
  54. type TmplData struct {
  55. System TmplSystem
  56. Data interface{}
  57. }
  58. type TmplDataCpBase struct {
  59. Title string
  60. Caption string
  61. BodyClasses string
  62. UserId int
  63. UserFirstName string
  64. UserLastName string
  65. UserEmail string
  66. UserPassword string
  67. UserAvatarLink string
  68. NavBarModules template.HTML
  69. NavBarModulesSys template.HTML
  70. ModuleCurrentAlias string
  71. SidebarLeft template.HTML
  72. Content template.HTML
  73. SidebarRight template.HTML
  74. }