consts.go 1.9 KB

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