App.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. v-if="$route.name === 'home' && (!searchResults || !searchResults.length)"
  29. id="logos"
  30. class="col-7"
  31. >
  32. <img src="/static/img/logos/labex.jpg" alt="">
  33. <img src="/static/img/logos/PIA logo.png" alt="">
  34. </div>
  35. </div>
  36. </footer>
  37. </div>
  38. </template>
  39. <script>
  40. import HeaderMenu from './components/nav/HeaderMenu'
  41. import History from './components/nav/History'
  42. import Results from './components/nav/Results'
  43. import Search from './components/nav/Search'
  44. import FooterTabs from './components/nav/FooterTabs'
  45. import { mapActions, mapState } from 'vuex'
  46. export default {
  47. metaInfo: {
  48. // if no subcomponents specify a metaInfo.title, this title will be used
  49. title: 'Home',
  50. // all titles will be injected into this template
  51. titleTemplate: '%s | Guides de Paris',
  52. meta: [
  53. { charset: 'utf-8' },
  54. { name: 'viewport', content: 'width=device-width, initial-scale=1' }
  55. ]
  56. },
  57. components: {
  58. HeaderMenu,
  59. History,
  60. Results,
  61. Search,
  62. FooterTabs
  63. },
  64. computed: {
  65. ...mapState({
  66. resultsOpened: state => state.Search.opened,
  67. editionslist: state => state.Corpus.editionslist,
  68. searchResults: state => state.Corpus.results
  69. })
  70. },
  71. created () {
  72. if (!this.editionslist.length) {
  73. this.getCorpuses()
  74. }
  75. },
  76. methods: {
  77. ...mapActions({
  78. getCorpuses: 'Corpus/getCorpuses'
  79. })
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .container{
  85. // font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  86. max-width: 1200px;
  87. }
  88. </style>