toggleable navbar dynamic if window.innerWidth < 1458

This commit is contained in:
ogerly 2022-04-11 09:28:27 +02:00
parent 3f60a9ef51
commit f707e2f8e7

View File

@ -1,6 +1,6 @@
<template>
<div class="auth-header">
<b-navbar toggleable="lg" class="p-0">
<b-navbar :toggleable="toggleable" class="p-0">
<div class="g-logo-radius bg-white p-3">
<b-img :src="logo" height="40" alt="..." />
</div>
@ -35,8 +35,26 @@ export default {
return {
logo: 'img/brand/green.png',
sheet: 'img/template/Blaetter.png',
windowWidth: window.innerWidth,
toggleable: false,
}
},
watch: {
windowWidth() {
this.toggleable = false
if (this.windowWidth < 1458) this.toggleable = true
},
},
mounted() {
this.$nextTick(() => {
window.addEventListener('resize', this.onResize)
})
},
methods: {
onResize() {
this.windowWidth = window.innerWidth
},
},
}
</script>
<style lang="scss">