Skip to content

Commit

Permalink
Merge branch 'main' into course
Browse files Browse the repository at this point in the history
  • Loading branch information
panwar8279 authored Jun 13, 2024
2 parents ff5cd0a + 988982f commit 271b956
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 53 deletions.
2 changes: 1 addition & 1 deletion frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

gtag('config', 'G-6WS166VH7E');
</script>
<title>DEVLAPS</title>
<title>DEVLABS</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
51 changes: 51 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ import Review from "./Component/Review";
import AOS from "aos";
import "aos/dist/aos.css";


import Review from "./Component/Review.js";


import Review from "./Component/Review";

import AOS from "aos";
import "aos/dist/aos.css";
import { Toaster } from "react-hot-toast";

import ScrollToTop from "./Component/ScrollToTop";
Expand All @@ -32,6 +40,44 @@ import Extension from "./pages/Extension";
import UI from "./pages/UI";
import FrontendTools from "./pages/FrontendTools";
import EthicalHacking from "./pages/EthicalHacking";
import CodingPlateform from "./pages/CodingPlatform.jsx";
import CourcesPlatform from "./pages/CoursesPlatform.jsx";


import Faq from "./Component/Faq";

function App() {
const [searchQuery, setSearchQuery] = useState("");
AOS.init();

return (
<>
<ScrollToTop />
<Navbar setSearchQuery={setSearchQuery} />
<Routes>
<Route path='/' element={<Home searchQuery={searchQuery} />}></Route>
<Route path='/bookmark' element={<BookMark />}></Route>
<Route path='/about' element={<About />}></Route>
<Route path='/open-source' element={<OpenSource />}></Route>
<Route path='/review' element={<Review />} />
<Route path='*' element={<NotFound />} /> {/* 404 route */}
<Route path="/faq" element={<Faq />}></Route>

<Route path="/remote-jobs" element={<RemoteJobs />}></Route>
<Route path="/ai" element={<AI />}></Route>
<Route path="/movies-series" element={<Movie />}></Route>
<Route path="/extension" element={<Extension />}></Route>
<Route path="/ui-design" element={<UI />}></Route>
<Route path="/front-end-tools" element={<FrontendTools />}></Route>
<Route path="/ethical-hacking" element={<EthicalHacking />}></Route>
<Route path="/coding-platform" element={<CodingPlateform />}></Route>
<Route path="/cources-platform" element={<CourcesPlatform />}></Route>
</Routes>
<BackToTopButton />
<Toaster />
<ChatAssistant /> <Footer />
</>

import CoursesPlatform from "./pages/CoursesPlatform";
import Productivity from "./pages/Productivity";
import Collaboration from "./pages/Collaboration";
Expand All @@ -40,6 +86,10 @@ import CodingPlatform from "./pages/CodingPlateform";
import "aos/dist/aos.css";

function App() {

import CodingPlateform from "./pages/CodingPlateform";

function App() {
const [searchQuery, setSearchQuery] = useState("");
AOS.init();
return (
Expand Down Expand Up @@ -72,6 +122,7 @@ function App() {
<Footer />
<ChatAssistant />
</>

);
}

Expand Down
19 changes: 18 additions & 1 deletion frontend/src/ChatAssistant/ChatAssistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,25 @@ const ChatAssistant = () => {
};

return (
<div className='chatbot'>

<img
className='Logo'
src={chatbotLogo}
alt='Logo'
onClick={toggleChatbot}
onMouseEnter={() => (document.querySelector(".Logo").src = chatbotLogo1)}
onMouseLeave={() => (document.querySelector(".Logo").src = chatbotLogo)}
/>

{/* {!isOpen && ( // Conditionally render the logo if the chatbot is closed
<div className='chatbot'>l
{!isOpen && ( // Conditionally render the logo if the chatbot is closed
//{!isOpen && (
<img
className='Logo'
src={logoSrc}
Expand All @@ -31,7 +48,7 @@ const ChatAssistant = () => {
onMouseEnter={() => setLogoSrc(chatbotLogo1)}
onMouseLeave={() => setLogoSrc(chatbotLogo)}
/>
)}
)} */}
{isOpen && (
<div className={`chatbot-wrapper ${isOpen ? 'chatbot-animation' : 'chatbot-close-animation'}`}>
<button className='close-button' onClick={closeChatbot}>
Expand Down
21 changes: 19 additions & 2 deletions frontend/src/Component/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function About() {
const [contributors, setContributors] = useState([]);
const [founder, setFounder] = useState({});
const [currentPage, setCurrentPage] = useState(1);
const [searchQuery, setSearchQuery] = useState("");
const repoOwner = "HimanshuNarware";
const repoName = "Devlabs";

Expand Down Expand Up @@ -43,10 +44,16 @@ function About() {
fetchContributors();
}, []);

//filtering out
const filteredContributors = contributors.filter((contributor) =>
contributor.login.toLowerCase().includes(searchQuery.toLowerCase())
);

const paginationValues = getPaginationData(
currentPage,
CARDS_PER_PAGE,
contributors
// contributors
filteredContributors
);
const { lastCardIndex, firstCardIndex, allPagesNumbers, currentPageData } =
paginationValues;
Expand Down Expand Up @@ -135,6 +142,16 @@ function About() {
</div>
</div>
<h1 id="contributors">Our Contributors</h1>

{/* input bar */}
<input
type="text"
className="searchbar-contributors"
placeholder="Search your name here..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
/>

<div className="grid-container">
{currentPageData?.map((contributor) => {
return (
Expand Down Expand Up @@ -164,7 +181,7 @@ function About() {
<Pagination
firstCardIndex={firstCardIndex}
lastCardIndex={lastCardIndex}
dataLength={contributors.length}
dataLength={filteredContributors.length}
allPagesNumbers={allPagesNumbers}
currentPage={currentPage}
scrollPosition={"contributors"}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Component/BookMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function BookMark() {
return (
<div className="containerBK">
<div className="container-bk">
{currentBookmarks.length > 0 ? (
currentBookmarks.map((data, index) => (
{currentBookmarks?.length > 0 ? (
currentBookmarks?.map((data, index) => (
<div className="box-bk" key={index}>
<img className="logo" src={data.image} alt={data.name} />
<h2>{data.name}</h2>
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/Component/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from "react";
import logo from "../image/logo.png";
import "../style/Footer.css";

import { FaGithubSquare, FaTwitter } from "react-icons/fa";
import { BsLinkedin } from "react-icons/bs";

import { FaGithubSquare, FaLinkedin, FaTwitter } from "react-icons/fa";
import { SiGmail } from "react-icons/si";
Expand All @@ -19,6 +21,7 @@ function Footer() {
</a>
<h5>
Facing an issue or just <br />

enjoying the site?

</h5>
Expand All @@ -36,7 +39,6 @@ function Footer() {
<h5>
Facing an issue or just <br />
enjoying the site?{" "}

</h5>
<button>
<Link to="/review">Tell us now</Link>
Expand Down Expand Up @@ -80,6 +82,7 @@ function Footer() {
<li className='nav-item'>
<a href='https://www.devlabsstore.tech/open-source'>Open Source</a>


</li>
</ul>
</div>
Expand Down Expand Up @@ -107,6 +110,7 @@ function Footer() {
UI Design
</a>
</li>

<li className='nav-item'>
<a href='/remote-jobs'>Remote Jobs</a>
</li>
Expand Down Expand Up @@ -141,7 +145,9 @@ function Footer() {

<a href="/courses-platform">Course Platforms</a>
<Link className="" to="/courses-platform">

<a className="" href="/course-platform">

Course Platforms
</a>
</Link>
Expand All @@ -164,6 +170,7 @@ function Footer() {
</div>
</div>
</div>

<div className="Last-footer">
<div className="container">
<div className="row justify-content-center">
Expand Down
9 changes: 8 additions & 1 deletion frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ import "react-toastify/dist/ReactToastify.css";
import App from "./App";
import { BrowserRouter } from "react-router-dom";

// Ensure BrowserRouter is imported here



import Preloader from "./Component/Preloader";


const root = ReactDOM.createRoot(document.getElementById("root"));

const options = {
Expand All @@ -32,9 +36,12 @@ const darkmode = new Darkmode(options);
darkmode.showWidget();

root.render(
<Provider store={store}>
<Provider store={store}>p
<BrowserRouter> {/* Ensure BrowserRouter is only here */}
<App />
<BrowserRouter>
<App />

<ToastContainer />
</BrowserRouter>
</Provider>
Expand Down
Loading

0 comments on commit 271b956

Please sign in to comment.