From 742457376019646e093eee5fe0890f57e4bb9382 Mon Sep 17 00:00:00 2001 From: Ajay-Dhangar Date: Thu, 12 Sep 2024 20:16:21 +0530 Subject: [PATCH 1/8] new update --- docusaurus.config.js | 5 ++-- src/components/popup/popup.tsx | 14 ++++++++++ src/components/popup/style.module.css | 38 +++++++++++++++++++++++++++ src/css/custom.css | 24 ++++++++++------- src/pages/contact/Contact.module.css | 17 +++++++----- src/pages/contact/index.tsx | 14 +++++----- src/pages/popup/popup.module.css | 28 -------------------- src/pages/popup/popup.tsx | 10 ------- src/sw.js | 2 +- 9 files changed, 87 insertions(+), 65 deletions(-) create mode 100644 src/components/popup/popup.tsx create mode 100644 src/components/popup/style.module.css delete mode 100644 src/pages/popup/popup.module.css delete mode 100644 src/pages/popup/popup.tsx diff --git a/docusaurus.config.js b/docusaurus.config.js index 0b88baca6..8964f2c3f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -83,10 +83,11 @@ const config = { announcementBar: { id: "announcementBar", content: - 'πŸ”— Check out our latest post: Docusaurus 3.5 Released! Like, comment, and share! πŸš€', + '🐐 Check out our latest project Goat Farming! Learn more about sustainable farming practices. 🌱', isCloseable: true, - backgroundColor: "var(--ifm-color-primary)", + backgroundColor: "#4d5061", }, + metadata: [ { diff --git a/src/components/popup/popup.tsx b/src/components/popup/popup.tsx new file mode 100644 index 000000000..d7d265e12 --- /dev/null +++ b/src/components/popup/popup.tsx @@ -0,0 +1,14 @@ +import React from "react"; +import styles from "./style.module.css"; + +const Popup = ({ status, message }) => { + return ( +
+

+ {status} + {message} +

+
+ ); +}; +export default Popup; \ No newline at end of file diff --git a/src/components/popup/style.module.css b/src/components/popup/style.module.css new file mode 100644 index 000000000..972797df0 --- /dev/null +++ b/src/components/popup/style.module.css @@ -0,0 +1,38 @@ +.popup_message { + position: fixed; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + top: 15%; + z-index: 1; +} +.popup_message .success, +.popup_message .error { + padding: 1rem 3rem; + font-family: monospace; + font-weight: 600; + border-radius: 0.6rem; + font-size: 0.8rem; +} +.popup_message .success { + background: rgba(6, 235, 6, 0.749); + color: #fff; +} +.popup_message .error { + background: rgba(235, 6, 6, 0.749); + color: #fff; + padding: 1rem 2.5rem; +} + +.popup_message p{ + font-family: monospace; + font-weight: 600; + +} + +.popup_message span { + position: relative; + top: 0.2rem; + margin-right: 0.3rem; +} diff --git a/src/css/custom.css b/src/css/custom.css index 899819f4a..5dd1185cb 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -32,6 +32,7 @@ --ifm-bg-color: #f8f9fa; --image-filter:invert(0); --site-color-svg-icon-favorite: #ff1100cb; + --ifm-text-color: #000; } [data-theme="dark"] { @@ -48,6 +49,7 @@ --ifm-bg-color: #1a202c; --image-filter:invert(1); --site-color-svg-icon-favorite: #ff9100e5; + --ifm-text-color: #fff; } .header-github-link::before { @@ -69,7 +71,6 @@ } div[class^="announcementBar_"] { - background: #06e06fb4; color: #fff; border-bottom: 1.8px dotted rgb(37, 184, 11); font-weight: bold; @@ -84,15 +85,16 @@ div[class^="announcementBar_"] { div[class^="announcementBar_"] a { font-size: 1.2em; padding: 1px 4px; - background: linear-gradient( + /* background: linear-gradient( 90deg, rgb(252 176 69 / 100%) 0%, rgb(253 29 29 / 100%) 50%, - rgb(131 58 180 / 100%) 100% + rgb(229, 223, 232) 100% ); background-clip: text; - -webkit-text-fill-color: transparent; - text-shadow: 0 0 1px #fff, 0 0 2px #fff, 0 0 2px #ff00de, 0 0 1px #ff00de; + -webkit-text-fill-color: transparent; */ + text-decoration: none; + color: #48df84; } div[class^="announcementBar_"] a:hover { @@ -100,8 +102,8 @@ div[class^="announcementBar_"] a:hover { padding: 1px 4px; background: linear-gradient( 90deg, - rgb(131 58 180 / 100%) 0%, - rgb(253 29 29 / 100%) 50%, + rgb(235, 244, 243) 0%, + #7ab3c8 50%, rgb(252 176 69 / 100%) 100% ); background-clip: text; @@ -111,14 +113,16 @@ div[class^="announcementBar_"] a:hover { [data-theme="dark"] div[class^="announcementBar_"] a { font-size: 1.2em; padding: 1px 4px; - background: linear-gradient( + /* background: linear-gradient( 90deg, rgb(131 58 180 / 100%) 0%, rgb(253 29 29 / 100%) 50%, rgb(252 176 69 / 100%) 100% ); background-clip: text; - -webkit-text-fill-color: transparent; + -webkit-text-fill-color: transparent; */ + text-decoration: none; + color: #48df84; } [data-theme="dark"] div[class^="announcementBar_"] a:hover { @@ -128,7 +132,7 @@ div[class^="announcementBar_"] a:hover { 90deg, rgb(252 176 69 / 100%) 0%, rgb(253 29 29 / 100%) 50%, - rgb(131 58 180 / 100%) 100% + rgb(220, 203, 232) 100% ); background-clip: text; -webkit-text-fill-color: transparent; diff --git a/src/pages/contact/Contact.module.css b/src/pages/contact/Contact.module.css index c0fda8a24..5c0d56daf 100644 --- a/src/pages/contact/Contact.module.css +++ b/src/pages/contact/Contact.module.css @@ -76,7 +76,7 @@ } .contact_info .icon .fill_current { - fill: #816bd1; + fill: var(--ifm-color-primary); } .contact_info .contact_info_item .location_heading, .contact_info .contact_info_item .help_heading { @@ -122,10 +122,13 @@ padding: 0.5rem; border: 1px solid #ccc; border-radius: 5px; + background: transparent; + color: var(--ifm-text-color); } .main__contact_contains_right .form_container .form_group .phone_input { - background-color: transparent; + background-color: transparent; + color: var(--ifm-text-color); } .main__contact_contains_right .form_container .form_group .form_select { @@ -140,6 +143,8 @@ padding: 0.5rem; border: 1px solid #ccc; border-radius: 5px; + background: transparent; + color: var(--ifm-text-color); } .main__contact_contains_right .form_container .form_group .form_button { @@ -147,7 +152,7 @@ padding: 0.5rem; border: none; border-radius: 5px; - background-color: #816bd1; + background-color: var(--ifm-color-primary); color: #fff; font-size: 1rem; font-weight: 600; @@ -155,7 +160,7 @@ } .main__contact_contains_right .form_container .form_group .form_button:hover{ - background-color: #816bd1b5; + background-color: var(--ifm-color-primary-dark); } @media screen and (max-width: 768px) { @@ -169,7 +174,7 @@ } .social_media_icons{ - color: #816bd1 !important; + color: var(--ifm-color-primary) !important; font-size: 34px; display: flex; flex-direction: row; @@ -181,7 +186,7 @@ .social_media_icons a{ list-style: none; - color: #816bd1 !important; + color: var(--ifm-color-primary) !important; } .social_media_heading{ diff --git a/src/pages/contact/index.tsx b/src/pages/contact/index.tsx index 25d7d8398..6020d3eeb 100644 --- a/src/pages/contact/index.tsx +++ b/src/pages/contact/index.tsx @@ -6,7 +6,7 @@ import PhoneInput from "react-phone-input-2"; import "react-phone-input-2/lib/style.css"; import { FaYoutube, FaDiscord, FaLinkedin } from "react-icons/fa"; import { FaXTwitter } from "react-icons/fa6"; -import Popup from "../popup/popup"; +import Popup from "../../components/popup/popup"; import axios from 'axios' // import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; import { log } from "console"; @@ -77,7 +77,7 @@ export default function Contact(): JSX.Element { }, { headers: { - "Content-Type": "application/json", // Ensuring JSON format + "Content-Type": "application/json", }, } ); @@ -90,9 +90,8 @@ export default function Contact(): JSX.Element { message: "", feedbackType: "Question", otherFeedback: "", - }); - - // Handling response based on the server's reply + }); + if (response.data.ok) { setChecker((prev) => ({ ...prev, @@ -110,7 +109,6 @@ export default function Contact(): JSX.Element { } } catch (error) { console.error("Error submitting the form:", error); - // Set error state if request fails setChecker((prev) => ({ ...prev, popup: true, @@ -237,7 +235,7 @@ export default function Contact(): JSX.Element {
How Can We Help?

- ajaydhyangar49@gmail.com + codeharborhub@gmail.com

@@ -339,7 +337,7 @@ export default function Contact(): JSX.Element { name="feedbackType" value={formValues.feedbackType} onChange={handleInputChange} - className={styles.form_select} + className={styles.form_select} required > diff --git a/src/pages/popup/popup.module.css b/src/pages/popup/popup.module.css deleted file mode 100644 index 4156f84a9..000000000 --- a/src/pages/popup/popup.module.css +++ /dev/null @@ -1,28 +0,0 @@ -.popup_message{ - position:fixed; - width:100%; - display:flex; - justify-content: center; - align-items: center; - top:15%; - z-index:1; -} -.popup_message .success,.popup_message .error{ - padding: 1rem 3rem; - font-family: monospace; - font-weight: 600; - border-radius:0.6rem; - font-size: 0.8rem; -} -.popup_message .success{ - background: rgb(60 189 60); -} -.popup_message .error{ - background:rgb(237 39 39); -} -.popup_message span{ - font-size:1.5rem; - position:relative; - top:0.2rem; - margin-right: 0.3rem; -} \ No newline at end of file diff --git a/src/pages/popup/popup.tsx b/src/pages/popup/popup.tsx deleted file mode 100644 index 067fc147c..000000000 --- a/src/pages/popup/popup.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react' -import styles from "./popup.module.css" -const Popup=({status,message})=>{ - return( -
-

{status}{message}

-
- ) -} -export default Popup \ No newline at end of file diff --git a/src/sw.js b/src/sw.js index 0dff9c8f6..815cbc95a 100644 --- a/src/sw.js +++ b/src/sw.js @@ -3,7 +3,7 @@ import {StaleWhileRevalidate} from 'workbox-strategies'; export default function swCustom(params) { if (params.debug) { - console.log('[CodeMastermindHQ-PWA][SW]: running swCustom code', params); + console.log('[CodeHarborHub-PWA][SW]: running swCustom code', params); } // Cache responses from external resources From aa8c8f9203e1f96a7225365b91b298e69179a7b8 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 12 Sep 2024 14:47:24 +0000 Subject: [PATCH 2/8] Restyled by clang-format --- docusaurus.config.js | 871 ++++++++++++++++++++++--------------------- 1 file changed, 437 insertions(+), 434 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 8964f2c3f..897706345 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,5 +1,5 @@ -import { default as npm2yarn } from "@docusaurus/remark-plugin-npm2yarn"; -import { themes as prismThemes } from "prism-react-renderer"; +import {default as npm2yarn} from "@docusaurus/remark-plugin-npm2yarn"; +import {themes as prismThemes} from "prism-react-renderer"; const remarkMath = require("remark-math"); const rehypeKatex = require("rehype-katex"); @@ -9,135 +9,134 @@ require("dotenv").config(); /** @type {import('@docusaurus/types').Config} */ const config = { - title: "CodeHarborHub", - tagline: "A place to learn and grow", - favicon: "img/favicon_io/favicon.ico", - url: process.env.URL || "https://codeharborhub.github.io/", - baseUrl: "/", - customFields: { - admin: "Ajay Dhangar", - superman: "Shivay", - serviceId: process.env.EMAILJS_SERVICE_ID, - templateId: process.env.EMAILJS_TEMPLATE_ID, - userId: process.env.EMAILJS_USER_ID, - emailService: process.env.EMAIL_SERVICE, + title : "CodeHarborHub", + tagline : "A place to learn and grow", + favicon : "img/favicon_io/favicon.ico", + url : process.env.URL || "https://codeharborhub.github.io/", + baseUrl : "/", + customFields : { + admin : "Ajay Dhangar", + superman : "Shivay", + serviceId : process.env.EMAILJS_SERVICE_ID, + templateId : process.env.EMAILJS_TEMPLATE_ID, + userId : process.env.EMAILJS_USER_ID, + emailService : process.env.EMAIL_SERVICE, }, - organizationName: "codeharborhub", - projectName: "codeharborhub.github.io", + organizationName : "codeharborhub", + projectName : "codeharborhub.github.io", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", + onBrokenLinks : "throw", + onBrokenMarkdownLinks : "warn", - presets: [ + presets : [ [ "@docusaurus/preset-classic", /** @type {import('@docusaurus/preset-classic').Options} */ ({ - debug: true, - docs: { - path: "docs", - sidebarPath: "sidebars.js", - numberPrefixParser: false, - showLastUpdateAuthor: true, - showLastUpdateTime: true, - admonitions: { - keywords: ["my-custom-admonition"], - extendDefaults: true, + debug : true, + docs : { + path : "docs", + sidebarPath : "sidebars.js", + numberPrefixParser : false, + showLastUpdateAuthor : true, + showLastUpdateTime : true, + admonitions : { + keywords : [ "my-custom-admonition" ], + extendDefaults : true, }, - editUrl: - "https://github.com/codeharborhub/codeharborhub.github.io/edit/main/", - remarkPlugins: [remarkMath], - rehypePlugins: [rehypeKatex], + editUrl : + "https://github.com/codeharborhub/codeharborhub.github.io/edit/main/", + remarkPlugins : [ remarkMath ], + rehypePlugins : [ rehypeKatex ], }, - pages: { - remarkPlugins: [npm2yarn], + pages : { + remarkPlugins : [ npm2yarn ], }, - blog: { - showReadingTime: true, - editUrl: - "https://github.com/codeharborhub/codeharborhub.github.io/edit/main/", - remarkPlugins: [[npm2yarn, { converters: ["pnpm"] }]], + blog : { + showReadingTime : true, + editUrl : + "https://github.com/codeharborhub/codeharborhub.github.io/edit/main/", + remarkPlugins : [ [ npm2yarn, {converters : [ "pnpm" ]} ] ], }, - theme: { - customCss: "./src/css/custom.css", + theme : { + customCss : "./src/css/custom.css", }, }), ], ], - stylesheets: [ + stylesheets : [ { - href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css", - type: "text/css", - integrity: - "sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM", - crossorigin: "anonymous", + href : "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css", + type : "text/css", + integrity : + "sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM", + crossorigin : "anonymous", }, ], - themeConfig: - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ - ({ - image: "img/nav-logo.jpg", - announcementBar: { - id: "announcementBar", - content: - '🐐 Check out our latest project Goat Farming! Learn more about sustainable farming practices. 🌱', - isCloseable: true, - backgroundColor: "#4d5061", - }, - - - metadata: [ - { - name: "keywords", - content: - "CodeHarborHub, Docs, Tutorials, Courses, DSA, Problems, Solutions, Showcase, Community, Blog, Web Dev, Live Editor, Quiz, Tags, Donate, Careers, Team, GitHub, Products, LinkedIn, YouTube, Discord, Twitter, Privacy Policy, Terms of Service, Code of Conduct, Cookie Policy, Licensing, Web Development, React, JavaScript, Python, Java, Tailwind CSS, CPP, NextJs, MATLAB, Julia, HTML, CSS, TypeScript, DSA, Data Structures, Algorithms, Competitive Programming", - }, - { name: "twitter:card", content: "summary_large_image" }, - { name: "twitter:site", content: "@CodesWithAjay" }, - { name: "twitter:creator", content: "@CodesWithAjay" }, - { property: "og:type", content: "website" }, - { property: "og:site_name", content: "CodeHarborHub" }, - { - property: "og:title", - content: "CodeHarborHub - A place to learn and grow", - }, - { - property: "og:description", - content: - "CodeHarborHub is a place to learn and grow. We provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals.", - }, - { - property: "og:image", - content: "https://codeharborhub.github.io/img/nav-logo.jpg", + themeConfig : + /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ + ({ + image : "img/nav-logo.jpg", + announcementBar : { + id : "announcementBar", + content : + '🐐 Check out our latest project Goat Farming! Learn more about sustainable farming practices. 🌱', + isCloseable : true, + backgroundColor : "#4d5061", }, - { property: "og:url", content: "https://codeharborhub.github.io" }, - ], - algolia: { - apiKey: "9a235effc3fe5f0b7b18245f309910c5", - indexName: "codeharborhubio", - appId: "ZF3MPCPQHR", - contextualSearch: false, - }, + metadata : [ + { + name : "keywords", + content : + "CodeHarborHub, Docs, Tutorials, Courses, DSA, Problems, Solutions, Showcase, Community, Blog, Web Dev, Live Editor, Quiz, Tags, Donate, Careers, Team, GitHub, Products, LinkedIn, YouTube, Discord, Twitter, Privacy Policy, Terms of Service, Code of Conduct, Cookie Policy, Licensing, Web Development, React, JavaScript, Python, Java, Tailwind CSS, CPP, NextJs, MATLAB, Julia, HTML, CSS, TypeScript, DSA, Data Structures, Algorithms, Competitive Programming", + }, + {name : "twitter:card", content : "summary_large_image"}, + {name : "twitter:site", content : "@CodesWithAjay"}, + {name : "twitter:creator", content : "@CodesWithAjay"}, + {property : "og:type", content : "website"}, + {property : "og:site_name", content : "CodeHarborHub"}, + { + property : "og:title", + content : "CodeHarborHub - A place to learn and grow", + }, + { + property : "og:description", + content : + "CodeHarborHub is a place to learn and grow. We provide accessible and comprehensive educational resources to learners of all levels, from beginners to advanced professionals.", + }, + { + property : "og:image", + content : "https://codeharborhub.github.io/img/nav-logo.jpg", + }, + {property : "og:url", content : "https://codeharborhub.github.io"}, + ], - navbar: { - title: "CodeHarborHub", - logo: { - alt: "CodeHarborHub Logo", - src: "img/nav-logo.jpg", + algolia : { + apiKey : "9a235effc3fe5f0b7b18245f309910c5", + indexName : "codeharborhubio", + appId : "ZF3MPCPQHR", + contextualSearch : false, }, - items: [ - { - type: "dropdown", - html: 'πŸ“š Docs', - position: "left", - items: [ - { - type: "html", - value: `