mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
add optional header menu
This commit is contained in:
parent
f6bfc8aa7f
commit
60302c08d7
20
webapp/components/HeaderMenu/HeaderMenu.vue
Normal file
20
webapp/components/HeaderMenu/HeaderMenu.vue
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<div class="header-menu">
|
||||||
|
|
||||||
|
<ds-menu v-if="show" :routes="menu" navbar style="margin-right: 20px"></ds-menu>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import headerMenu from '../../constants/headerMenu.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HeaderMenu',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
show: headerMenu.SHOW_HEADER_MENU,
|
||||||
|
menu: headerMenu.MENU,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
35
webapp/constants/headerMenu.js
Normal file
35
webapp/constants/headerMenu.js
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
export default {
|
||||||
|
SHOW_HEADER_MENU: true,
|
||||||
|
MENU: [{
|
||||||
|
name: 'Themen',
|
||||||
|
path: '/#'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Gruppen',
|
||||||
|
path: '/#',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'Gruppe 1',
|
||||||
|
path: '/#'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Gruppe 2',
|
||||||
|
path: '/#'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Über Yunite',
|
||||||
|
path: '/#',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'Impressum',
|
||||||
|
path: '/#'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Yunite Team',
|
||||||
|
path: '/#'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@
|
|||||||
<logo logoType="header" />
|
<logo logoType="header" />
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
|
<header-menu />
|
||||||
<ds-flex-item
|
<ds-flex-item
|
||||||
:width="{ base: '40%', sm: '40%', md: '40%', lg: '0%' }"
|
:width="{ base: '40%', sm: '40%', md: '40%', lg: '0%' }"
|
||||||
class="mobile-hamburger-menu"
|
class="mobile-hamburger-menu"
|
||||||
@ -16,7 +17,7 @@
|
|||||||
<base-button icon="bars" @click="toggleMobileMenuView" circle />
|
<base-button icon="bars" @click="toggleMobileMenuView" circle />
|
||||||
</ds-flex-item>
|
</ds-flex-item>
|
||||||
<ds-flex-item
|
<ds-flex-item
|
||||||
:width="{ base: '45%', sm: '45%', md: '45%', lg: '50%' }"
|
:width="{ base: '45%', sm: '45%', md: '45%', lg: show ? 'auto' : '50%' }"
|
||||||
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
|
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
|
||||||
style="flex-shrink: 0; flex-grow: 1"
|
style="flex-shrink: 0; flex-grow: 1"
|
||||||
id="nav-search-box"
|
id="nav-search-box"
|
||||||
@ -80,6 +81,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Logo from '~/components/Logo/Logo'
|
import Logo from '~/components/Logo/Logo'
|
||||||
|
import HeaderMenu from '~/components/HeaderMenu/HeaderMenu.vue'
|
||||||
|
import headerMenu from '../constants/headerMenu.js'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
|
||||||
import SearchField from '~/components/features/SearchField/SearchField.vue'
|
import SearchField from '~/components/features/SearchField/SearchField.vue'
|
||||||
@ -94,6 +97,7 @@ import InviteButton from '~/components/InviteButton/InviteButton'
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Logo,
|
Logo,
|
||||||
|
HeaderMenu,
|
||||||
LocaleSwitch,
|
LocaleSwitch,
|
||||||
SearchField,
|
SearchField,
|
||||||
Modal,
|
Modal,
|
||||||
@ -106,6 +110,7 @@ export default {
|
|||||||
mixins: [seo],
|
mixins: [seo],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
show: headerMenu.SHOW_HEADER_MENU,
|
||||||
mobileSearchVisible: false,
|
mobileSearchVisible: false,
|
||||||
toggleMobileMenu: false,
|
toggleMobileMenu: false,
|
||||||
inviteRegistration: this.$env.INVITE_REGISTRATION === true, // for 'false' in .env INVITE_REGISTRATION is of type undefined and not(!) boolean false, because of internal handling,
|
inviteRegistration: this.$env.INVITE_REGISTRATION === true, // for 'false' in .env INVITE_REGISTRATION is of type undefined and not(!) boolean false, because of internal handling,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user