From 402cc14fc36a66edba7ea0a04c06e990a751580d Mon Sep 17 00:00:00 2001 From: riya-2206 Date: Wed, 5 Jun 2024 18:56:53 +0530 Subject: [PATCH 1/3] added react components for c4gt2024 page --- .gitignore | 1 + docusaurus.config.js | 22 ++- package-lock.json | 23 +++- package.json | 3 + src/components/C4GT2024Page.js | 68 ++++++++++ src/components/ProjectDescription.js | 84 ++++++++++++ src/components/SubDescription.js | 191 +++++++++++++++++++++++++++ src/css/custom.css | 24 ++++ src/pages/docs/2024/index.css | 79 +++++++++++ src/pages/docs/2024/index.js | 104 +++++++++++++++ src/pages/docs/2024/org/index.js | 153 +++++++++++++++++++++ src/pages/index.js | 1 + static/img/C4GT_Logo_Text.png | Bin 0 -> 21958 bytes static/img/link_icon.svg | 1 + 14 files changed, 747 insertions(+), 7 deletions(-) create mode 100644 src/components/C4GT2024Page.js create mode 100644 src/components/ProjectDescription.js create mode 100644 src/components/SubDescription.js create mode 100644 src/pages/docs/2024/index.css create mode 100644 src/pages/docs/2024/index.js create mode 100644 src/pages/docs/2024/org/index.js create mode 100644 static/img/C4GT_Logo_Text.png create mode 100644 static/img/link_icon.svg diff --git a/.gitignore b/.gitignore index 1beaf077f..9b98fff93 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ npm-shrinkwrap.json # Misc .DS_Store +.env .env.local .env.development.local .env.test.local diff --git a/docusaurus.config.js b/docusaurus.config.js index 2b3a7765b..378bf9c07 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,3 +1,4 @@ +require('dotenv').config() const lightCodeTheme = require('prism-react-renderer/themes/github'); const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const year = new Date().getFullYear(); @@ -14,10 +15,10 @@ module.exports = { projectName: "c4gt", themeConfig: { navbar: { - title: "Home", + // title: "DMP", logo: { - alt: "Home", - src: "img/logo.png", + alt: "DMP", + src: "img/C4GT_Logo_Text.png", }, items: [ { @@ -220,6 +221,17 @@ module.exports = { }, ], + }, + { + label: "2024", + position: "left", + to: "/docs/2024/", + items: [ + { + label: "VedantKhairnar", + to: "/docs/2024/org?id=VedantKhairnar", + }, + ] } ], }, @@ -285,4 +297,8 @@ module.exports = { }, ], ], + customFields: { + API_BASE_URL: process.env.API_BASE_URL, // Assuming you have REACT_APP_API_URL set in your environment + API_AUTH_KEY: process.env.API_AUTH_KEY, + }, }; diff --git a/package-lock.json b/package-lock.json index e755f63b2..7c2c2bb73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,9 @@ "react-scripts": "5.0.0", "url-loader": "^4.1.1", "yarn": "^1.22.19" + }, + "devDependencies": { + "dotenv": "^16.4.5" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -12193,11 +12196,15 @@ } }, "node_modules/dotenv": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", - "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, "node_modules/dotenv-expand": { @@ -24193,6 +24200,14 @@ } } }, + "node_modules/react-scripts/node_modules/dotenv": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", + "engines": { + "node": ">=10" + } + }, "node_modules/react-textarea-autosize": { "version": "8.5.3", "resolved": "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.5.3.tgz", diff --git a/package.json b/package.json index 215d9402b..422b268db 100644 --- a/package.json +++ b/package.json @@ -41,5 +41,8 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "devDependencies": { + "dotenv": "^16.4.5" } } diff --git a/src/components/C4GT2024Page.js b/src/components/C4GT2024Page.js new file mode 100644 index 000000000..e874fc4cd --- /dev/null +++ b/src/components/C4GT2024Page.js @@ -0,0 +1,68 @@ +import React from "react"; + +function C4GT2024Page() { + return ( +
+
+
+
+
+ +
+
+

C4GT'24

+
+

+ C4GT Mentoring Program has been conceptualized as a summer coding + program to create a close-knit community that can build and contribute + to global digital public goods. +

+
    +
  • + An opportunity for college students and working professionals in + India to experience the GovTech space +
  • +
  • Organized annually over 2 months (July-August)
  • +
  • + There will be a set of diverse and engaging GovTech problem + statements every year for the participants to work on +
  • +
  • + Shortlisted contributors will receive mentorship from leading + practitioners in GovTech ecosystem +
  • +
+

Thanks for being part of the community. 💚

