From e3dbf8d3aa07fe73dc279c2601bb667e01c90bc1 Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Thu, 17 Feb 2022 17:27:18 +0530 Subject: [PATCH 01/14] :memo: Added documentation page template added files for documentaion page and added documentaion tab in navbar --- .../documentation/documentation.tsx | 11 +++++++++ .../components/documentation/index.tsx | 1 + .../components/shared/layout.tsx | 3 +++ .../components/shared/navbar.tsx | 4 ++++ client/client-landing/pages/documentation.tsx | 23 +++++++++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 client/client-landing/components/documentation/documentation.tsx create mode 100644 client/client-landing/components/documentation/index.tsx create mode 100644 client/client-landing/pages/documentation.tsx diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx new file mode 100644 index 00000000..ce9b8147 --- /dev/null +++ b/client/client-landing/components/documentation/documentation.tsx @@ -0,0 +1,11 @@ +const Documentation = () => { + return ( +
+

+ Documentation +

+
+ ); +}; + +export default Documentation; diff --git a/client/client-landing/components/documentation/index.tsx b/client/client-landing/components/documentation/index.tsx new file mode 100644 index 00000000..8cf21c71 --- /dev/null +++ b/client/client-landing/components/documentation/index.tsx @@ -0,0 +1 @@ +export { default as Documentation } from "./documentation"; diff --git a/client/client-landing/components/shared/layout.tsx b/client/client-landing/components/shared/layout.tsx index 143c7ac7..b364b088 100644 --- a/client/client-landing/components/shared/layout.tsx +++ b/client/client-landing/components/shared/layout.tsx @@ -37,6 +37,9 @@ const Layout: React.FC = ({ children }) => { case "/contact-us": { return ; } + case "/documentation": { + return "Documentation Svg Template"; + } case "/500": { return ; } diff --git a/client/client-landing/components/shared/navbar.tsx b/client/client-landing/components/shared/navbar.tsx index aa274066..ea54ba6c 100644 --- a/client/client-landing/components/shared/navbar.tsx +++ b/client/client-landing/components/shared/navbar.tsx @@ -25,6 +25,10 @@ const Navbar = () => { name: "Contact Us", href: "/contact-us", }, + { + name: "Documentation", + href: "/documentation", + }, ]; return ( diff --git a/client/client-landing/pages/documentation.tsx b/client/client-landing/pages/documentation.tsx new file mode 100644 index 00000000..207cba5e --- /dev/null +++ b/client/client-landing/pages/documentation.tsx @@ -0,0 +1,23 @@ +import Head from "next/head"; + +import { Documentation } from "../components/documentation"; +import { Layout } from "../components/shared"; + +const documentation = () => { + return ( + <> + + Documentation + + + + + + + ); +}; + +export default documentation; From e8160003486ddde5e265362d6914de03bf725a7c Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Fri, 18 Feb 2022 16:03:54 +0530 Subject: [PATCH 02/14] changes --- client/client-landing/components/shared/navbar.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/client-landing/components/shared/navbar.tsx b/client/client-landing/components/shared/navbar.tsx index ea54ba6c..8fae238d 100644 --- a/client/client-landing/components/shared/navbar.tsx +++ b/client/client-landing/components/shared/navbar.tsx @@ -21,14 +21,14 @@ const Navbar = () => { name: "Join Us", href: "/join-us", }, - { - name: "Contact Us", - href: "/contact-us", - }, { name: "Documentation", href: "/documentation", }, + { + name: "Contact Us", + href: "/contact-us", + }, ]; return ( From 9320e40fffbaf0fa8635d956ceccbea0349703cc Mon Sep 17 00:00:00 2001 From: Sudhanshu Srivastava <71897832+Codered9@users.noreply.github.com> Date: Fri, 18 Feb 2022 16:14:03 +0530 Subject: [PATCH 03/14] Documentation Link Update --- client/client-landing/components/shared/navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client-landing/components/shared/navbar.tsx b/client/client-landing/components/shared/navbar.tsx index 8fae238d..fec67f7f 100644 --- a/client/client-landing/components/shared/navbar.tsx +++ b/client/client-landing/components/shared/navbar.tsx @@ -23,7 +23,7 @@ const Navbar = () => { }, { name: "Documentation", - href: "/documentation", + href: "/docs", }, { name: "Contact Us", From c4eebd4ebe04709e00a63d21109417d940a48345 Mon Sep 17 00:00:00 2001 From: Sudhanshu Srivastava <71897832+Codered9@users.noreply.github.com> Date: Fri, 18 Feb 2022 16:16:33 +0530 Subject: [PATCH 04/14] Fixed doc url --- client/client-landing/components/shared/navbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client-landing/components/shared/navbar.tsx b/client/client-landing/components/shared/navbar.tsx index fec67f7f..05b29fb5 100644 --- a/client/client-landing/components/shared/navbar.tsx +++ b/client/client-landing/components/shared/navbar.tsx @@ -23,7 +23,7 @@ const Navbar = () => { }, { name: "Documentation", - href: "/docs", + href: "/docmentation", }, { name: "Contact Us", From 8866371c5de240d7afaddcdf15ee4aad16716016 Mon Sep 17 00:00:00 2001 From: Sudhanshu Srivastava <71897832+Codered9@users.noreply.github.com> Date: Sat, 19 Feb 2022 22:28:11 +0530 Subject: [PATCH 05/14] feat/doc-page:PDF Added in Doc Page --- .../documentation/documentation.tsx | 6 +- .../documentation/pdfintegration.tsx | 20 ++ .../components/shared/navbar.tsx | 2 +- .../client-landing/styles/tailwind.styles.css | 6 + client/package-lock.json | 253 ++++++++++++++++++ client/package.json | 4 +- client/yarn.lock | 130 ++++----- 7 files changed, 351 insertions(+), 70 deletions(-) create mode 100644 client/client-landing/components/documentation/pdfintegration.tsx create mode 100644 client/package-lock.json diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index ce9b8147..bf55f0eb 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -1,9 +1,11 @@ +import PdfFile from "./pdfintegration"; const Documentation = () => { return (
-

+

Documentation -

+
+
); }; diff --git a/client/client-landing/components/documentation/pdfintegration.tsx b/client/client-landing/components/documentation/pdfintegration.tsx new file mode 100644 index 00000000..89864ff2 --- /dev/null +++ b/client/client-landing/components/documentation/pdfintegration.tsx @@ -0,0 +1,20 @@ +const PdfFile = () => { + var sources: string[] = ["https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview"] + + + return ( +
+

PDF Tutorial

+
+ {sources.map((source) => ( +
+ +
+ ))} +
+ + this is the end +
) +} + +export default PdfFile; \ No newline at end of file diff --git a/client/client-landing/components/shared/navbar.tsx b/client/client-landing/components/shared/navbar.tsx index 05b29fb5..8fae238d 100644 --- a/client/client-landing/components/shared/navbar.tsx +++ b/client/client-landing/components/shared/navbar.tsx @@ -23,7 +23,7 @@ const Navbar = () => { }, { name: "Documentation", - href: "/docmentation", + href: "/documentation", }, { name: "Contact Us", diff --git a/client/client-landing/styles/tailwind.styles.css b/client/client-landing/styles/tailwind.styles.css index 76dae061..e8da94a1 100644 --- a/client/client-landing/styles/tailwind.styles.css +++ b/client/client-landing/styles/tailwind.styles.css @@ -88,3 +88,9 @@ @apply bottom-0 top-0 right-0 left-0; } } + +.pdfcenter{ + margin-left: auto; + margin-right: auto; + width: 40%; +} \ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json new file mode 100644 index 00000000..35d26645 --- /dev/null +++ b/client/package-lock.json @@ -0,0 +1,253 @@ +{ + "name": "githubsrm-landing-and-portal", + "version": "3.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "githubsrm-landing-and-portal", + "version": "3.0.0", + "hasInstallScript": true, + "license": "MIT", + "devDependencies": { + "husky": "^7.0.0", + "rimraf": "^3.0.2" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/husky": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.2.tgz", + "integrity": "sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + }, + "dependencies": { + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "husky": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-7.0.2.tgz", + "integrity": "sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + } +} diff --git a/client/package.json b/client/package.json index d19f3cda..dd6699d8 100644 --- a/client/package.json +++ b/client/package.json @@ -21,7 +21,7 @@ "prepare": "cd .. && husky install" }, "devDependencies": { - "rimraf": "^3.0.2", - "husky": "^7.0.0" + "husky": "^7.0.0", + "rimraf": "^3.0.2" } } diff --git a/client/yarn.lock b/client/yarn.lock index b787f02e..24976db8 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -2,86 +2,86 @@ # yarn lockfile v1 -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +"balanced-match@^1.0.0": + "integrity" "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + "version" "1.0.2" -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== +"brace-expansion@^1.1.7": + "integrity" "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==" + "resolved" "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + "version" "1.1.11" dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" + "balanced-match" "^1.0.0" + "concat-map" "0.0.1" -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +"concat-map@0.0.1": + "integrity" "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "resolved" "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "version" "0.0.1" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +"fs.realpath@^1.0.0": + "integrity" "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + "version" "1.0.0" -glob@^7.1.3: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== +"glob@^7.1.3": + "integrity" "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==" + "resolved" "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" + "version" "7.1.7" dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" + "fs.realpath" "^1.0.0" + "inflight" "^1.0.4" + "inherits" "2" + "minimatch" "^3.0.4" + "once" "^1.3.0" + "path-is-absolute" "^1.0.0" -husky@^7.0.0: - version "7.0.2" - resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.2.tgz#21900da0f30199acca43a46c043c4ad84ae88dff" - integrity sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg== +"husky@^7.0.0": + "integrity" "sha512-8yKEWNX4z2YsofXAMT7KvA1g8p+GxtB1ffV8XtpAEGuXNAbCV5wdNKH+qTpw8SM9fh4aMPDR+yQuKfgnreyZlg==" + "resolved" "https://registry.npmjs.org/husky/-/husky-7.0.2.tgz" + "version" "7.0.2" -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= +"inflight@^1.0.4": + "integrity" "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "resolved" "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + "version" "1.0.6" dependencies: - once "^1.3.0" - wrappy "1" + "once" "^1.3.0" + "wrappy" "1" -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +"inherits@2": + "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + "version" "2.0.4" -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +"minimatch@^3.0.4": + "integrity" "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "resolved" "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + "version" "3.0.4" dependencies: - brace-expansion "^1.1.7" + "brace-expansion" "^1.1.7" -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= +"once@^1.3.0": + "integrity" "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + "version" "1.4.0" dependencies: - wrappy "1" + "wrappy" "1" -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +"path-is-absolute@^1.0.0": + "integrity" "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + "version" "1.0.1" -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== +"rimraf@^3.0.2": + "integrity" "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==" + "resolved" "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + "version" "3.0.2" dependencies: - glob "^7.1.3" + "glob" "^7.1.3" -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +"wrappy@1": + "integrity" "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "version" "1.0.2" From 17d7564fd6e2625236226ec40fc2240b88ac3f55 Mon Sep 17 00:00:00 2001 From: Sudhanshu Srivastava <71897832+Codered9@users.noreply.github.com> Date: Sat, 19 Feb 2022 23:37:00 +0530 Subject: [PATCH 06/14] Added Nav Bar to access pdfs --- .../documentation/pdfintegration.tsx | 79 ++++++++++++++++--- .../client-landing/styles/tailwind.styles.css | 6 -- 2 files changed, 70 insertions(+), 15 deletions(-) diff --git a/client/client-landing/components/documentation/pdfintegration.tsx b/client/client-landing/components/documentation/pdfintegration.tsx index 89864ff2..e44dc91a 100644 --- a/client/client-landing/components/documentation/pdfintegration.tsx +++ b/client/client-landing/components/documentation/pdfintegration.tsx @@ -1,19 +1,80 @@ +import { useState } from "react"; +import { ArrowIcon } from '../../utils/icons' const PdfFile = () => { - var sources: string[] = ["https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview"] - + const sources: { + name: string, + href: string, + icon: JSX.Element + }[] = [{ + name: "Sample PDF", + href: "https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", + icon: + }, + { + name: "Lab PDF", + href: "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview", + icon: + }, + { + name: "Paralinguistic PDF", + href: "https://drive.google.com/file/d/1-Ktm3gE9WWDxnT_wvUON1VudSRb6dM8i/preview", + icon: + } + ] + let [pdfHref, setPdfHref] = useState(sources[0].href); + return (
+

