App.vue 2.4 KB

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