Navbar verbessert
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# ritzenbergen
|
||||
|
||||
[https://ritzenbergen.de](https://ritzenbergen.de) - Neue, private Homepage für das kleine Dorf Ritzenbergen
|
||||
|
||||
TODO:
|
||||
@@ -9,3 +10,4 @@ TODO:
|
||||
- Startseite
|
||||
- Footer, Texte?
|
||||
- Event Fotos
|
||||
- Navbar Hamburger Menu
|
||||
|
||||
12
src/App.vue
12
src/App.vue
@@ -1,15 +1,5 @@
|
||||
<script lang="js">
|
||||
import { RouterView } from 'vue-router';
|
||||
import './assets/parallax/jarallax.js';
|
||||
import './assets/bootstrap/js/bootstrap.bundle.min.js';
|
||||
import './assets/dropdown/js/navbar-dropdown.js';
|
||||
import './assets/mbr-switch-arrow/mbr-switch-arrow.js';
|
||||
import './assets/scrollgallery/scroll-gallery.js';
|
||||
import './assets/smoothscroll/smooth-scroll.js';
|
||||
/* import './assets/ytplayer/index.js'; */
|
||||
import './assets/theme/js/script.js';
|
||||
import './assets/formoid/formoid.min.js';
|
||||
/*import './assets/modal.js';*/
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -20,7 +10,7 @@ export default {
|
||||
|
||||
<template>
|
||||
<!-- Haupt-Component -->
|
||||
<RouterView/>
|
||||
<RouterView :key="$route.fullPath"/>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -5,9 +5,23 @@ export default {
|
||||
props: {
|
||||
links: {
|
||||
type: Array,
|
||||
required: true,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
datalinks: [
|
||||
{ link: "/galerie", title: "Galerie" },
|
||||
{ link: "/umgebung", title: "Umgebung" },
|
||||
{ link: "/footer", title: "Kontakt" },
|
||||
{ link: "/", title: "BuLi-Tipp" },
|
||||
],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.links);
|
||||
if(this.links) this.datalinks = this.links;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
@@ -25,9 +39,7 @@ export default {
|
||||
</RouterLink>
|
||||
</span>
|
||||
<span class="navbar-caption-wrap">
|
||||
<RouterLink
|
||||
class="navbar-caption text-black display-4"
|
||||
to="/"
|
||||
<RouterLink class="navbar-caption text-black display-4" to="/"
|
||||
>Amedorf & Ritzenbergen</RouterLink
|
||||
>
|
||||
</span>
|
||||
@@ -50,9 +62,9 @@ export default {
|
||||
<span></span>
|
||||
</div>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent" >
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav nav-dropdown" data-app-modern-menu="true">
|
||||
<li class="nav-item" v-for="link in links">
|
||||
<li class="nav-item" v-for="link in datalinks">
|
||||
<RouterLink
|
||||
class="nav-link link text-black display-4"
|
||||
:to="link.link"
|
||||
@@ -61,10 +73,9 @@ export default {
|
||||
{{ link.title }}
|
||||
</RouterLink>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="navbar-buttons mbr-section-btn">
|
||||
<RouterLink class="btn btn-primary display-4" to="/footer"
|
||||
<RouterLink class="btn btn-primary display-4" to="/willkommen"
|
||||
>Über Ritzenbergen</RouterLink
|
||||
>
|
||||
</div>
|
||||
@@ -74,16 +85,14 @@ export default {
|
||||
</section>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.container{
|
||||
font-family: 'Inter Tight';
|
||||
.container {
|
||||
font-family: "Inter Tight";
|
||||
}
|
||||
|
||||
.btn-primary{
|
||||
.btn-primary {
|
||||
font-weight: 600;
|
||||
}
|
||||
.link{
|
||||
.link {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -9,7 +9,8 @@ const routes = [
|
||||
{ path: '/bild/:ev/:jahr', component: () => import('../views/Bildvorschau.vue') },
|
||||
{ path: '/bild/:ev/:jahr/:bild', component: () => import('../views/Bildschau.vue') },
|
||||
{ path: '/umgebung', component: () => import('../views/Main.vue') },
|
||||
{ path: '/footer', component: () => import("../views/Main.vue")}
|
||||
{ path: '/footer', component: () => import("../views/Main.vue")},
|
||||
{ path: '/willkommen', component: () => import("../views/Main.vue")}
|
||||
]
|
||||
|
||||
export default createRouter({
|
||||
|
||||
@@ -98,13 +98,19 @@ export default {
|
||||
if(this.$route.params.ev){
|
||||
let ev = this.$route.params.ev;
|
||||
|
||||
console.log(this.$refs[ev][0].scrollIntoView());
|
||||
this.$refs[ev][0].scrollIntoView();
|
||||
this.$router.push("/galerie");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<Navbar />
|
||||
<Navbar :links="[
|
||||
{ title: 'Erntefest', link: '/galerie/erntefest' },
|
||||
{ title: 'Osterfeuer', link: '/galerie/osterfeuer' },
|
||||
{ title: 'Doppelkopf', link: '/galerie/doppelkopf' },
|
||||
{ title: 'Fußballturniere', link: '/galerie/fussball' },
|
||||
]" />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@@ -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