PDF Tutorial

-
- {sources.map((source) => ( -
- + +
+
+ {sources.map((source) => ( +
+
setPdfHref(source.href)} + className={`${pdfHref === source.href + ? "border-base-green" + : "md:border-transparent" + } border-b-4 md:border-b-0 md:border-r-4 w-full cursor-pointer py-4 flex items-center justify-between transform hover:md:-translate-x-4`} + > +
+

+ {source.name} +

+
+ +
+ +
+
+
+ ))} +
+ +
+
+ {sources.map( + (source) => + source.href === pdfHref && ( +
+
+ +
+
+ ))}
- ))} +
- - this is the end
) } diff --git a/client/client-landing/styles/tailwind.styles.css b/client/client-landing/styles/tailwind.styles.css index e8da94a1..76dae061 100644 --- a/client/client-landing/styles/tailwind.styles.css +++ b/client/client-landing/styles/tailwind.styles.css @@ -88,9 +88,3 @@ @apply bottom-0 top-0 right-0 left-0; } } - -.pdfcenter{ - margin-left: auto; - margin-right: auto; - width: 40%; -} \ No newline at end of file From ea0e01f8081f90fbf52cec2068b165e70c2e18e1 Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Sun, 20 Feb 2022 14:28:07 +0530 Subject: [PATCH 07/14] feat/documentation-page-update --- .../documentation/documentation.tsx | 95 ++++++++++++++++++- .../components/documentation/pdfDisplay.tsx | 29 ++++++ .../documentation/pdfSideBarLink.tsx | 53 +++++++++++ .../documentation/youtubeDisplay.tsx | 16 ++++ .../documentation/youtubeSideBarLinks.tsx | 56 +++++++++++ 5 files changed, 246 insertions(+), 3 deletions(-) create mode 100644 client/client-landing/components/documentation/pdfDisplay.tsx create mode 100644 client/client-landing/components/documentation/pdfSideBarLink.tsx create mode 100644 client/client-landing/components/documentation/youtubeDisplay.tsx create mode 100644 client/client-landing/components/documentation/youtubeSideBarLinks.tsx diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index bf55f0eb..c54e2b3e 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -1,11 +1,100 @@ -import PdfFile from "./pdfintegration"; +import { useState } from "react"; +import { ArrowIcon } from "../../utils/icons"; +import PdfDisplay from "./pdfDisplay"; +import PdfSideBarLink from "./pdfSideBarLink"; +import YoutubeDisplay from "./youtubeDisplay"; +import YoutubeSideBarLink from "./youtubeSideBarLinks"; + +// import PdfFile from "./pdfintegration"; + const Documentation = () => { + const pdfSources: { + name: string; + href: string; + }[] = [ + { + name: "Sample PDF", + href: "https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", + }, + { + name: "Lab PDF", + href: "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview", + }, + { + name: "Paralinguistic PDF", + href: "https://drive.google.com/file/d/1-Ktm3gE9WWDxnT_wvUON1VudSRb6dM8i/preview", + }, + ]; + + const youtubeSources: { + title: string; + subTitle: string; + content: string; + href: string; + }[] = [ + { + title: "C++ in 100 Seconds", + subTitle: "Fireship", + content: + "C++ or C-plus-plus or Cpp is an extremely popular object-oriented programming language. Created in 1979, today it powers game engines, databases, compilers, embedded systems, desktop software, and much of our software infrastructure. ", + href: "https://www.youtube.com/watch?v=MNeX4EGtR5Y", + }, + { + title: "Firebase in 100 Seconds", + subTitle: "Fireship", + content: + "Firebase is a suite of tools for building apps on top of Google Cloud Platform. It's most famous for its realtime database, but also includes services for user authentication, serverless computing, push messaging, file storage, and more.", + href: "https://www.youtube.com/watch?v=vAoB4VbhRzM&t=82s", + }, + { + title: "GraphQL Explained in 100 Seconds", + subTitle: "Fireship", + content: + "What is GraphQL? Learn how it compares to REST and why developers love this query language for reading and mutating data in APIs", + href: "https://www.youtube.com/watch?v=eIQh02xuVw4", + }, + ]; + + const [display, setDisplay] = useState({ + source: pdfSources[1], + type: "PDF", + }); + return (

