consts.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package consts
  2. const Debug = true
  3. const ServerVersion = "1.0.1"
  4. const AssetsVersion = "1"
  5. const AssetsPath = "assets"
  6. const DirIndexFile = "index.html"
  7. // Bootstrap resources
  8. const AssetsBootstrapCss = AssetsPath + "/bootstrap.css"
  9. const AssetsBootstrapJs = AssetsPath + "/bootstrap.js"
  10. const AssetsJqueryJs = AssetsPath + "/jquery.js"
  11. const AssetsPopperJs = AssetsPath + "/popper.js"
  12. // System resources
  13. const AssetsCpScriptsJs = AssetsPath + "/cp/scripts.js"
  14. const AssetsCpStylesCss = AssetsPath + "/cp/styles.css"
  15. const AssetsSysBgPng = AssetsPath + "/sys/bg.png"
  16. const AssetsSysFaveIco = AssetsPath + "/sys/fave.ico"
  17. const AssetsSysLogoPng = AssetsPath + "/sys/logo.png"
  18. const AssetsSysLogoSvg = AssetsPath + "/sys/logo.svg"
  19. const AssetsSysStylesCss = AssetsPath + "/sys/styles.css"
  20. // Template data
  21. type TmplSystem struct {
  22. PathIcoFav string
  23. PathSvgLogo string
  24. PathCssStyles string
  25. PathCssCpStyles string
  26. PathCssBootstrap string
  27. PathJsJquery string
  28. PathJsPopper string
  29. PathJsBootstrap string
  30. PathJsCpScripts string
  31. }
  32. type TmplError struct {
  33. ErrorMessage string
  34. }
  35. type TmplData struct {
  36. System TmplSystem
  37. Data interface{}
  38. }
  39. type TmplDataMainMenuItem struct {
  40. Name string
  41. Link string
  42. Active bool
  43. }
  44. type TmplDataModIndex struct {
  45. MetaTitle string
  46. MetaKeywords string
  47. MetaDescription string
  48. MainMenuItems []TmplDataMainMenuItem
  49. }