index.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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: '/texts/:id',
  42. component: Edition
  43. },
  44. {
  45. name: 'editiontext',
  46. path: '/texts/:id/:textid',
  47. component: Edition
  48. },
  49. {
  50. name: 'editiontextextract',
  51. path: '/texts/:id/:textid/:ocid',
  52. component: Edition
  53. },
  54. {
  55. name: 'indexNominum',
  56. path: '/indexNominum',
  57. component: IndexNominum
  58. },
  59. {
  60. name: 'nominum',
  61. path: '/indexNominum/:id',
  62. component: Nominum
  63. },
  64. {
  65. name: 'indexLocorum',
  66. path: '/indexLocorum',
  67. component: IndexLocorum
  68. },
  69. {
  70. name: 'locorum',
  71. path: '/indexLocorum/:id',
  72. component: Locorum
  73. },
  74. {
  75. name: 'indexOperum',
  76. path: '/indexOperum',
  77. component: IndexOperum
  78. },
  79. {
  80. name: 'operum',
  81. path: '/indexOperum/:id',
  82. component: Operum
  83. },
  84. {
  85. path: '/bibliography',
  86. redirect: '/bibliography/expressions'
  87. },
  88. {
  89. name: 'bibliographie',
  90. path: '/bibliography/:type',
  91. component: Bibliographie,
  92. props: true
  93. },
  94. {
  95. name: 'bibliographieItem',
  96. path: '/bibliography/:type/:uuid',
  97. component: Bibliographie,
  98. props: true
  99. },
  100. {
  101. name: 'notfound',
  102. path: '/404',
  103. alias: '*',
  104. component: NotFound
  105. }
  106. ]
  107. export default new Router({
  108. mode: 'history',
  109. routes
  110. })