Documentation -


- + +
+
+
+ +
+
+ } + sources={pdfSources} + current={display.source.href} + /> + } + fnc={setDisplay} + sources={youtubeSources} + current={display.source.href} + /> +
+
+
+ {display.type === "PDF" ? ( + + ) : ( + + )} +
+
+
+
); }; diff --git a/client/client-landing/components/documentation/pdfDisplay.tsx b/client/client-landing/components/documentation/pdfDisplay.tsx new file mode 100644 index 00000000..1e485e1c --- /dev/null +++ b/client/client-landing/components/documentation/pdfDisplay.tsx @@ -0,0 +1,29 @@ +interface pdfDiaplayBarProps { + source: { + href: string; + title?: string; + subTitle?: string; + content?: string; + name?: string; + icon?: JSX.Element; + }; +} + +const PdfDisplay = ({ source }: pdfDiaplayBarProps) => { + return ( + <> +
+
+ +
+
+ + ); +}; + +export default PdfDisplay; diff --git a/client/client-landing/components/documentation/pdfSideBarLink.tsx b/client/client-landing/components/documentation/pdfSideBarLink.tsx new file mode 100644 index 00000000..482355c3 --- /dev/null +++ b/client/client-landing/components/documentation/pdfSideBarLink.tsx @@ -0,0 +1,53 @@ +interface linkProps { + fnc: Function; + sources: { + href: string; + name: string; + }[]; + current: string; + icon: JSX.Element; +} + +const PdfSideBarLink = ({ fnc, sources, current, icon }: linkProps) => { + return ( + <> +

PDF Tutorial

+ {sources.map((source) => ( +
+
fnc({ source: source, type: "PDF" })} + className={`${ + current === source.href + ? "border-base-green" + : "md:border-transparent" + } border-b-4 md:border-b-0 md:border-r-4 w-full cursor-pointer py-4 flex items-center justify-between transform hover:md:-translate-x-4`} + > +
+

+ {source.name} +

+
+ +
+ +
+
+
+ ))} + + ); +}; + +export default PdfSideBarLink; diff --git a/client/client-landing/components/documentation/youtubeDisplay.tsx b/client/client-landing/components/documentation/youtubeDisplay.tsx new file mode 100644 index 00000000..9186a1a6 --- /dev/null +++ b/client/client-landing/components/documentation/youtubeDisplay.tsx @@ -0,0 +1,16 @@ +interface linkProps { + source: { + href: string; + title?: string; + subTitle?: string; + content?: string; + name?: string; + icon?: JSX.Element; + }; +} + +const YoutubeDisplay = ({ source }: linkProps) => { + return <>{source.href}; +}; + +export default YoutubeDisplay; diff --git a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx new file mode 100644 index 00000000..9f3f3ed4 --- /dev/null +++ b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx @@ -0,0 +1,56 @@ +interface linkProps { + fnc: Function; + sources: { + href: string; + title: string; + subTitle: string; + content: string; + }[]; + current: string; + icon: JSX.Element; +} + +const YoutubeSideBarLink = ({ fnc, sources, current, icon }: linkProps) => { + console.log(sources); + return ( + <> +

Youtube Tutorial

+ {sources.map((source, i) => ( +
+
fnc({ source: source, type: "VIDEO" })} + className={`${ + current === source.href + ? "border-base-green" + : "md:border-transparent" + } border-b-4 md:border-b-0 md:border-r-4 w-full cursor-pointer py-4 flex items-center justify-between transform hover:md:-translate-x-4`} + > +
+

+ {source.title} +

+
+ +
+ +
+
+
+ ))} + + ); +}; + +export default YoutubeSideBarLink; From a9be9f71d556d719cf153c325782d7e6786b5738 Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Sun, 20 Feb 2022 14:35:34 +0530 Subject: [PATCH 08/14] refactor:deleted_pdfIntegration.tsx --- .../documentation/documentation.tsx | 2 - .../documentation/pdfintegration.tsx | 81 ------------------- 2 files changed, 83 deletions(-) delete mode 100644 client/client-landing/components/documentation/pdfintegration.tsx diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index c54e2b3e..8d4e9b42 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -5,8 +5,6 @@ import PdfSideBarLink from "./pdfSideBarLink"; import YoutubeDisplay from "./youtubeDisplay"; import YoutubeSideBarLink from "./youtubeSideBarLinks"; -// import PdfFile from "./pdfintegration"; - const Documentation = () => { const pdfSources: { name: string; diff --git a/client/client-landing/components/documentation/pdfintegration.tsx b/client/client-landing/components/documentation/pdfintegration.tsx deleted file mode 100644 index e44dc91a..00000000 --- a/client/client-landing/components/documentation/pdfintegration.tsx +++ /dev/null @@ -1,81 +0,0 @@ -import { useState } from "react"; -import { ArrowIcon } from '../../utils/icons' -const PdfFile = () => { - const sources: { - name: string, - href: string, - icon: JSX.Element - }[] = [{ - name: "Sample PDF", - href: "https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", - icon: - }, - { - name: "Lab PDF", - href: "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview", - icon: - }, - { - name: "Paralinguistic PDF", - href: "https://drive.google.com/file/d/1-Ktm3gE9WWDxnT_wvUON1VudSRb6dM8i/preview", - icon: - } - ] - let [pdfHref, setPdfHref] = useState(sources[0].href); - - - return ( -
-
-

