diff --git a/src/App.js b/src/App.js index 3c7eeeb..ac913af 100644 --- a/src/App.js +++ b/src/App.js @@ -8,6 +8,7 @@ import { RoboticsPage, GameDevelopment, ContactUsPage, + CodePlaygroundPage, } from "./pages"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { ToastContainer } from "react-toastify"; @@ -32,6 +33,7 @@ function App() { } } }, []); + return ( @@ -39,12 +41,10 @@ function App() { } /> } /> } /> - } - /> + } /> } /> } /> + } /> diff --git a/src/components/activities/ReadyToCode.jsx b/src/components/activities/ReadyToCode.jsx index 3eccf1c..3fc4476 100644 --- a/src/components/activities/ReadyToCode.jsx +++ b/src/components/activities/ReadyToCode.jsx @@ -1,90 +1,12 @@ -import React, { useState } from "react"; +import React from "react"; import { Link } from "react-router-dom"; -import Modal from "react-modal"; -import { FaAngleRight, FaCheck, FaExternalLinkAlt } from "react-icons/fa"; +import { FaAngleRight,} from "react-icons/fa"; import { starImage } from "../../assets/images"; -const CodePlayground = ({ isOpen, onClose }) => { - return ( - -
-
- - - - -
-

- Explore Code Playground -

-
-
- - - -

HTML: The Building Blocks of Websites

-
-
- - - -

CSS: Style Your Website Like a Pro

-
-
- - - -

JavaScript: Bring Your Website to Life

-
-
-

Description

-
-

- This Playground allows you to experiment with code without having to - set up your own development environment. You can write HTML code to - structure the content of your webpage, CSS code to style the - appearance of your webpage, and JavaScript code to add interactivity - to your webpage. The playground will then execute your code and - display the results in a preview pane. -

-
- -
-
-
- ); -}; - -const ReadyToCode = () => { - const [isLightboxOpen, setIsLightboxOpen] = useState(false); - const openLightbox = () => { - setIsLightboxOpen(true); - }; - const closeLightbox = () => { - setIsLightboxOpen(false); - }; +const ReadyToCode = () => { + return (
{

Click here to explore @@ -117,7 +38,6 @@ const ReadyToCode = () => {
-
); diff --git a/src/components/activities/code-playground/index.jsx b/src/components/activities/code-playground/index.jsx new file mode 100644 index 0000000..a13cf2f --- /dev/null +++ b/src/components/activities/code-playground/index.jsx @@ -0,0 +1,67 @@ +import React from "react"; +import { FaCheck, FaExternalLinkAlt } from "react-icons/fa"; + +const CodePlayground = () => { + return ( +
+
+ + Back + + + + +
+

+ Explore Code Playground +

+
+
+ + + +

HTML: The Building Blocks of Websites

+
+
+ + + +

CSS: Style Your Website Like a Pro

+
+
+ + + +

JavaScript: Bring Your Website to Life

+
+
+

Description

+
+

+ This Playground allows you to experiment with code without having to + set up your own development environment. You can write HTML code to + structure the content of your webpage, CSS code to style the appearance + of your webpage, and JavaScript code to add interactivity to your + webpage. The playground will then execute your code and display the + results in a preview pane. +

+
+ +
+
+ ); +}; + +export default CodePlayground; diff --git a/src/index.js b/src/index.js index 1d96eeb..0d75db3 100644 --- a/src/index.js +++ b/src/index.js @@ -5,13 +5,11 @@ import App from "./App"; import reportWebVitals from "./reportWebVitals"; import { BrowserRouter as Router } from "react-router-dom"; import ReactGA from "react-ga4"; -import Modal from "react-modal"; // Initialize Google Analytics ReactGA.initialize(process.env.REACT_APP_G_TAG_ID); -// Set the app element for react-modal -Modal.setAppElement('#root'); + const root = ReactDOM.createRoot(document.getElementById("root")); diff --git a/src/pages/code-playground/page.jsx b/src/pages/code-playground/page.jsx new file mode 100644 index 0000000..2bbc481 --- /dev/null +++ b/src/pages/code-playground/page.jsx @@ -0,0 +1,12 @@ +import React from "react"; +import { GlobalLayout } from "../../components"; +import CodePlayground from "../../components/activities/code-playground"; +const CodePlaygroundPage = () => { + return ( + + + + ); +}; + +export default CodePlaygroundPage; diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 3552cc8..cde1d97 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -5,6 +5,7 @@ import CodingPage from "./activities/coding/page"; import RoboticsPage from "./activities/robotics/page"; import GameDevelopment from "./activities/game-development/page"; import ContactUsPage from "./contact-us/page"; +import CodePlaygroundPage from "./code-playground/page"; export { HomePage, @@ -14,4 +15,5 @@ export { RoboticsPage, GameDevelopment, ContactUsPage, + CodePlaygroundPage }; diff --git a/src/utils/appData.js b/src/utils/appData.js index 76e4461..c89be45 100644 --- a/src/utils/appData.js +++ b/src/utils/appData.js @@ -33,6 +33,7 @@ export const navigationMenu = [ title: "Robotics", url: "/activities/robotics", }, + ], }, {