mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
174 lines
4.2 KiB
Vue
Executable File
174 lines
4.2 KiB
Vue
Executable File
<template>
|
|
<div class="main-content bg-default">
|
|
<base-nav
|
|
v-model="showMenu"
|
|
:transparent="true"
|
|
menu-classes="justify-content-end"
|
|
class="navbar-horizontal navbar-main navbar-top navbar-dark"
|
|
expand="lg"
|
|
>
|
|
<div slot="brand" class="navbar-wrapper">
|
|
<b-navbar-brand to="/overview">
|
|
<img src="img/brand/white.png" />
|
|
</b-navbar-brand>
|
|
</div>
|
|
|
|
<template>
|
|
<div class="navbar-collapse-header">
|
|
<b-row>
|
|
<b-col cols="6" class="collapse-brand">
|
|
<router-link to="/overview">
|
|
<img src="img/brand/green.png" />
|
|
</router-link>
|
|
</b-col>
|
|
<b-col cols="6" class="collapse-close">
|
|
<button type="button" class="navbar-toggler" @click="showMenu = false">
|
|
<span></span>
|
|
<span></span>
|
|
</button>
|
|
</b-col>
|
|
</b-row>
|
|
</div>
|
|
</template>
|
|
</base-nav>
|
|
|
|
<div class="main-content">
|
|
<zoom-center-transition :duration="pageTransitionDuration" mode="out-in">
|
|
<router-view></router-view>
|
|
</zoom-center-transition>
|
|
</div>
|
|
|
|
<footer class="py-5" id="footer-main">
|
|
<b-container>
|
|
<b-row align-v="center" class="justify-content-xl-between">
|
|
<b-col xl="6">
|
|
<div class="copyright text-center text-xl-left text-muted">
|
|
© {{ year }}
|
|
<a href="https://gradido.net/" class="font-weight-bold ml-1" target="_blank">
|
|
Gradido-Akademie
|
|
</a>
|
|
</div>
|
|
</b-col>
|
|
<b-col xl="6" class="col-xl-6">
|
|
<b-nav class="nav-footer justify-content-center justify-content-lg-end">
|
|
<b-nav-item ref="https://www.creative-tim.com" target="_blank">Gradido</b-nav-item>
|
|
<b-nav-item href="https://www.creative-tim.com/presentation" target="_blank">
|
|
Impressum
|
|
</b-nav-item>
|
|
<b-nav-item href="http://blog.creative-tim.com" target="_blank">
|
|
Datenschutzerklärung
|
|
</b-nav-item>
|
|
</b-nav>
|
|
</b-col>
|
|
</b-row>
|
|
</b-container>
|
|
</footer>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { BaseNav } from '@/components'
|
|
import { ZoomCenterTransition } from 'vue2-transitions'
|
|
|
|
export default {
|
|
components: {
|
|
BaseNav,
|
|
ZoomCenterTransition,
|
|
},
|
|
props: {
|
|
backgroundColor: {
|
|
type: String,
|
|
default: 'black',
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
showMenu: false,
|
|
menuTransitionDuration: 250,
|
|
pageTransitionDuration: 200,
|
|
year: new Date().getFullYear(),
|
|
pageClass: 'login-page',
|
|
}
|
|
},
|
|
computed: {
|
|
title() {
|
|
return `${this.$route.name} Page`
|
|
},
|
|
},
|
|
methods: {
|
|
toggleNavbar() {
|
|
document.body.classList.toggle('nav-open')
|
|
this.showMenu = !this.showMenu
|
|
},
|
|
closeMenu() {
|
|
document.body.classList.remove('nav-open')
|
|
this.showMenu = false
|
|
},
|
|
setBackgroundColor() {
|
|
document.body.classList.add('bg-default')
|
|
},
|
|
removeBackgroundColor() {
|
|
document.body.classList.remove('bg-default')
|
|
},
|
|
updateBackground() {
|
|
if (!this.$route.meta.noBodyBackground) {
|
|
this.setBackgroundColor()
|
|
} else {
|
|
this.removeBackgroundColor()
|
|
}
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
this.removeBackgroundColor()
|
|
},
|
|
beforeRouteUpdate(to, from, next) {
|
|
// Close the mobile menu first then transition to next page
|
|
if (this.showMenu) {
|
|
this.closeMenu()
|
|
setTimeout(() => {
|
|
next()
|
|
}, this.menuTransitionDuration)
|
|
} else {
|
|
next()
|
|
}
|
|
},
|
|
watch: {
|
|
$route: {
|
|
immediate: true,
|
|
handler: function () {
|
|
this.updateBackground()
|
|
},
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
<style lang="scss">
|
|
$scaleSize: 0.8;
|
|
@keyframes zoomIn8 {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale3d($scaleSize, $scaleSize, $scaleSize);
|
|
}
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.main-content .zoomIn {
|
|
animation-name: zoomIn8;
|
|
}
|
|
|
|
@keyframes zoomOut8 {
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
transform: scale3d($scaleSize, $scaleSize, $scaleSize);
|
|
}
|
|
}
|
|
|
|
.main-content .zoomOut {
|
|
animation-name: zoomOut8;
|
|
}
|
|
</style>
|