- {new Date().getTime() - countdown.getTime() < 0 ? (
-
- Event Click{' '}
-
- https://bbb.rocket.chat/b/sin-ur2-c72-cbv
-
-
- ) : (
-
- Recordings are available on{' '}
-
- Youtube
-
-
- )}
+
+ Recordings are available on{' '}
+
+ Youtube
+
+
Open Source is not only about technology. It's about people too!
Human connections that will expand your network and enable you
From 5034a7a5be3950c616e80edae38b52bba149691c Mon Sep 17 00:00:00 2001
From: Irfan Asif
Date: Sun, 22 May 2022 16:24:23 +0530
Subject: [PATCH 3/9] [ADD] new Menubar component
---
app/components/layout.js | 4 +-
app/components/newMenuBar.js | 273 ++++++++++++++++++
app/styles/Menubar.module.css | 45 +++
.../sub-menu/models/sub-menu.settings.json | 3 +
4 files changed, 324 insertions(+), 1 deletion(-)
create mode 100644 app/components/newMenuBar.js
diff --git a/app/components/layout.js b/app/components/layout.js
index d21faf98..250328a0 100644
--- a/app/components/layout.js
+++ b/app/components/layout.js
@@ -1,5 +1,6 @@
import '../styles/Layout.module.css';
import Footer from './footer';
+import NewMenubar from './newMenuBar';
import Menubar from './menubar';
import { useRouter } from 'next/router';
@@ -7,7 +8,8 @@ function Layout(props) {
const { pathname } = useRouter();
return (
<>
-
+ {/**/}
+
{props.children}
{/* announcement component here*/}
diff --git a/app/components/newMenuBar.js b/app/components/newMenuBar.js
new file mode 100644
index 00000000..16be9272
--- /dev/null
+++ b/app/components/newMenuBar.js
@@ -0,0 +1,273 @@
+import { useEffect, useRef, useState } from 'react';
+import { Navbar, Nav, Container, Col, Row, Offcanvas } from 'react-bootstrap';
+import styles from '../styles/Menubar.module.css';
+import { FirebaseAuthMenuButton } from './auth/firebase';
+import BrandLogo from './brandlogo';
+
+const ArrowIcon = () => {
+ return (
+
+ );
+};
+
+const MobileNav = ({ nav_Items }) => {
+ const [dropDown, setDropDown] = useState({ show: false, _id: 0 });
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ Rocket Chat Community
+
+
+ {nav_Items?.map((nav_Item) =>
+ nav_Item.url ? (
+
+ ) : (
+
+
{
+ if (dropDown._id === nav_Item.id) {
+ setDropDown({ show: false, _id: 0 });
+ } else {
+ setDropDown({ show: true, _id: nav_Item.id });
+ }
+ }}
+ >
+
+ {nav_Item.label}
+
+
+ {nav_Item.sub_menus?.length > 1 && (
+
+
+
+ )}
+
+
+ {dropDown._id === nav_Item.id && dropDown.show ? (
+
+
+ {nav_Item.sub_menus.map(
+ (item) =>
+ item.parent_id === null && (
+ <>
+
+ {nav_Item.sub_menus.map(
+ (subItem) =>
+ subItem.parent_id === item.id && (
+
+ )
+ )}
+ >
+ )
+ )}
+
+
+ ) : (
+ ''
+ )}
+
+ )
+ )}
+
+
+
+
+
+
+
+
+
+ );
+};
+
+const DesktopNav = ({ nav_Items }) => {
+ const [isShown, setIsShown] = useState(0);
+ const clickRef = useRef(null);
+
+ const handleClickOutside = (event) => {
+ if (clickRef.current && !clickRef.current.contains(event.target)) {
+ setIsShown(false);
+ }
+ };
+
+ useEffect(() => {
+ document.addEventListener('click', handleClickOutside, true);
+ return () => {
+ document.removeEventListener('click', handleClickOutside, true);
+ };
+ }, []);
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+export default function NewMenubar(props) {
+ return (
+
+
+
+
+ );
+}
diff --git a/app/styles/Menubar.module.css b/app/styles/Menubar.module.css
index 11d342c5..ce8e96a4 100644
--- a/app/styles/Menubar.module.css
+++ b/app/styles/Menubar.module.css
@@ -96,3 +96,48 @@
margin-top: 10px;
transform: rotate(0deg);
}
+
+.rotate {
+ transform: rotate(-180deg);
+ transition: all 0.1s;
+}
+.navbar_subitems {
+ position: absolute;
+ transform: translate(-5rem, 30px);
+ background-color: white;
+ padding: 0rem;
+ max-width: 36rem;
+ z-index: 10;
+}
+
+.navbar_subitems_items {
+ padding: 1rem 1rem 1rem 2rem;
+ width: 18rem;
+}
+
+.subItemLinks {
+ cursor: pointer;
+
+ text-decoration: none;
+ color: black;
+}
+
+.color {
+ color: red;
+}
+.arrow {
+ margin-left: 80%;
+}
+
+.arrowRotate {
+ margin-left: 80%;
+ transform: rotate(180deg);
+}
+.navbar_item_hover:hover {
+ cursor: pointer;
+ color: red;
+}
+
+.dropdown {
+ cursor: pointer;
+}
diff --git a/cms/api/sub-menu/models/sub-menu.settings.json b/cms/api/sub-menu/models/sub-menu.settings.json
index 9202b7dc..8ace4990 100644
--- a/cms/api/sub-menu/models/sub-menu.settings.json
+++ b/cms/api/sub-menu/models/sub-menu.settings.json
@@ -17,6 +17,9 @@
},
"url": {
"type": "string"
+ },
+ "parent_id": {
+ "type": "integer"
}
}
}
From b2b5a52f2301db38727703c75a4565142a84799c Mon Sep 17 00:00:00 2001
From: Irfan Asif
Date: Fri, 27 May 2022 15:44:46 +0530
Subject: [PATCH 4/9] [FIX] build issue
---
app/components/newMenuBar.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/components/newMenuBar.js b/app/components/newMenuBar.js
index 16be9272..c731e7ef 100644
--- a/app/components/newMenuBar.js
+++ b/app/components/newMenuBar.js
@@ -180,7 +180,7 @@ const DesktopNav = ({ nav_Items }) => {
width={132}
/>