Skip to content

Commit

Permalink
Merge branch 'levelupesg:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
devbn3li authored Feb 27, 2024
2 parents 566ac32 + 298786f commit 5df3e9c
Show file tree
Hide file tree
Showing 13 changed files with 208 additions and 121 deletions.
16 changes: 1 addition & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/assets/Business/Picture1.png
Binary file not shown.
Binary file added public/assets/Premasset/bot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 37 additions & 16 deletions src/Components/Chatbot/Chatbot.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React, { useState, useRef } from "react";
import axios from "axios";
import { FiSearch, FiX } from "react-icons/fi"; // Import icons
import { TextGenerateEffect } from '../Ui/text-generate-effect'; // Adjust the import path as needed
import { TextGenerateEffect } from "../Ui/text-generate-effect"; // Adjust the import path as needed
import { Sparkels } from "./Sparkels";



function Chatbot() {
const [inputText, setInputText] = useState("");
const [finalData, setFinalData] = useState("");
Expand Down Expand Up @@ -48,20 +46,24 @@ function Chatbot() {
};

return (
<>
<section

className=" w-full rounded-2xl py-[5rem] max-sm:py-8">

<>
<section className=" w-full rounded-2xl py-[5rem] max-sm:py-8">
<div className="relative w-[90%] md:w-[80%] mx-auto flex justify-center items-center flex-col py-[4rem] pt-[6rem] px-2rem text-[#002E70]">
<h1 className="text-2xl md:text-5xl max-w-[700px] text-center md:font-bold tracking-wider mb-3">
The 2024 Global Internal Audit Standards
</h1>
<Sparkels/>
<Sparkels />
<p className="my-6 mt-4 md:w-[70%] text-center text-[#002E70] text-xl leading-[1.7] aos-init aos-animate">
👋 I am LevelUp IA, an AI assistant created by LevelUp to be helpful, harmless, and honest. Feel free to ask me any questions you may have about the 2024 Global Internal Audit Standards. I&apos;ll do my best to provide accurate and useful information to support your understanding of these standards.
👋 I am LevelUp IA, an AI assistant created by LevelUp to be
helpful, harmless, and honest. Feel free to ask me any questions you
may have about the 2024 Global Internal Audit Standards. I&apos;ll
do my best to provide accurate and useful information to support
your understanding of these standards.
</p>
<form onSubmit={handleFormSubmit} className="relative flex items-center mb-10">
<form
onSubmit={handleFormSubmit}
className="relative flex items-center mb-10"
>
<input
ref={inputRef}
type="text"
Expand All @@ -76,10 +78,18 @@ function Chatbot() {
className="flex justify-center items-center cursor-pointer absolute right-2 font-bold w-[30px] h-[30px] rounded-full text-xl"
onClick={iconType === "search" ? handleFormSubmit : clearInput}
>
{iconType === "search" ? <FiSearch className="text-[#002E70]" /> : <FiX className="text-[#002E70]" />}
{iconType === "search" ? (
<FiSearch className="text-[#002E70]" />
) : (
<FiX className="text-[#002E70]" />
)}
</div>
</form>
<div className={`relative border-[#002E70]/30 max-[400px]:w-[330px] w-[350px] sm:w-[500px] md:w-[700px] h-[350px] bg-white/30 p-4 rounded-xl outline-none text-[#002E70] text-xl overflow-auto backdrop-blur-lg border-2 ${isLoading ? "border-[#002E70]" : ""}`}>
<div
className={`relative border-[#002E70]/30 max-[400px]:w-[330px] w-[350px] sm:w-[500px] md:w-[700px] h-[350px] bg-white/30 p-4 rounded-xl outline-none text-[#002E70] text-xl overflow-auto backdrop-blur-lg border-2 ${
isLoading ? "border-[#002E70]" : ""
}`}
>
{isLoading ? (
<div className="absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center bg-opacity-50 backdrop-blur-sm">
<div className="w-8 h-8 border-4 border-t-blue-500 border-r-blue-500 border-b-transparent border-l-transparent rounded-full animate-spin"></div>
Expand All @@ -88,18 +98,29 @@ function Chatbot() {
<div className="text-red-500">{error}</div>
) : (
<>
{finalData && <TextGenerateEffect words={finalData} className="text-animation" />}
{finalData && (
<TextGenerateEffect
words={finalData}
className="text-animation"
/>
)}
<div className="flex flex-wrap justify-center">
{options.length > 0 &&
options.map((option, index) => (
<TextGenerateEffect key={index} words={option} className="options-animation" />
<TextGenerateEffect
key={index}
words={option}
className="options-animation"
/>
))}
</div>
</>
)}
</div>
<div className="mt-4 px-2 opacity-90 font-bold text-center text-xs text-[#002E70] md:w-[60%]">
The information provided by the chatbot may not always be accurate. Use it as a guide and verify details independently. The context of the responses are based in 2024 Global Internal Audit Standards.
The information provided by the chatbot may not always be accurate.
Use it as a guide and verify details independently. The context of
the responses are based in 2024 Global Internal Audit Standards.
</div>
</div>
</section>
Expand Down
139 changes: 107 additions & 32 deletions src/Components/Navbar/Dropdown_V.2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,145 @@ import { Link } from "react-router-dom";
import SubNavbarLink_V2 from "./SubNavbarLink_V.2";
import { MdArrowRight } from "react-icons/md";
import SubNavbarLink from "./SubNavbarLink";
import AiInternalAuditIMG from "../../../public/assets/Premasset/bot.png";

const Dropdown_V2 = ({ isTabOpen, toggleTab, closeTab, data }) => {

return (
<div
className={"group min-[1130px]:h-full cursor-pointer max-[1130px]:w-full text-[#121212] "}>
className={
"group min-[1130px]:h-full cursor-pointer max-[1130px]:w-full text-[#121212] "
}
>
<div className="group min-[1130px]:h-full cursor-pointer max-[1130px]:w-full">
{/* Start Button */}
<span className="px-4 max-[1130px]:py-8 flex items-center justify-center min-[1130px]:h-full transition-all duration-[.45s] max-[1130px]:hover:bg-transparent max-[1130px]:px-0 relative
after:absolute after:h-[2px] after:bg-[#121212] after:w-0 after:left-1/2 after:-translate-x-1/2 after:hover:w-full after:transition-all after:bottom-0" onClick={toggleTab}>
<span
className="px-4 max-[1130px]:py-8 flex items-center justify-center min-[1130px]:h-full transition-all duration-[.45s] max-[1130px]:hover:bg-transparent max-[1130px]:px-0 relative
after:absolute after:h-[2px] after:bg-[#121212] after:w-0 after:left-1/2 after:-translate-x-1/2 after:hover:w-full after:transition-all after:bottom-0"
onClick={toggleTab}
>
{data.title}
</span>
{/* End Button */}

{/* Start Dropdown */}
<div className={`w-screen transition-all flex justify-center items-center min-[1130px]:absolute min-[1130px]:left-1/2 min-[1130px]:top-[calc(100%+1px)] box-border min-[1130px]:-translate-x-1/2 min-[1130px]:shadow-md group-hover:border-b border-b-[#02c2ab] bg-white h-0 ${isTabOpen && "max-[1130px]:h-auto max-[1130px]:py-5"} overflow-hidden min-[1190px]:group-hover:h-[622px] min-[1130px]:group-hover:h-[640px]`}>
<div
className={`w-screen transition-all flex justify-center items-center min-[1130px]:absolute min-[1130px]:left-1/2 min-[1130px]:top-[calc(100%+1px)] box-border min-[1130px]:-translate-x-1/2 min-[1130px]:shadow-md group-hover:border-b border-b-[#02c2ab] bg-white h-0 ${
isTabOpen && "max-[1130px]:h-auto max-[1130px]:py-5"
} overflow-hidden min-[1190px]:group-hover:h-[622px] min-[1130px]:group-hover:h-[640px]`}
>
{/* Start Inner Container */}
<div className='max-w-[1400px] text-start gap-3 w-full justify-start flex items-start pt-10 transition-all px-4 box-border max-[1130px]:flex-col h-full'>
<div className="max-w-[1400px] text-start gap-3 w-full justify-start flex items-start pt-10 transition-all px-4 box-border max-[1130px]:flex-col h-full">
<div className="w-4/5 max-[1130px]:w-full">
{/* Start Tab One */}
<Link to={data.tab1.path} className="w-full min-h-[240px] group/learn max-[1130px]:w-[90%] max-[1130px]:mx-[5%] box-border hover:shadow-md hover:border-2 transition-all px-12 flex justify-between items-center bg-[#02c2ab]/40 border border-[#02c2ab] rounded-xl gap-2" onClick={closeTab}>
<span className='flex flex-col items-start gap-2 pt-4'>
<span className='font-bold'>{data.tab1.title}</span>
<span className=''>{data.tab1.description}</span>
<span className='max-[1130px]:mb-5 flex justify-center items-center group-hover/learn:ml-5 group-hover/learn:text-[#02c2ab] transition-all font-light mt-2'>Learn More <span className='text-lg box-border pt-1'><MdArrowRight /></span></span>
<Link
to={data.tab1.path}
className="w-full min-h-[240px] group/learn max-[1130px]:w-[90%] max-[1130px]:mx-[5%] box-border hover:shadow-md hover:border-2 transition-all px-12 flex justify-between items-center bg-[#02c2ab]/40 border border-[#02c2ab] rounded-xl gap-2"
onClick={closeTab}
>
<span className="flex flex-col items-start gap-2 pt-4">
<span className="font-bold">{data.tab1.title}</span>
<span className="">{data.tab1.description}</span>
<span className="max-[1130px]:mb-5 flex justify-center items-center group-hover/learn:ml-5 group-hover/learn:text-[#02c2ab] transition-all font-light mt-2">
Learn More{" "}
<span className="text-lg box-border pt-1">
<MdArrowRight />
</span>
</span>
</span>
<span className="text-[5rem] max-[1130px]:hidden inline-block max-w-[25%] ">
{data.tab1.Icon}
</span>
<span className="text-[5rem] max-[1130px]:hidden inline-block max-w-[25%] ">{data.tab1.Icon}</span>
</Link>
{/* End Tab One */}
{/* Start Other Tabs One */}
<div className="max-w-[1400px] text-start gap-3 w-full justify-start flex items-start pt-10 transition-all px-4 box-border max-[1130px]:flex-col h-full">
{data.cat.map((cat, catIndex) => (
<div className="flex-grow flex flex-col gap-6 max-[1150px]:pl-5" key={catIndex}>
<h1 className="font-bold text-[#02c2ab] text-lg">{cat.title}</h1>
<div
className="flex-grow flex flex-col gap-6 max-[1150px]:pl-5"
key={catIndex}
>
<h1 className="font-bold text-[#02c2ab] text-lg">
{cat.title}
</h1>
<div className="flex flex-col justify-start w-full text-start ">
{cat.links.map((link, linkIndex) => (
<SubNavbarLink_V2 key={linkIndex} title={link.title} path={link.path} Icon={link.Icon} clear={closeTab} />
<SubNavbarLink_V2
key={linkIndex}
title={link.title}
path={link.path}
Icon={link.Icon}
clear={closeTab}
/>
))}
</div>
</div>
))}
</div>
{/* End Other Tabs One */}
</div>

<div className="flex flex-col w-1/2 max-[1130px]:w-full">
{/* Start Tab Two */}
<Link to={data.tab2.path} className="min-h-[240px] w-full group/learn max-[1130px]:w-[90%] border-dashed hover:border-solid max-[1130px]:mx-[5%] box-border hover:shadow-md px-12 flex group/learn justify-center items-center rounded-xl gap-2 transition-all border border-gray-200 hover:border-[#02c2ab] hover:border-2" onClick={closeTab}>
<span className='flex flex-col items-start gap-2 pt-4 '>
<span className='font-bold'>{data.tab2.title}</span>
<span className=''>{data.tab2.description}</span>
<span className='max-[1130px]:mb-5 flex justify-center items-center group-hover/learn:ml-5 group-hover/learn:text-[#02c2ab] transition-all font-light mt-2'>Learn More <span className='text-lg box-border pt-1'><MdArrowRight /></span></span>
<Link
to={data.tab2.path}
className="min-h-[240px] w-full group/learn max-[1130px]:w-[90%] border-dashed hover:border-solid max-[1130px]:mx-[5%] box-border hover:shadow-md px-12 flex group/learn justify-center items-center rounded-xl gap-2 transition-all border border-gray-200 hover:border-[#02c2ab] hover:border-2"
onClick={closeTab}
>
<span className="flex flex-col items-start gap-2 pt-4 ">
<span className="font-bold">{data.tab2.title}</span>
<span className="">{data.tab2.description}</span>
<span className="max-[1130px]:mb-5 flex justify-center items-center group-hover/learn:ml-5 group-hover/learn:text-[#02c2ab] transition-all font-light mt-2">
Learn More{" "}
<span className="text-lg box-border pt-1">
<MdArrowRight />
</span>
</span>
</span>
<span className="text-[5rem] max-[1130px]:hidden inline-block max-w-[25%]">
{data.tab2.Icon}
</span>
<span className="text-[5rem] max-[1130px]:hidden inline-block max-w-[25%]">{data.tab2.Icon}</span>
</Link>
{/* End Tab Two */}

{/* Start Other Tabs Two */}
<div className={`flex flex-col max-[1130px]:w-[90%] max-[1130px]:mx-[5%] max-[1130px]:my-5 gap-4`}>
<div className={`text-black font-bold text-lg min-[1130px]:hidden ${!data.moreLinks2.title && 'hidden'}`}> - {data.moreLinks2.title}: </div>
<div className="flex flex-col flex-wrap ml-12 gap-5 mt-4">
{data.moreLinks2.links.map((link, index) => (
<SubNavbarLink title={link.title} Icon={link.Icon} path={link.path} clear={closeTab} key={index} className='!justify-start scale-125'/>
))}
<div
className={`flex flex-col max-[1130px]:w-[90%] max-[1130px]:mx-[5%] max-[1130px]:my-5 gap-4`}
>
<div
className={`text-black font-bold text-lg min-[1130px]:hidden ${
!data.moreLinks2.title && "hidden"
}`}
>
{" "}
- {data.moreLinks2.title}:{" "}
</div>

<div className="flex gap-2 pt-2 -sm:flex-wrap ">
<div className="flex flex-col w-full flex-wrap ml-12 gap-5 mt-4">
{data.moreLinks2.links.map((link, index) => (
<SubNavbarLink
title={link.title}
Icon={link.Icon}
path={link.path}
clear={closeTab}
key={index}
className="!justify-start scale-125"
/>
))}
</div>
{/* ai internal Audit Nav Component */}
<Link to="/ai-chatbot" className="w-full flex justify-center items-center">
<div className="min-h-[240px] group/learn max-[1130px]:w-[90%] max-[1130px]:mx-[5%] box-border hover:shadow-md hover:border-2 transition-all px-12 flex justify-between items-center bg-[#02c2ab]/40 border border-[#02c2ab] rounded-xl gap-2">
<div className="flex flex-col gap-2">
<div>
<img src={AiInternalAuditIMG} alt="AI Internal Audit" />
</div>
<div>
<span className="font-bold">Ai Internal Audit</span>
</div>
</div>
</div>
</Link>
</div>
</div>
{/* End Other Tabs Two */}
Expand All @@ -78,7 +153,7 @@ const Dropdown_V2 = ({ isTabOpen, toggleTab, closeTab, data }) => {
</div>
</div>
);
}
};

Dropdown_V2.propTypes = {
toggleTab: PropTypes.func.isRequired,
Expand All @@ -93,12 +168,12 @@ Dropdown_V2.propTypes = {
PropTypes.shape({
Icon: PropTypes.element.isRequired,
title: PropTypes.string.isRequired,
path: PropTypes.string.isRequired
path: PropTypes.string.isRequired,
}).isRequired
).isRequired
).isRequired,
}).isRequired
).isRequired,
})
}),
};

