fix header menu submenu #827

This commit is contained in:
2020-07-29 19:03:59 +02:00
parent 91875258de
commit 79943af82e
4 changed files with 17 additions and 5 deletions
+7 -2
View File
@@ -70,12 +70,17 @@ header[role="banner"]{
overflow: hidden; overflow: hidden;
} }
} }
&:hover, &.opened{ //
// &:focus-within
// &:hover,
&.opened{
>ul>li{ >ul>li{
height:1em; height:1em;
} }
} }
&.has-submenu{
cursor: pointer;
}
} }
li>span,li>a{ li>span,li>a{
font-size: 0.9em; font-size: 0.9em;
+1 -1
View File
@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Les Guides de Paris</title> <title>Les Guides de Paris</title>
</head> </head>
<body> <body tabindex="-1">
<div id="app"></div> <div id="app"></div>
</body> </body>
</html> </html>
+1 -1
View File
@@ -12,8 +12,8 @@
@scroll.passive="onScrollCenter" @scroll.passive="onScrollCenter"
> >
<div <div
class="wrapper"
ref="scrollablecenter" ref="scrollablecenter"
class="wrapper"
> >
<slot /> <slot />
</div> </div>
+8 -1
View File
@@ -6,7 +6,8 @@
<span v-if="!corpusLoaded" class="loading">Loading ...</span> <span v-if="!corpusLoaded" class="loading">Loading ...</span>
<router-link v-else to="/corpus">Corpus</router-link> <router-link v-else to="/corpus">Corpus</router-link>
</li> </li>
<li :class="{ opened: indexOpened }"> <li class="has-submenu" :class="{ opened: indexOpened }">
<!-- tabindex="-1" -->
<span <span
@click.prevent="onClickIndex" @click.prevent="onClickIndex"
@keyup.enter="onClickIndex" @keyup.enter="onClickIndex"
@@ -44,6 +45,12 @@ export default {
corpusLoaded: state => state.Corpus.corpusLoaded corpusLoaded: state => state.Corpus.corpusLoaded
}) })
}, },
watch: {
$route (n, o) {
console.log('route changed')
this.indexOpened = false
}
},
methods: { methods: {
onClickIndex (e) { onClickIndex (e) {
console.log('onClickIndex') console.log('onClickIndex')