App.vue 1.8 KB

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