index.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import Vue from 'vue'
  2. import Router from 'vue-router'
  3. import Home from 'pages/Home'
  4. // import Item from 'pages/Item'
  5. import ListCorpus from 'pages/ListCorpus'
  6. // import Corpus from 'pages/Corpus'
  7. import Edition from 'pages/Edition'
  8. import IndexNominum from 'pages/IndexNominum'
  9. import IndexLocorum from 'pages/IndexLocorum'
  10. import IndexOperum from 'pages/IndexOperum'
  11. import Nominum from 'pages/Nominum'
  12. import Locorum from 'pages/Locorum'
  13. import Operum from 'pages/Operum'
  14. import Bibliographie from 'pages/Bibliographie'
  15. import NotFound from 'pages/NotFound'
  16. Vue.use(Router)
  17. const routes = [
  18. {
  19. name: 'home',
  20. path: '/',
  21. component: Home
  22. },
  23. // {
  24. // name: 'item',
  25. // path: '/babar/:uuid',
  26. // component: Item,
  27. // props: true
  28. // },
  29. {
  30. name: 'listcorpus',
  31. path: '/corpus',
  32. component: ListCorpus
  33. },
  34. // {
  35. // name: 'corpus',
  36. // path: '/corpus/:id',
  37. // component: Corpus
  38. // },
  39. {
  40. name: 'edition',
  41. path: '/edition/:id',
  42. component: Edition
  43. },
  44. {
  45. name: 'editiontext',
  46. path: '/edition/:id/:textid',
  47. component: Edition
  48. },
  49. {
  50. name: 'indexNominum',
  51. path: '/nominum',
  52. component: IndexNominum
  53. },
  54. {
  55. name: 'nominum',
  56. path: '/nominum/:id',
  57. component: Nominum
  58. },
  59. {
  60. name: 'indexLocorum',
  61. path: '/locorum',
  62. component: IndexLocorum
  63. },
  64. {
  65. name: 'locorum',
  66. path: '/locorum/:id',
  67. component: Locorum
  68. },
  69. {
  70. name: 'indexOperum',
  71. path: '/operum',
  72. component: IndexOperum
  73. },
  74. {
  75. name: 'operum',
  76. path: '/operum/:id',
  77. component: Operum
  78. },
  79. {
  80. path: '/bibliographie',
  81. redirect: '/bibliographie/expressions'
  82. },
  83. {
  84. name: 'bibliographie',
  85. path: '/bibliographie/:type',
  86. component: Bibliographie,
  87. props: true
  88. },
  89. {
  90. name: 'bibliographieItem',
  91. path: '/bibliographie/:type/:uuid',
  92. component: Bibliographie,
  93. props: true
  94. },
  95. {
  96. name: 'notfound',
  97. path: '/404',
  98. alias: '*',
  99. component: NotFound
  100. }
  101. ]
  102. export default new Router({
  103. mode: 'history',
  104. routes
  105. })