consts.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. PathCssCpWysiwygPell string
  44. PathJsJquery string
  45. PathJsPopper string
  46. PathJsBootstrap string
  47. PathJsCpScripts string
  48. PathThemeStyles string
  49. PathThemeScripts string
  50. InfoVersion string
  51. PathJsCpWysiwygPell string
  52. }
  53. type TmplError struct {
  54. ErrorMessage string
  55. }
  56. type TmplData struct {
  57. System TmplSystem
  58. Data interface{}
  59. }
  60. type TmplDataCpBase struct {
  61. Title string
  62. Caption string
  63. BodyClasses string
  64. UserId int
  65. UserFirstName string
  66. UserLastName string
  67. UserEmail string
  68. UserPassword string
  69. UserAvatarLink string
  70. NavBarModules template.HTML
  71. NavBarModulesSys template.HTML
  72. ModuleCurrentAlias string
  73. SidebarLeft template.HTML
  74. Content template.HTML
  75. SidebarRight template.HTML
  76. }