consts.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. package consts
  2. import (
  3. "html/template"
  4. )
  5. const Debug = true
  6. const ServerVersion = "1.0.0"
  7. const AssetsVersion = "1"
  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. BodyClasses string
  49. UserId int
  50. UserFirstName string
  51. UserLastName string
  52. UserEmail string
  53. UserPassword string
  54. UserAvatarLink string
  55. NavBarModules template.HTML
  56. NavBarModulesSys template.HTML
  57. ModuleCurrentAlias string
  58. SidebarLeft template.HTML
  59. Content template.HTML
  60. SidebarRight template.HTML
  61. }
  62. type TmplDataMainMenuItem struct {
  63. Name string
  64. Link string
  65. Active bool
  66. }
  67. type TmplDataModIndex struct {
  68. MetaTitle string
  69. MetaKeywords string
  70. MetaDescription string
  71. MainMenuItems []TmplDataMainMenuItem
  72. }