PDF Tutorial

- -
-
- {sources.map((source) => ( -
-
setPdfHref(source.href)} - className={`${pdfHref === source.href - ? "border-base-green" - : "md:border-transparent" - } border-b-4 md:border-b-0 md:border-r-4 w-full cursor-pointer py-4 flex items-center justify-between transform hover:md:-translate-x-4`} - > -
-

- {source.name} -

-
- -
- -
-
-
- ))} -
- -
-
- {sources.map( - (source) => - source.href === pdfHref && ( -
-
- -
-
- ))} -
-
-
-
) -} - -export default PdfFile; \ No newline at end of file From 8fd6afa781d20d501a548d66ac684736a6dd1729 Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Mon, 21 Feb 2022 03:45:48 +0530 Subject: [PATCH 09/14] feat/documentation-page-youtubeEmbeds --- .../documentation/documentation.tsx | 6 ++--- .../documentation/youtubeDisplay.tsx | 24 ++++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index 8d4e9b42..295123b6 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -35,21 +35,21 @@ const Documentation = () => { subTitle: "Fireship", content: "C++ or C-plus-plus or Cpp is an extremely popular object-oriented programming language. Created in 1979, today it powers game engines, databases, compilers, embedded systems, desktop software, and much of our software infrastructure. ", - href: "https://www.youtube.com/watch?v=MNeX4EGtR5Y", + href: "https://www.youtube.com/embed/MNeX4EGtR5Y", }, { title: "Firebase in 100 Seconds", subTitle: "Fireship", content: "Firebase is a suite of tools for building apps on top of Google Cloud Platform. It's most famous for its realtime database, but also includes services for user authentication, serverless computing, push messaging, file storage, and more.", - href: "https://www.youtube.com/watch?v=vAoB4VbhRzM&t=82s", + href: "https://www.youtube.com/embed/vAoB4VbhRzM", }, { title: "GraphQL Explained in 100 Seconds", subTitle: "Fireship", content: "What is GraphQL? Learn how it compares to REST and why developers love this query language for reading and mutating data in APIs", - href: "https://www.youtube.com/watch?v=eIQh02xuVw4", + href: "https://www.youtube.com/embed/eIQh02xuVw4", }, ]; diff --git a/client/client-landing/components/documentation/youtubeDisplay.tsx b/client/client-landing/components/documentation/youtubeDisplay.tsx index 9186a1a6..e56a4a4c 100644 --- a/client/client-landing/components/documentation/youtubeDisplay.tsx +++ b/client/client-landing/components/documentation/youtubeDisplay.tsx @@ -10,7 +10,29 @@ interface linkProps { } const YoutubeDisplay = ({ source }: linkProps) => { - return <>{source.href}; + return ( + <> +
+
+
{source.title}
+
{source.subTitle}
+
+
+
{source.content}
+
+ +
+
+
+ + ); }; export default YoutubeDisplay; From 6e4832412ad227d920a31b008195cbc77dab07d0 Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Mon, 21 Feb 2022 04:03:30 +0530 Subject: [PATCH 10/14] fix: responsive design os doc links --- .../client-landing/components/documentation/documentation.tsx | 4 ++-- .../components/documentation/youtubeSideBarLinks.tsx | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index 295123b6..7fc26ee4 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -68,7 +68,7 @@ const Documentation = () => {
-
+
} @@ -83,7 +83,7 @@ const Documentation = () => { />
-
+
{display.type === "PDF" ? ( ) : ( diff --git a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx index 9f3f3ed4..667389c1 100644 --- a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx +++ b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx @@ -11,7 +11,6 @@ interface linkProps { } const YoutubeSideBarLink = ({ fnc, sources, current, icon }: linkProps) => { - console.log(sources); return ( <>

Youtube Tutorial

From fceb0edb9f8a879ae9ccf55392f16175ee4bf350 Mon Sep 17 00:00:00 2001 From: sarthak sachdeva Date: Mon, 21 Feb 2022 04:10:50 +0530 Subject: [PATCH 11/14] fix: solved code smells issues --- client/client-landing/components/documentation/pdfDisplay.tsx | 4 ++-- .../components/documentation/pdfSideBarLink.tsx | 4 ++-- .../components/documentation/youtubeDisplay.tsx | 4 ++-- .../components/documentation/youtubeSideBarLinks.tsx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/client-landing/components/documentation/pdfDisplay.tsx b/client/client-landing/components/documentation/pdfDisplay.tsx index 1e485e1c..749af65e 100644 --- a/client/client-landing/components/documentation/pdfDisplay.tsx +++ b/client/client-landing/components/documentation/pdfDisplay.tsx @@ -1,4 +1,4 @@ -interface pdfDiaplayBarProps { +interface PdfDiaplayProps { source: { href: string; title?: string; @@ -9,7 +9,7 @@ interface pdfDiaplayBarProps { }; } -const PdfDisplay = ({ source }: pdfDiaplayBarProps) => { +const PdfDisplay = ({ source }: PdfDiaplayProps) => { return ( <>
diff --git a/client/client-landing/components/documentation/pdfSideBarLink.tsx b/client/client-landing/components/documentation/pdfSideBarLink.tsx index 482355c3..4e58806a 100644 --- a/client/client-landing/components/documentation/pdfSideBarLink.tsx +++ b/client/client-landing/components/documentation/pdfSideBarLink.tsx @@ -1,4 +1,4 @@ -interface linkProps { +interface LinkProps { fnc: Function; sources: { href: string; @@ -8,7 +8,7 @@ interface linkProps { icon: JSX.Element; } -const PdfSideBarLink = ({ fnc, sources, current, icon }: linkProps) => { +const PdfSideBarLink = ({ fnc, sources, current, icon }: LinkProps) => { return ( <>

PDF Tutorial

diff --git a/client/client-landing/components/documentation/youtubeDisplay.tsx b/client/client-landing/components/documentation/youtubeDisplay.tsx index e56a4a4c..34c60acd 100644 --- a/client/client-landing/components/documentation/youtubeDisplay.tsx +++ b/client/client-landing/components/documentation/youtubeDisplay.tsx @@ -1,4 +1,4 @@ -interface linkProps { +interface LinkProps { source: { href: string; title?: string; @@ -9,7 +9,7 @@ interface linkProps { }; } -const YoutubeDisplay = ({ source }: linkProps) => { +const YoutubeDisplay = ({ source }: LinkProps) => { return ( <>
diff --git a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx index 667389c1..4de03b04 100644 --- a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx +++ b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx @@ -1,4 +1,4 @@ -interface linkProps { +interface LinkProps { fnc: Function; sources: { href: string; @@ -10,7 +10,7 @@ interface linkProps { icon: JSX.Element; } -const YoutubeSideBarLink = ({ fnc, sources, current, icon }: linkProps) => { +const YoutubeSideBarLink = ({ fnc, sources, current, icon }: LinkProps) => { return ( <>

Youtube Tutorial

From 1696fa62a1f0965e7e32b88ac322c49f83cc24ce Mon Sep 17 00:00:00 2001 From: Sudhanshu Srivastava <71897832+Codered9@users.noreply.github.com> Date: Mon, 21 Feb 2022 18:21:07 +0530 Subject: [PATCH 12/14] Comments added in Documentation page Code. --- .../documentation/documentation.tsx | 81 ++++++++++--------- .../components/documentation/pdfDisplay.tsx | 2 +- .../documentation/pdfSideBarLink.tsx | 4 +- .../documentation/youtubeDisplay.tsx | 2 +- .../documentation/youtubeSideBarLinks.tsx | 5 +- 5 files changed, 54 insertions(+), 40 deletions(-) diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index 7fc26ee4..bfb667a2 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -5,53 +5,59 @@ import PdfSideBarLink from "./pdfSideBarLink"; import YoutubeDisplay from "./youtubeDisplay"; import YoutubeSideBarLink from "./youtubeSideBarLinks"; +/* + pdfSources (array of Objects) to store name and url of the PDF. +*/ const Documentation = () => { const pdfSources: { name: string; href: string; }[] = [ - { - name: "Sample PDF", - href: "https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", - }, - { - name: "Lab PDF", - href: "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview", - }, - { - name: "Paralinguistic PDF", - href: "https://drive.google.com/file/d/1-Ktm3gE9WWDxnT_wvUON1VudSRb6dM8i/preview", - }, - ]; + { + name: "Sample PDF", + href: "https://drive.google.com/file/d/1kPcD_GpBODXD6pUgfLaqPhEHwpB-lpk3/preview", + }, + { + name: "Lab PDF", + href: "https://drive.google.com/file/d/1LZzQP5RPTMI4RKzTpnwfA3ufnc60Z2zA/preview", + }, + { + name: "Paralinguistic PDF", + href: "https://drive.google.com/file/d/1-Ktm3gE9WWDxnT_wvUON1VudSRb6dM8i/preview", + }, + ]; + /* + youtubeSources (array of Objects) to store name and url of the Youtube Videos/Local Videos address.. + */ const youtubeSources: { title: string; subTitle: string; content: string; href: string; }[] = [ - { - title: "C++ in 100 Seconds", - subTitle: "Fireship", - content: - "C++ or C-plus-plus or Cpp is an extremely popular object-oriented programming language. Created in 1979, today it powers game engines, databases, compilers, embedded systems, desktop software, and much of our software infrastructure. ", - href: "https://www.youtube.com/embed/MNeX4EGtR5Y", - }, - { - title: "Firebase in 100 Seconds", - subTitle: "Fireship", - content: - "Firebase is a suite of tools for building apps on top of Google Cloud Platform. It's most famous for its realtime database, but also includes services for user authentication, serverless computing, push messaging, file storage, and more.", - href: "https://www.youtube.com/embed/vAoB4VbhRzM", - }, - { - title: "GraphQL Explained in 100 Seconds", - subTitle: "Fireship", - content: - "What is GraphQL? Learn how it compares to REST and why developers love this query language for reading and mutating data in APIs", - href: "https://www.youtube.com/embed/eIQh02xuVw4", - }, - ]; + { + title: "C++ in 100 Seconds", + subTitle: "Fireship", + content: + "C++ or C-plus-plus or Cpp is an extremely popular object-oriented programming language. Created in 1979, today it powers game engines, databases, compilers, embedded systems, desktop software, and much of our software infrastructure. ", + href: "https://www.youtube.com/embed/MNeX4EGtR5Y", + }, + { + title: "Firebase in 100 Seconds", + subTitle: "Fireship", + content: + "Firebase is a suite of tools for building apps on top of Google Cloud Platform. It's most famous for its realtime database, but also includes services for user authentication, serverless computing, push messaging, file storage, and more.", + href: "https://www.youtube.com/embed/vAoB4VbhRzM", + }, + { + title: "GraphQL Explained in 100 Seconds", + subTitle: "Fireship", + content: + "What is GraphQL? Learn how it compares to REST and why developers love this query language for reading and mutating data in APIs", + href: "https://www.youtube.com/embed/eIQh02xuVw4", + }, + ]; const [display, setDisplay] = useState({ source: pdfSources[1], @@ -69,12 +75,14 @@ const Documentation = () => {
+ {/* Pdf Navigation Bar */} } sources={pdfSources} current={display.source.href} - /> + /> + {/* Video Navigation Bar */} } fnc={setDisplay} @@ -84,6 +92,7 @@ const Documentation = () => {
+ {/* Content elements which displayes according to the selection in Side Bar */} {display.type === "PDF" ? ( ) : ( diff --git a/client/client-landing/components/documentation/pdfDisplay.tsx b/client/client-landing/components/documentation/pdfDisplay.tsx index 749af65e..ba137506 100644 --- a/client/client-landing/components/documentation/pdfDisplay.tsx +++ b/client/client-landing/components/documentation/pdfDisplay.tsx @@ -8,7 +8,7 @@ interface PdfDiaplayProps { icon?: JSX.Element; }; } - +{/* Function takes the object as parameters and displays the video using Object.href inside an iframe. */} const PdfDisplay = ({ source }: PdfDiaplayProps) => { return ( <> diff --git a/client/client-landing/components/documentation/pdfSideBarLink.tsx b/client/client-landing/components/documentation/pdfSideBarLink.tsx index 4e58806a..faeb0004 100644 --- a/client/client-landing/components/documentation/pdfSideBarLink.tsx +++ b/client/client-landing/components/documentation/pdfSideBarLink.tsx @@ -7,7 +7,9 @@ interface LinkProps { current: string; icon: JSX.Element; } - +/* The component takes array of Objects in parameters, iterates over it using map function + and calls the display function with Object as parameter. +*/ const PdfSideBarLink = ({ fnc, sources, current, icon }: LinkProps) => { return ( <> diff --git a/client/client-landing/components/documentation/youtubeDisplay.tsx b/client/client-landing/components/documentation/youtubeDisplay.tsx index 34c60acd..b887f1f2 100644 --- a/client/client-landing/components/documentation/youtubeDisplay.tsx +++ b/client/client-landing/components/documentation/youtubeDisplay.tsx @@ -8,7 +8,7 @@ interface LinkProps { icon?: JSX.Element; }; } - +/* Function which takes Video details as an Object and displays them inside an iframe. */ const YoutubeDisplay = ({ source }: LinkProps) => { return ( <> diff --git a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx index 4de03b04..eb7539ab 100644 --- a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx +++ b/client/client-landing/components/documentation/youtubeSideBarLinks.tsx @@ -9,7 +9,10 @@ interface LinkProps { current: string; icon: JSX.Element; } - +/* Video Selection Side bar to select the required video to display. + This saves space and only required information is displayed. + Array of Objects are passed and iterated to create buttons for each object. +*/ const YoutubeSideBarLink = ({ fnc, sources, current, icon }: LinkProps) => { return ( <> From 612ca0403835057282508458928ec5a483a02e57 Mon Sep 17 00:00:00 2001 From: Sudhanshu Srivastava <71897832+Codered9@users.noreply.github.com> Date: Mon, 21 Feb 2022 19:03:58 +0530 Subject: [PATCH 13/14] fix:Code smell & Youtube video scaling issue on large display --- ...deBarLinks.tsx => YoutubeSideBarLinks.tsx} | 0 .../documentation/documentation.tsx | 2 +- .../documentation/youtubeDisplay.tsx | 8 ++++---- .../client-landing/styles/tailwind.styles.css | 20 +++++++++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) rename client/client-landing/components/documentation/{youtubeSideBarLinks.tsx => YoutubeSideBarLinks.tsx} (100%) diff --git a/client/client-landing/components/documentation/youtubeSideBarLinks.tsx b/client/client-landing/components/documentation/YoutubeSideBarLinks.tsx similarity index 100% rename from client/client-landing/components/documentation/youtubeSideBarLinks.tsx rename to client/client-landing/components/documentation/YoutubeSideBarLinks.tsx diff --git a/client/client-landing/components/documentation/documentation.tsx b/client/client-landing/components/documentation/documentation.tsx index bfb667a2..85759940 100644 --- a/client/client-landing/components/documentation/documentation.tsx +++ b/client/client-landing/components/documentation/documentation.tsx @@ -3,7 +3,7 @@ import { ArrowIcon } from "../../utils/icons"; import PdfDisplay from "./pdfDisplay"; import PdfSideBarLink from "./pdfSideBarLink"; import YoutubeDisplay from "./youtubeDisplay"; -import YoutubeSideBarLink from "./youtubeSideBarLinks"; +import YoutubeSideBarLink from "./YoutubeSideBarLinks"; /* pdfSources (array of Objects) to store name and url of the PDF. diff --git a/client/client-landing/components/documentation/youtubeDisplay.tsx b/client/client-landing/components/documentation/youtubeDisplay.tsx index b887f1f2..49fbaad9 100644 --- a/client/client-landing/components/documentation/youtubeDisplay.tsx +++ b/client/client-landing/components/documentation/youtubeDisplay.tsx @@ -17,13 +17,13 @@ const YoutubeDisplay = ({ source }: LinkProps) => {
{source.title}
{source.subTitle}
-
-
{source.content}
-
+
+
{source.content}
+