App.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div id="root">
  3. <header role="banner">
  4. <div class="wrapper">
  5. <h1
  6. class="site-title"
  7. tabindex="0"
  8. >
  9. <router-link :to="{ name:'home' }">Les Guides de Paris</router-link>
  10. </h1>
  11. <HeaderMenu />
  12. </div>
  13. </header>
  14. <section role="main-content">
  15. <div class="wrapper">
  16. <transition name="fade" mode="out-in">
  17. <RouterView />
  18. </transition>
  19. </div>
  20. </section>
  21. <footer role="tools">
  22. <History />
  23. <Results v-if="resultsOpened" />
  24. <div id="footer-bottom" class="row">
  25. <FooterTabs />
  26. <Search />
  27. </div>
  28. </footer>
  29. </div>
  30. </template>
  31. <script>
  32. import HeaderMenu from './components/nav/HeaderMenu'
  33. import History from './components/nav/History'
  34. import Results from './components/nav/Results'
  35. import Search from './components/nav/Search'
  36. import FooterTabs from './components/nav/FooterTabs'
  37. import { mapActions, mapState } from 'vuex'
  38. export default {
  39. metaInfo: {
  40. // if no subcomponents specify a metaInfo.title, this title will be used
  41. title: 'Home',
  42. // all titles will be injected into this template
  43. titleTemplate: '%s | Guides de Paris',
  44. meta: [
  45. { charset: 'utf-8' },
  46. { name: 'viewport', content: 'width=device-width, initial-scale=1' }
  47. ]
  48. },
  49. components: {
  50. HeaderMenu,
  51. History,
  52. Results,
  53. Search,
  54. FooterTabs
  55. },
  56. computed: {
  57. ...mapState({
  58. resultsOpened: state => state.Search.opened,
  59. editionslist: state => state.Corpus.editionslist
  60. })
  61. },
  62. created () {
  63. if (!this.editionslist.length) {
  64. this.getCorpuses()
  65. }
  66. },
  67. methods: {
  68. ...mapActions({
  69. getCorpuses: 'Corpus/getCorpuses'
  70. })
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .container{
  76. // font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  77. max-width: 1200px;
  78. }
  79. </style>