+
+
+
+
+
+
+ ); +} + +export default C4GT2024Page; diff --git a/src/components/ProjectDescription.js b/src/components/ProjectDescription.js new file mode 100644 index 000000000..f610dedd1 --- /dev/null +++ b/src/components/ProjectDescription.js @@ -0,0 +1,84 @@ +import React, { useEffect, useState } from "react"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; + +function ProjectDescription({currentIssue, currentIssueData}) { + const { siteConfig } = useDocusaurusContext(); + const API_BASE_URL = siteConfig.customFields.API_BASE_URL; + const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + const [description,setDescription] = useState(null) + + useEffect(()=>{ + fetch(`${API_BASE_URL}/issues/${currentIssue}`, { + method: 'GET', + headers:{ + 'X-Secret-Key':API_AUTH_KEY, + } + }) + .then(response => { + return response.json(); + }) + .then(data => { + setDescription(()=>data) + }) + .catch(error => { + console.log("error",error.message); + }); +},[currentIssue]) + return ( +
+
+
+
+
+ +
+
+

{description?.name}

+
+

{description?.description} + {/* when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum */} +

+ {/*

Following are the list of Issues associated with the organization

+ {currentIssueData?.length!=0 &&
    + {currentIssueData?.map((d,i)=>{ + return
  • + + {d.name} + +
  • + })} + +
} */} +
+
+
+
+
+
+ ); +} + +export default ProjectDescription; diff --git a/src/components/SubDescription.js b/src/components/SubDescription.js new file mode 100644 index 000000000..4f0b49109 --- /dev/null +++ b/src/components/SubDescription.js @@ -0,0 +1,191 @@ +import React, { useEffect, useState } from "react"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; + +function SubProjectDescription({ selectedProject,issueNumber, currentIssue }) { + const [description, setDescription] = useState(null); + const { siteConfig } = useDocusaurusContext(); + const API_BASE_URL = siteConfig.customFields.API_BASE_URL; + const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + + useEffect(() => { + fetch( + `${API_BASE_URL}/issues/${currentIssue}/${issueNumber}`, + { + method: "GET", + headers: { + "X-Secret-Key": API_AUTH_KEY, + }, + }, + ) + .then((response) => { + return response.json(); + }) + .then((data) => { + setDescription(() => data); + }) + .catch((error) => { + console.log("error", error.message); + }); + }, [selectedProject]); + + const parseMarkdown = (markdown) => { + markdown = markdown.replace(/^### (.*$)/gim, "

$1

"); + markdown = markdown.replace(/^## (.*$)/gim, `

$1

`); + markdown = markdown.replace(/^# (.*$)/gim, `

$1

`); + + markdown = markdown.replace(/\*\*(.*)\*\*/gim, "$1"); + markdown = markdown.replace(/\*(.*)\*/gim, "$1"); + + markdown = markdown.replace( + /- \[ \] (.*$)/gim, + ' $1', + ); + markdown = markdown.replace( + /- \[x\] (.*$)/gim, + ' $1', + ); + + markdown = markdown.replace(/^\s*-\s+(.*$)/gim, "
  • $1
  • "); + markdown = markdown.replace(/(
  • .*<\/li>)/gim, ""); + + markdown = markdown.replace(/\r\n\r\n/g, ""); + markdown = markdown.replace(/(?:\r\n|\r|\n)/g, "
    "); + + // markdown = markdown.replace(/\n/gim, "
    "); + console.log(markdown) + + return markdown.trim(); + }; + + return ( +
    + {description && ( +
    +
    +
    +
    +
    +
    +

    {selectedProject}

    +
    +
    + + + +
    +
    + {description?.description && <>

    Overview

    +

    + {description?.description} +

    } +
    +
    + {description?.overall_progress != null && <>
    +
    {description?.overall_progress + "%"} +
    + + +
    + {/*
    {description?.overall_progress + "%"}
    */} + } + + {description?.contributor_name && + + + } + {description?.mentor_name.length!=0 && <> + + + + {description?.mentor_name.length > 1 && ( + <> + {description?.mentor_name?.map((d, i) => { + if (i != 0) { + return ( + + + + ); + } else return <>; + })} + + )}} + {description?.org_name && + + + } +
    Contributor Name + {description?.contributor_name} +
    + Mentor Name + + {description?.mentor_name[0]} +
    + {d} +
    Org Name + + {description?.org_name} + +
    +
    +
    +
    + {description?.weekly_goals_html &&
    } + {/* {parseMarkdown(description?.weekly_goals_html)} */} +
    +
    + {description?.weekly_learnings_html &&
    } +
    +

    Overall Project PR Table

    + + + + + + + + + + + {description?.pr_details?.map((tdata, i) => { + return ( + + + + + + + ); + })} + +
    WeekPR NameLinkStatus
    {tdata.week}{tdata.name} + {tdata.link} + {tdata.status}
    +
    +
    + )} +
    + ); +} + +export default SubProjectDescription; diff --git a/src/css/custom.css b/src/css/custom.css index 6bbb300c4..b88843c14 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -15,3 +15,27 @@ margin: 0 calc(-1 * var(--ifm-pre-padding)); padding: 0 var(--ifm-pre-padding); } + +.dropdown__link--active, .dropdown__link--active:hover { + color: #1c1e21; +} +.dropdown__link--active { + background-color: #ffffff; +} + +.progress-bar-container { + width: 100%; + background-color: #e0e0df; + border-radius: 25px; + overflow: hidden; + margin: 20px 0; +} + +.progress-bar { + height: 25px; + background-color: #7DF774; + text-align: center; + line-height: 25px; + color: #1c1e21; + border-radius: 25px 0 0 25px; +} diff --git a/src/pages/docs/2024/index.css b/src/pages/docs/2024/index.css new file mode 100644 index 000000000..6b5a1cf05 --- /dev/null +++ b/src/pages/docs/2024/index.css @@ -0,0 +1,79 @@ +.sidebar-container-2024{ + display: none; +} +.main-container{ +display: flex; +width: 100%; +} +.breadcrumbs-items{ +--ifm-breadcrumb-size-multiplier: 0.7 !important; +background: #f5f6f7; +margin-bottom: .4rem; +} +.table-container{ +max-height: calc(100vh - 5.75rem); +overflow-y: auto; +position: sticky; +top: calc(4.75rem); +} +.right-side-table{ +display: flex; +align-items: center; +flex-direction: column; +justify-content: center; +padding-right: 0; +} +.header-layout{ +width: 100%; +display: flex; +justify-content: space-between; +gap: 28px; +} +.h2-font{ +font-size: 32px; +} +@media screen and (max-width: 779px){ +.header-layout{ + flex-direction: column; +} +} +@media screen and (min-width: 997px) { +.sidebar-container-2024{ + display: block; + width: 300px; + margin-top: calc(-1* 3.75rem); + will-change: width; + clip-path: inset(0px); + border-right: 1px solid #dadde1; + transition: width 200ms ease; + } +.sidebar-styles{ + display: flex; + flex-direction: column; + height: 100%; + max-height: 100vh; + padding-top: 3.75rem; + position: sticky; + top: 0; + transition: opacity 50ms; + width: 300px; +} +.menu_styles{ + flex-grow: 1; + padding: .5rem; +} +.main-container{ + flex-grow: 1; + max-width: calc(100% - 300px); +} +.width{ + max-width: 75% !important; +} +.breadcrumbs-items{ + --ifm-breadcrumb-size-multiplier: 0.8; +} + +.right-side-table{ +padding-right: 0; +} +} \ No newline at end of file diff --git a/src/pages/docs/2024/index.js b/src/pages/docs/2024/index.js new file mode 100644 index 000000000..5416e5d3d --- /dev/null +++ b/src/pages/docs/2024/index.js @@ -0,0 +1,104 @@ +import React, { useEffect, useState } from "react"; +import Layout from "@theme/Layout"; +import C4GT2024Page from "../../../components/C4GT2024Page"; +import './index.css'; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +// import { useLocation, useParams } from 'react-router-dom'; + +function C4GT2024() { + const { siteConfig } = useDocusaurusContext(); + const [currentTab, setCurrentTab] = useState("c4gt"); + const [issueData,setIssueData] = useState(null) + const API_BASE_URL = siteConfig.customFields.API_BASE_URL; + const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + + useEffect(()=>{ + fetch(`${API_BASE_URL}/issues`, { + method: 'GET', + headers:{ + 'X-Secret-Key':API_AUTH_KEY, + } + }) + .then(response => { + return response.json(); + }) + .then(data => { + setIssueData(()=>data) + }) + .catch(error => { + console.log("error",error.message); + }); +},[]) + // const { search } = useLocation(); + // const params = useParams(); + + // useEffect(() => { + // window.location.reload(); + // const queryString = window.location.search; + // const urlParams = new URLSearchParams(queryString); + // const product = urlParams.get("id"); + // console.log(product) + // }, [search,params]); + + + return ( + +
    +
    + +
    + {currentTab == "c4gt" ? :<>} +
    +
    +
    +
    + ); +} +export default C4GT2024; diff --git a/src/pages/docs/2024/org/index.js b/src/pages/docs/2024/org/index.js new file mode 100644 index 000000000..dfa997901 --- /dev/null +++ b/src/pages/docs/2024/org/index.js @@ -0,0 +1,153 @@ +import React, { useEffect, useState } from "react"; +import Layout from "@theme/Layout"; +import ProjectDescription from "../../../../components/ProjectDescription"; +import SubProjectDescription from "../../../../components/SubDescription"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import '../index.css'; +// import { useLocation, useParams } from 'react-router-dom'; + +function C4GT2024() { + const { siteConfig } = useDocusaurusContext(); + const API_BASE_URL = siteConfig.customFields.API_BASE_URL; + const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + const [currentTab, setCurrentTab] = useState("description"); + const [currentIssue, setCurrentIssue] = useState(null); + const [currentIssueData, setCurrentIssueData] = useState(null) + const [issueData,setIssueData] = useState(null); + const [selectedProject, setSelectedProject] = useState(null); + const [issueNumber,setIssueNumber] = useState(null); + + useEffect(()=>{ + const queryString = window.location.search; + const urlParams = new URLSearchParams(queryString); + const product = urlParams.get("id")?urlParams.get("id"):"c4gt"; + setCurrentIssue(()=>product) + fetch(`${API_BASE_URL}/issues`, { + method: 'GET', + headers:{ + 'X-Secret-Key':API_AUTH_KEY, + } + }) + .then(response => { + return response.json(); + }) + .then(data => { + setIssueData(()=>data) + }) + .catch(error => { + console.log("error",error.message); + }); +},[]) + // const { search } = useLocation(); + // const params = useParams(); + + // useEffect(() => { + // window.location.reload(); + // const queryString = window.location.search; + // const urlParams = new URLSearchParams(queryString); + // const product = urlParams.get("id"); + // console.log(product) + // }, [search,params]); + + + return ( + +
    +
    + +
    + {(currentTab == "description" && currentIssue!=null) ? :<>} + {currentTab == "subDescription" ? + :<>} +
    +
    +
    +
    + ); +} +export default C4GT2024; diff --git a/src/pages/index.js b/src/pages/index.js index eeebd0a38..519724c99 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -8,6 +8,7 @@ import ParticipantImages from "../components/ParticipantImages"; function HomepageHeader() { const { siteConfig } = useDocusaurusContext(); + console.log(siteConfig.customFields.API_BASE_URL) return (
    diff --git a/static/img/C4GT_Logo_Text.png b/static/img/C4GT_Logo_Text.png new file mode 100644 index 0000000000000000000000000000000000000000..2bf3e5e9e641d3c8437edce5dbecd6f031e06c68 GIT binary patch literal 21958 zcmdpe^;29;(C#8ZlHf^jw;;jYB`>;2Ah?D_gL{z0LXZRq?(Qy&%OZi`?k>S~3AQ-* z^%4X^nZUvTo*X2} zaRGm@ofPz3K_CwLf4?YS3M4&1AR3V3d+Co~(vMf*4zCp(Pyg=B^zYY>y%u9~3&zHl zn^(o+=0@=dVPx23<7!7;ie*e+KqrF8Fjo_F1s{cDEx10j%8Ku)8mvvVS)75Fwb*Lu zcs}{Z^7Fo2rGEGT|2$J#`VtWR|LYHl`2U@mb$k3ge{nH(c{3=NXc5OgG`rm`8T~YB zKkZx6eE;g{4#7V3MlW$>STd{ao_iAp0%c2L9boR<`daW0!L)9)-2;slz(FlX14GnP zHPn3{4YR7Y0$YWXer_*U%H4k9y}22>k2^#K1-KDRBR{gt`_Kfgdapb3zB6|&BAkCG z=Nc{Q0&O=N-FzY3m@{T$pre-v6?pPJJL@w z*k|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NrW u)EyI{$L4k}Lefl#QyS)E;ROVW{I?*v|Nn6h+h_cDvbbq;18;UO?*9N!4qtcx literal 0 HcmV?d00001 diff --git a/static/img/link_icon.svg b/static/img/link_icon.svg new file mode 100644 index 000000000..69c27ae82 --- /dev/null +++ b/static/img/link_icon.svg @@ -0,0 +1 @@ + \ No newline at end of file From 44cc8005847658a34c846cccadf4582cd0ef5692 Mon Sep 17 00:00:00 2001 From: riya-2206 Date: Fri, 7 Jun 2024 00:40:00 +0530 Subject: [PATCH 2/3] changes done as mentioned in the PR --- docusaurus.config.js | 4 + src/components/C4GT2024Page.js | 117 +++++------ src/components/ProjectDescription.js | 209 +++++++++++++------- src/components/SubDescription.js | 282 ++++++++++++++++----------- src/css/custom.css | 11 ++ src/hooks/useParseMarkdown.js | 72 +++++++ src/pages/docs/2024/index.css | 5 + src/pages/docs/2024/index.js | 162 +++++++-------- src/pages/docs/2024/org/index.js | 250 ++++++++++++++---------- src/pages/index.js | 1 - 10 files changed, 688 insertions(+), 425 deletions(-) create mode 100644 src/hooks/useParseMarkdown.js diff --git a/docusaurus.config.js b/docusaurus.config.js index 378bf9c07..3aaa5fb87 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -231,6 +231,10 @@ module.exports = { label: "VedantKhairnar", to: "/docs/2024/org?id=VedantKhairnar", }, + { + label: "AbhimanyuSamagra", + to: "/docs/2024/org?id=AbhimanyuSamagra", + }, ] } ], diff --git a/src/components/C4GT2024Page.js b/src/components/C4GT2024Page.js index e874fc4cd..4d1e9c7d5 100644 --- a/src/components/C4GT2024Page.js +++ b/src/components/C4GT2024Page.js @@ -2,65 +2,66 @@ import React from "react"; function C4GT2024Page() { return ( -
    -
    -
    -
    -
    - -
    -
    -

    C4GT'24

    -
    -

    - C4GT Mentoring Program has been conceptualized as a summer coding - program to create a close-knit community that can build and contribute - to global digital public goods. -

    -
      -
    • - An opportunity for college students and working professionals in - India to experience the GovTech space -
    • -
    • Organized annually over 2 months (July-August)
    • -
    • - There will be a set of diverse and engaging GovTech problem - statements every year for the participants to work on -
    • -
    • - Shortlisted contributors will receive mentorship from leading - practitioners in GovTech ecosystem -
    • -
    -

    Thanks for being part of the community. 💚

    +
    +
    +
    +
    +
    + +
    +
    +

    C4GT'24

    +
    +

    + C4GT Mentoring Program has been conceptualized as a summer + coding program to create a close-knit community that can build + and contribute to global digital public goods. +

    +
      +
    • + An opportunity for college students and working + professionals in India to experience the GovTech space +
    • +
    • Organized annually over 2 months (July-August)
    • +
    • + There will be a set of diverse and engaging GovTech problem + statements every year for the participants to work on +
    • +
    • + Shortlisted contributors will receive mentorship from + leading practitioners in GovTech ecosystem +
    • +
    +

    Thanks for being part of the community. 💚

    +
    +
    +
    +
    -
    -
    -
    -
    ); } diff --git a/src/components/ProjectDescription.js b/src/components/ProjectDescription.js index f610dedd1..9abdca61c 100644 --- a/src/components/ProjectDescription.js +++ b/src/components/ProjectDescription.js @@ -1,83 +1,152 @@ import React, { useEffect, useState } from "react"; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import { useHistory } from "react-router-dom"; +import useParseMarkdown from "../hooks/useParseMarkdown"; -function ProjectDescription({currentIssue, currentIssueData}) { - const { siteConfig } = useDocusaurusContext(); - const API_BASE_URL = siteConfig.customFields.API_BASE_URL; - const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; - const [description,setDescription] = useState(null) +function ProjectDescription({ + currentIssue, + currentIssueData, + setCurrentTab, + setSelectedProject, + setIssueNumber, +}) { + const history = useHistory(); + const {API_AUTH_KEY,API_BASE_URL} = useParseMarkdown(); + const [description, setDescription] = useState(null); + const [mobile, setMobile] = useState(false); + const [error, setError] = useState(null); - useEffect(()=>{ + useEffect(() => { + setError(()=>null); fetch(`${API_BASE_URL}/issues/${currentIssue}`, { - method: 'GET', - headers:{ - 'X-Secret-Key':API_AUTH_KEY, + method: "GET", + headers: { + "X-Secret-Key": API_AUTH_KEY, + }, + }) + .then((response) => { + if (!response.ok) { + throw new Error(`Error! status: ${response.status}`); } - }) - .then(response => { return response.json(); }) - .then(data => { - setDescription(()=>data) + .then((data) => { + setDescription(() => data); }) - .catch(error => { - console.log("error",error.message); + .catch((error) => { + setError(error); }); -},[currentIssue]) + }, [currentIssue]); + + useEffect(() => { + const handleResize = () => { + if (window.innerWidth < 997) { + setMobile(true); + } else { + setMobile(false); + } + }; + handleResize(); + + window.addEventListener("resize", handleResize); + + return () => { + window.removeEventListener("resize", handleResize); + }; + }, []); return ( -
    -
    -
    -
    -
    - -
    -
    -

    {description?.name}

    -
    -

    {description?.description} - {/* when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum */} -

    - {/*

    Following are the list of Issues associated with the organization

    - {currentIssueData?.length!=0 &&
      - {currentIssueData?.map((d,i)=>{ - return
    • - - {d.name} - -
    • - })} - -
    } */} -
    -
    -
    -
    -
    -
    + <> + {error ? ( +
    +

    {error.message}

    + +
    + ) : ( +
    +
    +
    +
    +
    + +
    +
    +

    {description?.name}

    +
    +

    {description?.description}

    + {mobile && ( + <> +

    + Following are the list of Issues associated with the + organization +

    + {currentIssueData?.length != 0 && ( + + )} + + )} +
    +
    +
    +
    +
    +
    + )} + ); } diff --git a/src/components/SubDescription.js b/src/components/SubDescription.js index 4f0b49109..3a29e3914 100644 --- a/src/components/SubDescription.js +++ b/src/components/SubDescription.js @@ -1,69 +1,84 @@ import React, { useEffect, useState } from "react"; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import useParseMarkdown from "../hooks/useParseMarkdown"; -function SubProjectDescription({ selectedProject,issueNumber, currentIssue }) { +function SubProjectDescription({ selectedProject, issueNumber, currentIssue }) { + const {weeklyGoals, weeklyLearnings,API_AUTH_KEY,API_BASE_URL} = useParseMarkdown(); const [description, setDescription] = useState(null); - const { siteConfig } = useDocusaurusContext(); - const API_BASE_URL = siteConfig.customFields.API_BASE_URL; - const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + const [error, setError] = useState(null); useEffect(() => { - fetch( - `${API_BASE_URL}/issues/${currentIssue}/${issueNumber}`, - { - method: "GET", - headers: { - "X-Secret-Key": API_AUTH_KEY, - }, + setError(()=>null); + fetch(`${API_BASE_URL}/issues/${currentIssue}/${issueNumber}`, { + method: "GET", + headers: { + "X-Secret-Key": API_AUTH_KEY, }, - ) + }) .then((response) => { + if (!response.ok) { + throw new Error(`Error! status: ${response.status}`); + } return response.json(); }) .then((data) => { setDescription(() => data); }) .catch((error) => { - console.log("error", error.message); + setError(()=>error) }); }, [selectedProject]); - const parseMarkdown = (markdown) => { - markdown = markdown.replace(/^### (.*$)/gim, "

    $1

    "); - markdown = markdown.replace(/^## (.*$)/gim, `

    $1

    `); - markdown = markdown.replace(/^# (.*$)/gim, `

    $1

    `); - - markdown = markdown.replace(/\*\*(.*)\*\*/gim, "$1"); - markdown = markdown.replace(/\*(.*)\*/gim, "$1"); - - markdown = markdown.replace( - /- \[ \] (.*$)/gim, - ' $1', - ); - markdown = markdown.replace( - /- \[x\] (.*$)/gim, - ' $1', - ); - - markdown = markdown.replace(/^\s*-\s+(.*$)/gim, "
  • $1
  • "); - markdown = markdown.replace(/(
  • .*<\/li>)/gim, "
      $1
    "); - - markdown = markdown.replace(/\r\n\r\n/g, ""); - markdown = markdown.replace(/(?:\r\n|\r|\n)/g, "
    "); - - // markdown = markdown.replace(/\n/gim, "
    "); - console.log(markdown) - - return markdown.trim(); - }; - - return ( -
    + return (<> + {error ? +
    +

    {error.message}

    + +
    + :
    {description && (
  • - {description?.description && <>

    Overview

    -

    - {description?.description} -

    } + {description?.description && ( + <> +

    Overview

    +

    {description?.description}

    + + )}
    - {description?.overall_progress != null && <>
    -
    {description?.overall_progress + "%"} + {description?.overall_progress != null && ( + <> +
    +
    + {description?.overall_progress > 0 + ? description?.overall_progress + "%" + : ""} +
    - - -
    - {/*
    {description?.overall_progress + "%"}
    */} - } + + )} - {description?.contributor_name && - - - } - {description?.mentor_name.length!=0 && <> - - - - {description?.mentor_name.length > 1 && ( + {description?.contributor_name && ( + + + + + )} + {description?.mentor_name?.length != 0 && ( <> - {description?.mentor_name?.map((d, i) => { - if (i != 0) { - return ( - - - - ); - } else return <>; - })} + + + + + {description?.mentor_name?.length > 1 && ( + <> + {description?.mentor_name?.map((d, i) => { + if (i != 0) { + return ( + + + + ); + } else return <>; + })} + + )} - )}} - {description?.org_name && - - - } + )} + {description?.org_name && ( + + + + + )}
    Contributor Name - {description?.contributor_name} -
    - Mentor Name - - {description?.mentor_name[0]} -
    Contributor Name + + {description?.contributor_name} + +
    - {d} -
    + Mentor Name + + + {description?.mentor_name[0]} + +
    + + {d} + +
    Org Name - - {description?.org_name} - -
    Org Name + + {description?.org_name} + +
    -
    - {description?.weekly_goals_html &&
    } - {/* {parseMarkdown(description?.weekly_goals_html)} */} +
    + {description?.weekly_goals_html && ( +
    + )}
    -
    - {description?.weekly_learnings_html &&
    } +
    + {description?.weekly_learnings_html && ( +
    + )}
    -

    Overall Project PR Table

    - +

    Overall Project PR Table

    +
    @@ -173,7 +221,9 @@ function SubProjectDescription({ selectedProject,issueNumber, currentIssue }) { @@ -184,7 +234,7 @@ function SubProjectDescription({ selectedProject,issueNumber, currentIssue }) { )} - + } ); } diff --git a/src/css/custom.css b/src/css/custom.css index b88843c14..86f6fc9dd 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -16,6 +16,17 @@ padding: 0 var(--ifm-pre-padding); } + + +@media screen and (max-width: 966px) { + .menu__link--active, .menu__link--active:hover { + color: #1c1e21 !important; + } + .menu__link--active { + background: #ffffff !important; + } +} + .dropdown__link--active, .dropdown__link--active:hover { color: #1c1e21; } diff --git a/src/hooks/useParseMarkdown.js b/src/hooks/useParseMarkdown.js new file mode 100644 index 000000000..e4c5ad255 --- /dev/null +++ b/src/hooks/useParseMarkdown.js @@ -0,0 +1,72 @@ +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; + +function useParseMarkdown() { + const { siteConfig } = useDocusaurusContext(); + const API_BASE_URL = siteConfig.customFields.API_BASE_URL; + const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + + const weeklyGoals = (markdown) => { + markdown = markdown.replace(/^### (.*$)/gim, "

    $1

    "); + markdown = markdown.replace(/^## (.*$)/gim, `

    $1

    `); + markdown = markdown.replace(/^# (.*$)/gim, `

    $1

    `); + + markdown = markdown.replace(/\*\*(.*)\*\*/gim, "$1"); + markdown = markdown.replace(/\*(.*)\*/gim, "$1"); + + markdown = markdown.replace( + /- \[ \] (.*$)/gim, + ' $1', + ); + markdown = markdown.replace( + /- \[x\] (.*$)/gim, + ' $1', + ); + + markdown = markdown.replace(/^\s*-\s+(.*$)/gim, "
  • $1
  • "); + markdown = markdown.replace(/(
  • .*<\/li>)/gim, "
      $1
    "); + + markdown = markdown.replace( + /!\[(.*?)\]\((.*?)\)/gim, + "$1", + ); + + markdown = markdown.replace(/\r\n\r\n/g, ""); + markdown = markdown.replace(/(?:\r\n|\r|\n)/g, "
    "); + + return markdown.trim(); + } + const weeklyLearnings = (markdown) => { + markdown = markdown.replace(/^### (.*$)/gim, "

    $1

    "); + markdown = markdown.replace(/^## (.*$)/gim, `

    $1

    `); + markdown = markdown.replace(/^# (.*$)/gim, `

    $1

    `); + + markdown = markdown.replace(/\*\*(.*)\*\*/gim, "$1"); + markdown = markdown.replace(/\*(.*)\*/gim, "$1"); + + markdown = markdown.replace( + /- \[ \] (.*$)/gim, + ' $1', + ); + markdown = markdown.replace( + /- \[x\] (.*$)/gim, + ' $1', + ); + + markdown = markdown.replace(/^\s*-\s+(.*$)/gim, "
  • $1
  • "); + markdown = markdown.replace(/(
  • .*<\/li>)/gim, "
      $1
    "); + + markdown = markdown.replace( + /!\[(.*?)\]\((.*?)\)/gim, + "$1", + ); + + markdown = markdown.replace(/\r\n\r\n/g, ""); + markdown = markdown.replace(/(?:\r\n|\r|\n)/g, ""); + + return markdown.trim(); + } + + return { weeklyGoals, weeklyLearnings,API_BASE_URL,API_AUTH_KEY }; + } + + export default useParseMarkdown; \ No newline at end of file diff --git a/src/pages/docs/2024/index.css b/src/pages/docs/2024/index.css index 6b5a1cf05..bb685f8df 100644 --- a/src/pages/docs/2024/index.css +++ b/src/pages/docs/2024/index.css @@ -32,6 +32,7 @@ gap: 28px; .h2-font{ font-size: 32px; } + @media screen and (max-width: 779px){ .header-layout{ flex-direction: column; @@ -76,4 +77,8 @@ font-size: 32px; .right-side-table{ padding-right: 0; } +.fullwidth-table{ + width: 100%; + display: table; +} } \ No newline at end of file diff --git a/src/pages/docs/2024/index.js b/src/pages/docs/2024/index.js index 5416e5d3d..f9667e0b9 100644 --- a/src/pages/docs/2024/index.js +++ b/src/pages/docs/2024/index.js @@ -1,103 +1,109 @@ import React, { useEffect, useState } from "react"; import Layout from "@theme/Layout"; import C4GT2024Page from "../../../components/C4GT2024Page"; -import './index.css'; -import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -// import { useLocation, useParams } from 'react-router-dom'; +import "./index.css"; +import useParseMarkdown from "../../../hooks/useParseMarkdown"; function C4GT2024() { - const { siteConfig } = useDocusaurusContext(); + const {API_AUTH_KEY,API_BASE_URL} = useParseMarkdown(); const [currentTab, setCurrentTab] = useState("c4gt"); - const [issueData,setIssueData] = useState(null) - const API_BASE_URL = siteConfig.customFields.API_BASE_URL; - const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + const [issueData, setIssueData] = useState(null); + const [error, setError] = useState(null); - useEffect(()=>{ + useEffect(() => { + setError(()=>null); fetch(`${API_BASE_URL}/issues`, { - method: 'GET', - headers:{ - 'X-Secret-Key':API_AUTH_KEY, + method: "GET", + headers: { + "X-Secret-Key": API_AUTH_KEY, + }, + }) + .then((response) => { + if (!response.ok) { + throw new Error(`Error! status: ${response.status}`); } - }) - .then(response => { return response.json(); }) - .then(data => { - setIssueData(()=>data) + .then((data) => { + setIssueData(() => data); }) - .catch(error => { - console.log("error",error.message); + .catch((error) => { + setError(() => error); }); -},[]) - // const { search } = useLocation(); - // const params = useParams(); - - // useEffect(() => { - // window.location.reload(); - // const queryString = window.location.search; - // const urlParams = new URLSearchParams(queryString); - // const product = urlParams.get("id"); - // console.log(product) - // }, [search,params]); + }, []); - return ( -
    -
    - +
    + {currentTab == "c4gt" ? : <>} +
    +
    - + )}
    ); } diff --git a/src/pages/docs/2024/org/index.js b/src/pages/docs/2024/org/index.js index dfa997901..c1a3016c3 100644 --- a/src/pages/docs/2024/org/index.js +++ b/src/pages/docs/2024/org/index.js @@ -3,59 +3,81 @@ import Layout from "@theme/Layout"; import ProjectDescription from "../../../../components/ProjectDescription"; import SubProjectDescription from "../../../../components/SubDescription"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -import '../index.css'; -// import { useLocation, useParams } from 'react-router-dom'; +import "../index.css"; +import { useHistory, useLocation } from "react-router-dom"; +import useParseMarkdown from "../../../../hooks/useParseMarkdown"; function C4GT2024() { - const { siteConfig } = useDocusaurusContext(); - const API_BASE_URL = siteConfig.customFields.API_BASE_URL; - const API_AUTH_KEY = siteConfig.customFields.API_AUTH_KEY; + const location = useLocation(); + const history = useHistory(); + const {API_AUTH_KEY,API_BASE_URL} = useParseMarkdown(); const [currentTab, setCurrentTab] = useState("description"); const [currentIssue, setCurrentIssue] = useState(null); - const [currentIssueData, setCurrentIssueData] = useState(null) - const [issueData,setIssueData] = useState(null); + const [currentIssueData, setCurrentIssueData] = useState(null); + const [issueData, setIssueData] = useState(null); const [selectedProject, setSelectedProject] = useState(null); - const [issueNumber,setIssueNumber] = useState(null); + const [issueNumber, setIssueNumber] = useState(null); + const [error, setError] = useState(null); - useEffect(()=>{ - const queryString = window.location.search; + useEffect(() => { + const queryString = location.search; const urlParams = new URLSearchParams(queryString); - const product = urlParams.get("id")?urlParams.get("id"):"c4gt"; - setCurrentIssue(()=>product) + const product = urlParams.get("id") ? urlParams.get("id") : "c4gt"; + setSelectedProject(() => + urlParams.get("issue") ? urlParams.get("issue") : null, + ); + const newUrl = `/docs/2024/org?id=${product}`; + history.push(newUrl); + setCurrentIssue(() => product); + setError(()=>null); fetch(`${API_BASE_URL}/issues`, { - method: 'GET', - headers:{ - 'X-Secret-Key':API_AUTH_KEY, - } - }) - .then(response => { + method: "GET", + headers: { + "X-Secret-Key": API_AUTH_KEY, + }, + }) + .then((response) => { + if (!response.ok) { + throw new Error(`Error! status: ${response.status}`); + } return response.json(); }) - .then(data => { - setIssueData(()=>data) + .then((data) => { + setIssueData(() => data); }) - .catch(error => { - console.log("error",error.message); + .catch((error) => { + setError(()=>error); }); -},[]) - // const { search } = useLocation(); - // const params = useParams(); + }, []); - // useEffect(() => { - // window.location.reload(); - // const queryString = window.location.search; - // const urlParams = new URLSearchParams(queryString); - // const product = urlParams.get("id"); - // console.log(product) - // }, [search,params]); + useEffect(() => { + const queryString = location.search; + const urlParams = new URLSearchParams(queryString); + const product = urlParams.get("id") ? urlParams.get("id") : "c4gt"; + setCurrentIssue(() => product); + }, [location]); - return ( -
    -
    + {error ? ( +
    +

    {error.message}

    + +
    + ) : ( +
    +
  • - { - issueData?.map((data,i)=>{ - return
  • -
    { - setCurrentIssue(()=>data?.org_name); - setSelectedProject(()=>null); - setIssueNumber(()=>null); - setCurrentTab(()=>"description"); - setCurrentIssueData(()=>data?.issues) - }} + {issueData?.map((data, i) => { + return ( +
  • { + const newUrl = `/docs/2024/org?id=${data?.org_name}`; + history.push(newUrl); + setCurrentIssue(() => data?.org_name); + setSelectedProject(() => null); + setIssueNumber(() => null); + setCurrentTab(() => "description"); + setCurrentIssueData(() => data?.issues); + }} > - {data?.org_name} -
    - - - {(currentIssue==data?.org_name) ?
      - {data?.issues?.map((d,i)=>{ - return
    • { - setCurrentTab(()=>"subDescription"); - setSelectedProject(()=>d.name); - setIssueNumber(()=>d.issue_number); - }} + className={`menu__link ${currentIssue == data?.org_name ? "menu__link--active" : ""}`} > - {d.name} + {data?.org_name}
      -
    • - })} - -
    :<>} -
  • - }) - } - + + + {currentIssue == data?.org_name ? ( +
      + {data?.issues?.map((d, i) => { + if (d?.name != null) + return ( +
    • +
      { + const newUrl = `/docs/2024/org?id=${currentIssue}&issue=${d.name}`; + history.push(newUrl); + setCurrentTab(() => "subDescription"); + setSelectedProject(() => d.name); + setIssueNumber(() => d.issue_number); + }} + > + {d.name} +
      +
    • + ); + else <>; + })} +
    + ) : ( + <> + )} + + ); + })} -
    - {(currentTab == "description" && currentIssue!=null) ? :<>} - {currentTab == "subDescription" ? - :<>} +
    + {currentTab == "description" && currentIssue != null ? ( + + ) : ( + <> + )} + {currentTab == "subDescription" && selectedProject != null ? ( + + ) : ( + <> + )}
    - + )} ); } diff --git a/src/pages/index.js b/src/pages/index.js index 519724c99..eeebd0a38 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -8,7 +8,6 @@ import ParticipantImages from "../components/ParticipantImages"; function HomepageHeader() { const { siteConfig } = useDocusaurusContext(); - console.log(siteConfig.customFields.API_BASE_URL) return (
    From 6179c0593c140a0fe0278c541f5ea4747949f713 Mon Sep 17 00:00:00 2001 From: riya-2206 Date: Fri, 7 Jun 2024 12:01:18 +0530 Subject: [PATCH 3/3] added error handling logic --- src/components/ProjectDescription.js | 21 +++------------ src/components/SubDescription.js | 21 ++------------- src/pages/docs/2024/index.js | 17 +++++------- src/pages/docs/2024/org/index.js | 40 +++++++++++++++------------- 4 files changed, 33 insertions(+), 66 deletions(-) diff --git a/src/components/ProjectDescription.js b/src/components/ProjectDescription.js index 9abdca61c..8c36a67eb 100644 --- a/src/components/ProjectDescription.js +++ b/src/components/ProjectDescription.js @@ -8,12 +8,13 @@ function ProjectDescription({ setCurrentTab, setSelectedProject, setIssueNumber, + error, + setError }) { const history = useHistory(); const {API_AUTH_KEY,API_BASE_URL} = useParseMarkdown(); const [description, setDescription] = useState(null); const [mobile, setMobile] = useState(false); - const [error, setError] = useState(null); useEffect(() => { setError(()=>null); @@ -55,23 +56,7 @@ function ProjectDescription({ }, []); return ( <> - {error ? ( -
    -

    {error.message}

    - -
    - ) : ( + {!error && (
    { setError(()=>null); @@ -29,23 +28,7 @@ function SubProjectDescription({ selectedProject, issueNumber, currentIssue }) { }, [selectedProject]); return (<> - {error ? -
    -

    {error.message}

    - -
    - :
    diff --git a/src/pages/docs/2024/index.js b/src/pages/docs/2024/index.js index f9667e0b9..57edee8d2 100644 --- a/src/pages/docs/2024/index.js +++ b/src/pages/docs/2024/index.js @@ -32,25 +32,22 @@ function C4GT2024() { }); }, []); - return ( - - {error ? ( + return (<> + {error ? (
    + >

    Oops, something went wrong

    {error.message}

    -
    ) : ( +
    - )} - + )} + ); } export default C4GT2024; diff --git a/src/pages/docs/2024/org/index.js b/src/pages/docs/2024/org/index.js index c1a3016c3..63fecb012 100644 --- a/src/pages/docs/2024/org/index.js +++ b/src/pages/docs/2024/org/index.js @@ -57,25 +57,22 @@ function C4GT2024() { setCurrentIssue(() => product); }, [location]); - return ( - - {error ? ( + return (<> + {error ? (
    -

    {error.message}

    - -
    + style={{ + display: "flex", + justifyContent: "center", + alignItems: "center", + width: "100%", + height: "100vh", + flexDirection: "column", + }} + >

    Oops, something went wrong

    +

    {error.message}

    + ) : ( +
    -
    )} -
    + +
    )} + ); } export default C4GT2024;
    Week{tdata.week} {tdata.name} - {tdata.link} + + {tdata.link} + {tdata.status}