mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
toggleable navbar dynamic if window.innerWidth < 1458
This commit is contained in:
parent
3f60a9ef51
commit
f707e2f8e7
@ -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">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user