index.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. import Static from 'pages/Static'
  17. Vue.use(Router)
  18. const routes = [
  19. {
  20. name: 'home',
  21. path: '/',
  22. component: Home
  23. },
  24. {
  25. name: 'credits',
  26. path: '/credits',
  27. component: Static
  28. },
  29. {
  30. name: 'guide',
  31. path: '/guide',
  32. component: Static
  33. },
  34. {
  35. name: 'schema',
  36. path: '/schema',
  37. component: Static
  38. },
  39. {
  40. name: 'api',
  41. path: '/api',
  42. component: Static
  43. },
  44. {
  45. name: 'listcorpus',
  46. path: '/corpus',
  47. component: ListCorpus
  48. },
  49. // {
  50. // name: 'corpus',
  51. // path: '/corpus/:id',
  52. // component: Corpus
  53. // },
  54. {
  55. name: 'edition',
  56. path: '/texts/:id',
  57. component: Edition
  58. },
  59. {
  60. name: 'editiontext',
  61. path: '/texts/:id/:textid',
  62. component: Edition
  63. },
  64. {
  65. name: 'editiontextextract',
  66. path: '/texts/:id/:textid/:ocid',
  67. component: Edition
  68. },
  69. {
  70. name: 'indexNominum',
  71. path: '/indexNominum',
  72. component: IndexNominum
  73. },
  74. {
  75. name: 'nominum',
  76. path: '/indexNominum/:id',
  77. component: Nominum
  78. },
  79. {
  80. name: 'indexLocorum',
  81. path: '/indexLocorum',
  82. component: IndexLocorum
  83. },
  84. {
  85. name: 'locorum',
  86. path: '/indexLocorum/:id',
  87. component: Locorum
  88. },
  89. {
  90. name: 'indexOperum',
  91. path: '/indexOperum',
  92. component: IndexOperum
  93. },
  94. {
  95. name: 'operum',
  96. path: '/indexOperum/:id',
  97. component: Operum
  98. },
  99. {
  100. path: '/bibliography',
  101. redirect: '/bibliography/expressions'
  102. },
  103. {
  104. name: 'bibliographie',
  105. path: '/bibliography/:type',
  106. component: Bibliographie,
  107. props: true
  108. },
  109. {
  110. name: 'bibliographieItem',
  111. path: '/bibliography/:type/:uuid',
  112. component: Bibliographie,
  113. props: true
  114. },
  115. {
  116. name: 'notfound',
  117. path: '/404',
  118. alias: '*',
  119. component: NotFound
  120. }
  121. ]
  122. export default new Router({
  123. mode: 'history',
  124. routes
  125. })