consts.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 AssetsSysBg404Jpg = AssetsPath + "/sys/bg404.jpg"
  17. const AssetsCpScriptsJs = AssetsPath + "/cp/scripts.js"
  18. const AssetsCpStylesCss = AssetsPath + "/cp/styles.css"
  19. const AssetsSysBgPng = AssetsPath + "/sys/bg.png"
  20. const AssetsSysFaveIco = AssetsPath + "/sys/fave.ico"
  21. const AssetsSysLogoPng = AssetsPath + "/sys/logo.png"
  22. const AssetsSysLogoSvg = AssetsPath + "/sys/logo.svg"
  23. const AssetsSysStylesCss = AssetsPath + "/sys/styles.css"
  24. type BreadCrumb struct {
  25. Name string
  26. Link string
  27. }
  28. // Template data
  29. type TmplSystem struct {
  30. PathIcoFav string
  31. PathSvgLogo string
  32. PathCssStyles string
  33. PathCssCpStyles string
  34. PathCssBootstrap string
  35. PathJsJquery string
  36. PathJsPopper string
  37. PathJsBootstrap string
  38. PathJsCpScripts string
  39. }
  40. type TmplError struct {
  41. ErrorMessage string
  42. }
  43. type TmplData struct {
  44. System TmplSystem
  45. Data interface{}
  46. }
  47. type TmplDataCpBase struct {
  48. Title 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. MetaTitle string
  70. MetaKeywords string
  71. MetaDescription string
  72. MainMenuItems []TmplDataMainMenuItem
  73. }