-
-
-
-
+ {megaMenu && displayMegaMenu &&
+
+
-
-
setDisplayMenu2(false)}
- >
- setDisplayMenu2(false)}
- groups={[
- {
- title: "Sakramenten",
- items: [
- {
- title: "Taufe",
- description: "Neues Leben in Christus",
- href: "https://"
- },
- {
- title: "Eucharistie",
- description: "Gemeinschaft durch Brot und Wein",
- href: "https://"
- },
- {
- title: "Firmung",
- description: "Stärkung im Heiligen Geist",
- href: "https://"
- },
- {
- title: "Ehe",
- description: "Bund in Liebe, Treue",
- href: "https://"
- },
- {
- title: "Beichte",
- description: "Sündenbekenntnis, Vergebung und Neuanfang mit Gottes Gnade",
- href: "https://"
- },
- {
- title: "Krankensalbung",
- description: "Stärkung und Gottes Beistand",
- href: "https://"
- }
- ]
- },
- {
- title: "Gebet",
- items: [
- {
- title: "Gottesdienste",
- description: "Begegnung mit Gott",
- href: "https://"
- },
- {
- title: "Rosenkranz",
- description: "Gebet der Meditation",
- href: "https://"
- },
- {
- title: "Anbetung",
- description: "Stille Begegnung mit Gott",
- href: "https://"
- },
- {
- title: "Lobpreis",
- description: "Dank, Ehre und Freude",
- href: "https://"
- },
- ]
- }
- ]} />
-
-
setDisplayMenu1(false)}
- >
- setDisplayMenu1(false)}
- groups={[
- {
- title: "Gemeinden",
- items: [
- {
- title: "St. Richard",
- description: "Mehr informationen",
- href: "/gemeinde/st-richard"
- },
- {
- title: "St. Christophorus",
- description: "Mehr informationen",
- href: "/gemeinde/st-christophorus"
- },
- {
- title: "St. Clara",
- description: "Mehr informationen",
- href: "/gemeinde/st-clara"
- },
- ]
- },
- {
- title: "Gruppen",
- items: [
- {
- title: "Kathoccino",
- description: "Begegnung mit Gott",
- href: "https://"
- },
- {
- title: "Credo & Agape",
- description: "Gebet der Meditation",
- href: "https://"
- },
- {
- title: "Mädchengruppe",
- description: "Stille Begegnung mit Gott",
- href: "https://"
- },
- {
- title: "Alphakurs",
- description: "Dank, Ehre und Freude",
- href: "https://"
- },
- ]
- },
- {
- title: "Aktivitaten",
- items: [
- {
- title: "Kochen",
- description: "Begegnung mit Gott",
- href: "https://"
- },
- {
- title: "Lernen",
- description: "Gebet der Meditation",
- href: "https://"
- },
- {
- title: "Wandern",
- description: "Stille Begegnung mit Gott",
- href: "https://"
- },
- {
- title: "Singen",
- description: "Dank, Ehre und Freude",
- href: "https://"
- },
- ]
- }
- ]} />
-
+ }
+ >
+
+ )
+}
+
+type MenuItemsProps = {
+ items: MenuItemType[]
+}
+
+const MenuItems = ({items}: MenuItemsProps) => {
+ return (
+ <>
+ {items.map(item =>
+
+ )}
+ >
+ )
+}
+
+type MenuProps = {
+ menu: MenuType
+}
+
+export const Menu = ({menu}: MenuProps) => {
+
+ const [displayMenuMobile, setDisplayMenuMobile] = useState(false)
+
+
+ return (
+ <>
+
+
>
)
diff --git a/src/components/Menu/menu.types.ts b/src/components/Menu/menu.types.ts
new file mode 100644
index 0000000..308ec24
--- /dev/null
+++ b/src/components/Menu/menu.types.ts
@@ -0,0 +1,33 @@
+export type Menu = {
+ leftItems: MenuItem[]
+ rightItems: MenuItem[]
+}
+
+export type MenuItem = {
+ text: string,
+ href?: string
+ megaMenu?: MegaMenu
+ display?: "normal" | "button"
+}
+
+type MegaMenu = {
+ groups: MegaMenuGroup[]
+ text: MegaMenuText
+}
+
+type MegaMenuGroup = {
+ title: string
+ items: MegaMenuItem[]
+}
+
+type MegaMenuItem = {
+ title: string,
+ description: string
+ href: string
+ icon?: string
+}
+
+type MegaMenuText = {
+ quote: string
+ source: string
+}
\ No newline at end of file
diff --git a/src/components/Menu/styles.module.scss b/src/components/Menu/styles.module.scss
index 41f2e1b..4b31936 100644
--- a/src/components/Menu/styles.module.scss
+++ b/src/components/Menu/styles.module.scss
@@ -2,7 +2,6 @@
.nav {
display: flex;
- align-items: center;
gap: 20px;
color: $base-color;
padding: 15px 45px;
@@ -14,6 +13,8 @@
box-sizing: border-box;
z-index: 1;
backdrop-filter: blur(8px);
+ font-size: 18px;
+ align-items: baseline;
}
.navMobile {
@@ -23,6 +24,7 @@
.itemsLeft {
display: flex;
gap: 30px;
+ flex-grow: 1;
}
.menuLink {
@@ -30,6 +32,7 @@
text-decoration: none;
font-weight: 600;
transition: opacity 100ms ease-in;
+ cursor: pointer;
}
.menuLink:hover {
@@ -37,10 +40,8 @@
}
.itemsRight {
- margin-left: auto;
display: flex;
gap: 20px;
- justify-content: flex-end;
align-items: baseline;
}
@@ -48,6 +49,8 @@
padding: 10px;
border-radius: 10px;
border: none;
+ color: inherit;
+ text-decoration: none;
background-color: #eeeeee;
transition: background-color 0.1s ease-in-out;
font-family: inherit;
@@ -62,17 +65,44 @@
.megaMenu {
position: fixed;
top: 76px;
+ left: 0;
+ width: 100%;
z-index: 8;
- opacity: 0;
- transition: opacity 0.2s ease-in-out;
}
@media screen and (max-width: 800px) {
+ .nav {
+ flex-direction: column;
+ padding: 15px 15px;
+ align-items: inherit;
+ }
+
+ .megaMenu {
+ position: inherit;
+ }
+
.navMobile {
- display: block;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
}
.itemsLeft {
+ padding-bottom: 15px;
+ border-bottom: 1px solid #d0d0d0;
+ }
+
+ .itemsLeft, .itemsRight {
+ gap: 10px;
+ flex-direction: column;
+ }
+
+ .hide {
display: none;
}
+
+ .full {
+ height: 100vh;
+ overflow: scroll;
+ }
}