diff --git a/package-lock.json b/package-lock.json index 5f4f7d0..d7aac05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.19", + "axios": "^1.7.2", "bootstrap": "^5.3.3", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -1847,6 +1848,11 @@ "has-symbols": "^1.0.3" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, "node_modules/available-typed-arrays": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", @@ -1859,6 +1865,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axios": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/babel-plugin-macros": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz", @@ -2031,6 +2047,17 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2131,6 +2158,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2727,6 +2762,25 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -2736,6 +2790,19 @@ "is-callable": "^1.1.3" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3542,6 +3609,25 @@ "yallist": "^3.0.2" } }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3872,6 +3958,11 @@ "react-is": "^16.13.1" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/package.json b/package.json index 84124fe..969dc01 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@mui/material": "^5.15.19", + "axios": "^1.7.2", "bootstrap": "^5.3.3", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/App.jsx b/src/App.jsx index 7d3827b..0324956 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -19,7 +19,8 @@ import ChanakyaNews from "./pages/resources/news/ChanakyaNews"; import Quiz from "./pages/resources/Quiz"; import ChanakyaQuiz from "./pages/resources/quiz/ChanakyaQuiz"; -import Contributors from "./pages/Contributors"; +import Contributors from "./pages/contributor/Contributors"; +import ContributorDetail from "./pages/contributor/ContributorDetail"; import SignIn from "./pages/auth/SignIn"; import SignUp from "./pages/auth/SignUp"; @@ -58,7 +59,9 @@ function App() { } /> } /> - } /> + } > + + }> {/* Authentication Pages */} } /> diff --git a/src/assets/CURSOR1.png b/src/assets/CURSOR1.png new file mode 100644 index 0000000..6bcabf2 Binary files /dev/null and b/src/assets/CURSOR1.png differ diff --git a/src/css/About.css b/src/css/About.css new file mode 100644 index 0000000..9fe9844 --- /dev/null +++ b/src/css/About.css @@ -0,0 +1,50 @@ +/* src/pages/About.css */ +.about-container { + padding: 20px; + max-width: 800px; + margin: 0 auto; + background-color: #f9f9f9; + border-radius: 8px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +.about-container h1 { + text-align: center; + color: #874343; + font-family: 'Arial', sans-serif; +} + +.about-content { + display: flex; + flex-direction: column; + align-items: center; +} + +.about-image { + max-width: 100%; + height: auto; + border-radius: 8px; + margin-bottom: 20px; +} + +.about-text { + text-align: justify; + color: #090909; + font-family: 'Georgia', serif; + font-size: x-large; +} + +.about-text p { + margin-bottom: 15px; + line-height: 1.6; +} + +.about-text ul { + list-style-type: disc; + padding-left: 20px; +} + +.about-text ul li { + margin-bottom: 10px; + color: #780d0d; +} diff --git a/src/index.css b/src/index.css index e69de29..3d43689 100644 --- a/src/index.css +++ b/src/index.css @@ -0,0 +1,3 @@ +*{ +cursor: url('/src/assets/CURSOR1.png'),auto; +} diff --git a/src/pages/About.jsx b/src/pages/About.jsx index 0d6d3b6..2bde968 100644 --- a/src/pages/About.jsx +++ b/src/pages/About.jsx @@ -1,9 +1,27 @@ -import React from 'react' +// src/pages/About.jsx +import React from 'react'; +import '../css/About.css'; const About = () => { return ( -
About
- ) -} +
+

Aacharya Chanakya

+
+ Chanakya +
+

Chanakya, also known as Kautilya or Vishnugupta, was an ancient Indian teacher, philosopher, economist, jurist, and royal advisor. He is traditionally identified as the author of the ancient Indian political treatise, the Arthashastra.

+

Born in 350 BCE in India, Chanakya played a crucial role in the establishment of the Maurya Empire. He was the chief advisor to both Emperor Chandragupta and his son, Bindusara.

+

Chanakya's work is considered pioneering in the fields of political science and economics. His strategies and principles are still studied and revered in modern times.

+

His notable works include:

+
    +
  • Arthashastra: A treatise on statecraft, economic policy, and military strategy.
  • +
  • Chanakya Niti: A collection of aphorisms offering guidance on various aspects of life.
  • +
+

Chanakya's wisdom and teachings continue to influence and inspire leaders and scholars around the world.

+
+
+
+ ); +}; export default About; diff --git a/src/pages/Contributors.jsx b/src/pages/Contributors.jsx deleted file mode 100644 index f3505cf..0000000 --- a/src/pages/Contributors.jsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react' - -const Contributors = () => { - return ( -
Contributors
- ) -} - -export default Contributors; diff --git a/src/pages/contributor/ContributorCard.jsx b/src/pages/contributor/ContributorCard.jsx new file mode 100644 index 0000000..d60d3d0 --- /dev/null +++ b/src/pages/contributor/ContributorCard.jsx @@ -0,0 +1,21 @@ +import React from 'react' +import { Link } from 'react-router-dom'; + +function ContributorCard(props) { + const { name, img } = props; + return ( + <> + + +
+ ... +
+
{name}
+ Get Details +
+
+ + ) +} + +export default ContributorCard \ No newline at end of file diff --git a/src/pages/contributor/ContributorDetail.jsx b/src/pages/contributor/ContributorDetail.jsx new file mode 100644 index 0000000..6ce20f5 --- /dev/null +++ b/src/pages/contributor/ContributorDetail.jsx @@ -0,0 +1,11 @@ +import React from 'react' + +function ContributorDetail() { + return ( +
+ Contributor Detail Page +
+ ) +} + +export default ContributorDetail \ No newline at end of file diff --git a/src/pages/contributor/Contributors.jsx b/src/pages/contributor/Contributors.jsx new file mode 100644 index 0000000..ea71732 --- /dev/null +++ b/src/pages/contributor/Contributors.jsx @@ -0,0 +1,48 @@ +import React from 'react' +import { useEffect, useState } from 'react' +import axios from 'axios' +import ContributorCard from './ContributorCard' + +const Contributors = () => { + + const [data, setdata] = useState([]) + useEffect(() => { + getContributor(); + }, []) + + + const getContributor = async () => { + await axios.get('https://api.github.com/repos/Avdhesh-Varshney/chanakya-niti/contributors') + .then(function (response) { + setdata(response.data); + // console.log(response.data); + }) + .catch(function (error) { + console.log(error); + }) + } + + return ( + <> +
+
+ Our Contributors +
+
+ + { + data.map((element) => { + return
+ +
+ }) + } +
+ +
+ + ) +} + +export default Contributors; +