export default Dropdown_V2;
10 changes: 5 additions & 5 deletions src/Components/Navbar/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ const servicesTabData = {
Icon: IoSearchSharp,
path: "service/internal-audit",
},
{
title: "Ai Internal Audit",
Icon: FaRobot,
path: "ai-chatbot",
},
// {
// title: "Ai Internal Audit",
// Icon: FaRobot,
// path: "ai-chatbot",
// },
{
title: "Compliance",
Icon: IoShieldCheckmarkOutline,
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Teams.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import charlene from "/assets/Teams/charlene.png";

export default function Teams() {
const dataTeam = [
// { id: 1, photo: Elvis, userName: "Elvis Shoko" },
{ id: 1, photo: Elvis, userName: "Elvis Shoko" },
{ id: 2, photo: Josly, userName: "Josly Jose", Class: "pt-1" },
{ id: 3, photo: seyit, userName: "Seyit A. Colak" },
{ id: 4, photo: Marko, userName: "Marko Peric" },
// { id: 4, photo: Marko, userName: "Marko Peric" },
{ id: 5, photo: Harsh, userName: "Harsh Parmar" },
{ id: 6, photo: Luana, userName: "Luana Izzicupo", Class: "" },
{ id: 7, photo: FLORENCE, userName: "Florence Adedigba" },
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Ui/card-hover-effect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const Card = ({
return (
<div
className={cn(
"rounded-2xl h-full w-full p-2 overflow-hidden bg-[#02c2ab] border border-transparent dark:border-white/[0.6] group-hover:border-slate-700 relative z-20",
"rounded-2xl h-full w-full p-2 overflow-hidden bg-[#02c2ac81] border border-transparent dark:border-white/[0.6] group-hover:border-slate-700 relative z-20",
className
)}
>
Expand Down
Loading

0 comments on commit 5df3e9c

Please sign in to comment.