Navbar verbessert
This commit is contained in:
@@ -30,18 +30,21 @@ export default {
|
||||
RitzenbergenLib,
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
if(this.$route.path !== "/"){
|
||||
let hash = this.$route.path.replace("/","");
|
||||
console.log(this.$refs[hash])
|
||||
if(this.$refs[hash].$el) this.$refs[hash].$el.scrollIntoView();
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- Startseite -->
|
||||
<Navbar :links="[
|
||||
{link: '/galerie', title: 'Galerie'},
|
||||
{link: '/umgebung', title: 'Umgebung'},
|
||||
{link: '/footer', title: 'Kontakt'},
|
||||
{link: '/', title: 'BuLi-Tipp'},
|
||||
]"/>
|
||||
<Navbar />
|
||||
<Willkommen/>
|
||||
|
||||
|
||||
@@ -83,15 +86,15 @@ export default {
|
||||
|
||||
|
||||
|
||||
<WillkommenText/>
|
||||
<WillkommenText ref="willkommen"/>
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<Umgebung/>
|
||||
<Footer/>
|
||||
<Umgebung ref="umgebung" />
|
||||
<Footer ref="footer" />
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user